显示主页中同一产品的图像列表

时间:2017-02-16 14:00:31

标签: web magento-1.9

我正在研究magento 1.9.2.4 这是我的grid.phtml中存在的代码



$('.login-input').on('focus', function() {
  $('.login').addClass('focused');
});

function doOnSubmit(e) {
   e.preventDefault();
   $('.login').removeClass('focused').addClass('loading');
   setTimeout(function(){
       $('.login-form').submit()
   },3000); // here you set this function to be executed after 3 seconds.
   $('.login').unbind("submit", doOnSubmit); 
   // this gets executed inmediatly and unbinds the actual behaviour, 
   //as you're going to redirect the user to another page it should be no problem
}
$('.login').on('submit', doOnSubmit);




如何更改它以显示此产品中存在的所有图像

1 个答案:

答案 0 :(得分:0)

<?php $_gallery = $product->getMediaGalleryImages(); ?>
<?php foreach($_gallery as $_item): ?>
    <?php $_resized_image_url = $this->helper('catalog/image')->init($_product, 'image', $_item->getFile())->resize($widthImage, $heightImage); ?>
<?php endforeach; ?>