如何在捆绑产品的子产品列表(选择形式)中检索图像产品

发布于 2024-08-28 03:55:36 字数 44 浏览 3 评论 0原文

我可以在捆绑产品的子产品列表(选择形式)中检索缩略图产品吗?如何更改查询?

Can I retrieve the thumbnail product in the list of sub-product (select form) of a bundle product? How to change the query?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

櫻之舞 2024-09-04 03:55:36

实际上有很多方法可以做到这一点,但这个可能会有所帮助:

<?php $src = $this->helper('catalog/image')->init($_item, 'thumbnail')->resize(125); ?>
<img src='<?php print $src; ?>' />

如果这不起作用,您可能需要检查以确保子项已加载“缩略图”字段。尝试:

<?php print $_item->getThumbnail(); ?>

如果您仍然没有运气,请告诉我。

谢谢,

There are actually a bunch of ways to do this, but this one may help:

<?php $src = $this->helper('catalog/image')->init($_item, 'thumbnail')->resize(125); ?>
<img src='<?php print $src; ?>' />

If that doesn't work, you may need to check to make sure that the child item has the 'thumbnail' field loaded. Try:

<?php print $_item->getThumbnail(); ?>

If you still have no luck, let me know.

Thanks,
Joe

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文