How can I show products images on category products page?
1 Answer
Please refer to this link: http://inchoo.net/magento/show-product-thumbnail-in-grids/
There is one small change you will require to a file in above module or it may give you Image file was not found
error.
Open app\code\local\Inchoo\Thumbnail\Block\Adminhtml\Template\Grid\Renderer\Image.php file and update render
function with below code.
public function render(Varien_Object $row)
{
try{
$val = Mage::helper('catalog/image')->init($row, 'thumbnail')->resize(97);
}
catch(Exception $e) {
$val = Mage::getDesign()->getSkinUrl('images/catalog/product/placeholder/image.jpg',array('_area'=>'frontend'));
}
$out = "<img src=". $val ." width='97px'/>";
return $out;
}
Images will be displayed as per below screenshot.
To add edit link on grid, updated below file. app\code\local\Inchoo\Thumbnail\Block\Adminhtml\Catalog\Category\Tab\Product.php
Add below code just before return parent::_prepareColumns();
$this->addColumn('action',
array(
'header' => Mage::helper('catalog')->__('Action'),
'width' => '50px',
'type' => 'action',
'getter' => 'getId',
'actions' => array(
array(
'caption' => Mage::helper('catalog')->__('Edit'),
'url' => array(
'base'=>'adminhtml/catalog_product/edit',
'params'=>array('store'=>$this->getRequest()->getParam('store'))
),
'field' => 'id'
)
),
'filter' => false,
'sortable' => false,
'index' => 'stores',
));
-
The image display here. snag.gy/1AYavQ.jpg ...... I want images should display snag.gy/XT9AIU.jpg– zusSep 6, 2017 at 9:54
-
How to configure products images display in category products snag.gy/XT9AIU.jpg– zusSep 6, 2017 at 10:02
-
1@zus, please install the module and it will add images where you require. Please check screenshot. Download module from github.com/sambolek/thumbnail-grid Sep 6, 2017 at 10:03
-
-
I did not understand you there. Can you explain in more details? @zus Sep 6, 2017 at 10:40