The below code snippet shows how to retrieve product image urls in a custom page. We need this while sending/exporting our products to thirdparty website for inventory synchronization.
1 2 3 4 5 6 7 8 |
$GalleryImages = Mage::getModel('catalog/product')->load('your_product_id_here') ->getMediaGalleryImages(); if(count($GalleryImages)) { foreach($GalleryImages as $simplemediagalleryimage) { echo $simplemediagalleryimage->url; echo " "; } } |
Compatability: Magento 1.5,1.4