please check attached snap-shot:


I am trying to Get image on shopping cart grid, but its showing no image, please check my code:

    ))->addColumn('image', array(
        'header'=> Mage::helper('catalog')->__('Image'),
        'type'  => 'image',
        'width' => '100px',
        'index' => 'image',

I have made changes in this file: app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/View/Cart.php.

Please help.

  • First thing dont change in the core file always use rewrite concept of magento – Murtuza Zabuawala Sep 11 '16 at 9:29
  • How, Please Guide me.. How to Get Image.. – Kunwar Sunil chauhan Sep 11 '16 at 9:46
  • Hi have Put this code in end of the code, But image showing crack i means not showing image.. public function callback_image($value) { $width = 70; $height = 70; return "<img src='".Mage::getBaseUrl('media').'catalog/product'.$value."' width=".$width." height=".$height."/>"; } – Kunwar Sunil chauhan Sep 11 '16 at 10:09
  • can you provide me link or something – Murtuza Zabuawala Sep 11 '16 at 16:14
  • i am working in remote , can u pl give me code so i can change from my end. – Kunwar Sunil chauhan Sep 12 '16 at 17:14
  • Module in this case named Custom_MyModule, the code you need is in these files below.


<?xml version="1.0"?>
                <Mage_Adminhtml />


<?xml version="1.0"?>


        <reference name="admin.customer.view.cart">
            <action method="addColumnAfter">



class Custom_MyModule_Block_Adminhtml_Renderer_Image
    extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
    public function render(Varien_Object $row)
        $productId = $row->getProductId();

        $product = Mage::getModel('catalog/product')->load($productId);
            $image = Mage::helper('catalog/image')->init($product, 'thumbnail')->resize(75);
                '<img id="image_banner' . $product->getId() . '" src="' . $image . '" />';
            return "";
  • After all, clear the caches and check it out.
| improve this answer | |

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.