Magento get thumbnail image url to be displayed on cart
18,400
Mage::helper('catalog/image')->init($item->getProduct(), 'thumbnail');
Will do the trick
Author by
Nirmal Ram
Updated on June 05, 2022Comments
-
Nirmal Ram almost 2 years
I having problem in getting the thumbnail image url for the items on the Magento Cart
Here is my code:
$quote = Mage::getSingleton('checkout/session')->getQuote(); $cartItems = $quote->getAllVisibleItems(); foreach ($cartItems as $item) { echo $item->getThumbnail(); }
Does anyone know that why does it returns always blank.
-
Klevis Miho over 9 yearsThis gets the image of the Configurable Product. Do you know how to get the image of the Associated Product?
-
prava over 9 yearscan you please answe @Klevis question, as I am too facing the same issue.