Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

How to get product image in callouts/right_col.phtml
 
alesto
Guru
 
Total Posts:  624
Joined:  2009-03-21
 

Hi. I have this code in callouts/right_col.phtml

$cat=Mage::getModel(’catalog/category’)->load($id);
$myproducts=$cat->getProductCollection()->setOrder(’name’, ‘asc’);
foreach($myproducts as $_pro){
$_product=Mage::getModel(’catalog/product’)->load($_pro[’entity_id’]);
$addtocart = Mage::getUrl(’checkout/cart/add’, array(’product’=>$_product->getID()));
break;
}
<? echo Mage::helper('catalog/image')->init($_product, 'thumbnail')->resize(135, 135); ?>

I get somthing like this

http://*********/media/catalog/product/cache/2/thumbnail/135x135/5e06319eda06f020e43594a9c230972d/images/catalog/product/placeholder/thumbnail.jpg

But on my shop urls looks like:

http://*********/media/catalog/product/cache/2/small_image/100x100/5e06319eda06f020e43594a9c230972d/G/a/Gaspari-Halodrol-Liquigels_7.jpg

I cant solve this problem/ Community plz help me :(

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top