0
<div class="pdp-media">
    <a class="product-image" href="<?php echo $item->getProductUrl(); ?>">
        <img src="<?php echo $this->helper('catalog/image')->init($item, 'thumbnail')->resize(500); ?>" alt="<?php echo $this->escapeHtml($item->getName()); ?>">
    </a>
</div>

Currently I am getting only one image of that product in my modal, but I want all of that product's images in modal as slider.

0

You can do this:

<?php foreach ($item->getMediaGalleryImages() as $image): ?>
    <a class="product-image" href="<?php echo $item->getProductUrl(); ?>">
        <img src="<?php echo $this->helper('catalog/image')->init($item, 'thumbnail', $image->getFile())->resize(500); ?>" alt="<?php echo $this->escapeHtml($image->getLabel()); ?>">
    </a>
<?php endforeach; ?>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.