简体   繁体   English

如何在magento 1.9.2.4的list.phtml页面上获取缩略图

[英]how to get thumbnail images on list.phtml page in magento 1.9.2.4

how to show thumbnail images from view.phtml page on list.phtml page in magento 1.9.2.4, I have tried lot of things but nothing really works for me, kindly share something that can solve my problem. 如何显示从view.phtmllist.phtml页面缩略图在Magento 1.9.2.4,我已经试过很多东西,但没有什么对我的作品,请分享的东西,可以解决我的问题。 thanks in advance 提前致谢

请尝试这个

Mage::helper('catalog/image')->init($item->getProduct(), 'thumbnail');
<?php //get images for product
              $product = Mage::getModel('catalog/product')->load($_product->getId());
              $helper = Mage::Helper('catalog/image');
              foreach ($product->getMediaGalleryImages() as $image) {
                  echo "<img src='" . $this->helper('catalog/image')->init($this->getProduct(), 'thumbnail', $image->getFile())->resize(80) . "' />";
              }
              ?>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM