Tag Archives: Category

Get custom Image Attribute value on product listing page Magento

1) Open the page catalog xml and search the for the string “catalog/product/list.phtml’

2) Include the code
<action method=”addAttribute”><name>alternate_another_imageimage</name></action>
after
<block type=”catalog/product_list” name=”product_list” template=”catalog/product/list.phtml”>

3) Call the below given code on list.phtml

$another_image = $this->helper(‘catalog/image’)->init($_product, another_image)->resize(135); // Assuming another_image is the attribute code

Change the layout of category page Magento

Include The Below given code

<reference name=”root”>
<action method=”setTemplate”><template>page/2columns-left.phtml</template></action>
</reference>

right under the default tag in in catalog.xml page

OR

Edit the page page.xml and replace the code

<block type=”page/html” name=”root” output=”toHtml” template=”page/3columns.phtml”>

With

<block type=”page/html” name=”root” output=”toHtml” template=”page/2columns-left.phtml”>