The default Magento product collection does not include a picture gallery for each product. That is why if we try to display the existing product pictures we will see the images which have been set by default in the Magento admin panel.
So, in case we need to have a picture gallery for every product item in the collection, the right thing to do this is to attach catalog_product_collection_load_after to the event and upload a gallery for each item:
1 2 3 4 5 6 7 8 |
class Belvg_Aurora_Model_Observer { public function loadMediaGallery(Varien_Event_Observer $observer) { foreach ($observer->getEvent()->getCollection() as $item) { $item->load('media_gallery'); } } } |
Partner With Us
Looking for a partner to grow your business? We are the right company to bring your webstore to success.
Talk to Andrey