Magento Forum

   
How to change product display style? 
 
clandestinezone
Jr. Member
 
Total Posts:  5
Joined:  2009-02-23
 

I want to change product display style like the attached file. This will be a retailer site and product images are not neccessary for my customers. Although, it is not seen on the image, “add to cart” button and quantity selection will be inserted on each row. Any idea will be highly appreciated.

Image Attachments
display_option.GIF
 
Magento Community Magento Community
Magento Community
Magento Community
 
Wouter (@MidoMedia)
Member
 
Avatar
Total Posts:  44
Joined:  2007-11-28
 

You can use the product list as a basis, which you can alter with CSS to make it look like you want, although I don’t think you can add a quantity box in the product list. You can use the following code to make the stock-dependent icons in the product list:

<?php
$day = (int) Mage::getModel('cataloginventory/stock_item')->loadByProduct($_product)->getQty();
if ($day <= "1")
echo "SAD ICON";
else
echo "HAPPY ICON";
?>

 
Magento Community Magento Community
Magento Community
Magento Community
 
magentoassist
Guru
 
Avatar
Total Posts:  528
Joined:  2008-11-19
 

To expand on what Mido said, the code to alter list view lives in /template/catalog/product/list.phtml. There are two loops in here—one for list view and one for grid view. You’ll want to alter the list view one. Between this code and CSS you should be able to get it looking the way you want.

To get the qty box on your product list, go find the code for it on /template/catalog/product/view.phtml and add it to the list.phtml page.

 
Magento Community Magento Community
Magento Community
Magento Community
 
clandestinezone
Jr. Member
 
Total Posts:  5
Joined:  2009-02-23
 

I am trying to modify product display style as shown in the attached desired.jpg file. I did some changes in template/catalog/product/list.phtml file but I could not figure out how to proceed. Does anybody knows how to do these changes? Thanks.

Image Attachments
desired.jpgcurrent.jpg
 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top