I understand how to display an image based on my selection from backend for hover on the product but i am trying to display 1 by 1 sequencely with a delay
For a starting point i have this code that might help, it will load all the images for this product on the gallery, use this on an item somewhere (list.phtml)

    $_images = Mage::getModel('catalog/product')->load($_product->getId())->getMediaGalleryImages();
  <?php  $i=0; foreach($_images as $_image){ $i++;?>
  <a href="#">
    <img src="<?=$this->helper('catalog/image')->init($_product, 'image', $_image->getFile()); ?>"alt="<?=$this->htmlEscape($_image->getLabel());?>" title="<?=$this->htmlEscape($_image->getLabel());?>" width="222px" height="222px" />
<?php  } ?>
<?php  } ?>  

I am thinking with the help of jQuery to do this but i do not want all the images to load on a category cause this will have waiting time, it should load 1 by 1 once the "slideshow' inside the main image will start.

anyone have some free time to play with this and help?

1 Answer 1


What you want is something like this: https://stackoverflow.com/questions/19104115/hover-starts-a-simple-slideshow

Your request isn't very Magento related, but please don't load the product model in a loop, you're shooting yourself in the foot here.

  • Thank you Mayers this is a good starting point (exact what i was looking to study) about loading the product in the loop is also my concern as i do not want to kill the database. Any ideas how to make it better?It should be loaded inside list.phtml so we speak about 36 products X all their images for every page. Commented Nov 8, 2016 at 21:05
  • @spanakorizo Have a look there: magento.stackexchange.com/questions/65218/… That's a better way to do it. But in this situation, I would still display less than 36 (seems a lot for Magento). Maybe display 12, and use infinite scroll, that would be a reliable solution Commented Nov 8, 2016 at 22:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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