Get Image Path For Product Page in magento

Sunday, 30. October 2011

A nice simple script for getting an image path for product image in Magento’s product page

$_imageUrl = $this->helper('catalog/image')->init($_product, 'image');	
echo str_replace("http://".$_SERVER['SERVER_NAME']."/",$_SERVER{'DOCUMENT_ROOT'},$_imageUrl);
Tags: , .

Leave a Reply

You must be logged in to post a comment.