2

i want to get product image url from id

i wrote below code but it not working

$baseproductimage = Mage::getModel('catalog/product')->load('223')->getSmallImage()->resize($list_image_width,$list_image_height);
  • 1
    Hi mour and welcome to MageOverflow. Please learn how to write questions: Add what happens, and what you expect. What is the error which occurs, if any. If not, write it down. – Fabian Blechschmidt Dec 9 '14 at 8:47
4

Try this

<?php $products = Mage::getModel('catalog/product')->load('223'); ?>
<?php echo Mage::helper('catalog/image')->init($products,'small_image')->resize($list_image_width,$list_image_height); ?>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.