Created
May 19, 2015 10:26
-
-
Save aleron75/cc6834b947d033f864d0 to your computer and use it in GitHub Desktop.
Load Magento product media gallery
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$product = new Varien_Object(); | |
$product->setId(363004); | |
$attribute = Mage::getSingleton('catalog/product')->getResource()->getAttribute('media_gallery'); | |
$media = Mage::getResourceSingleton('catalog/product_attribute_backend_media'); | |
$gallery = $media->loadGallery($product, new Varien_Object(array('attribute' => $attribute))); |
Thanks its working. I am also looking for the code to load media gallery on product pages. just like this media gallery module. Can you suggest something?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
just what i was looking for :)