Get categories on left sidebar

Hello I would like to have categories tree at the left side of website when on product page or categorie page.

In the same place where it says Sort by: Price, color or compare.

8 answers

Profile photo of Sherlock 0.00 $tone July 12, 2013
Public

HI Mate,

You would need to modify the layout file of app\design\frontend\default\jm_lingerie\layout\cat alog.xml
1) to add the categories tree to the categories page on the left side you look for this block tag

HTML Code:

   <reference name="left">
            <block type="catalog/layer_view" name="catalog.leftnav" after="currency" template="catalog/layer/view.phtml"/>
			
            <block type="joomlart_jmproducts/list" after="catalog.leftnav"  name="left.jmproducts.list" template="joomlart/jmproducts/column.phtml">
                    <action method="setData"><name>title</name><value>Latest Products</value></action>
                    <action method="setData"><name>mode</name><value>latest</value></action> 
                    <action method="setData"><name>perrow</name><value>1</value></action> 
                    <action method="setData"><name>quanlity</name><value>2</value></action> 
            </block>
        </reference>

change it to

HTML Code:

  <reference name="left">
            <block type="catalog/layer_view" name="catalog.leftnav" after="currency" template="catalog/layer/view.phtml"/>

             <block type="catalog/navigation" name="catalog.leftnavigation" after="catalog.leftnav" template="catalog/navigation/left.phtml"/>
             
            <block type="joomlart_jmproducts/list" after="catalog.leftnavigation"  name="left.jmproducts.list" template="joomlart/jmproducts/column.phtml">
                    <action method="setData"><name>title</name><value>Latest Products</value></action>
                    <action method="setData"><name>mode</name><value>latest</value></action> 
                    <action method="setData"><name>perrow</name><value>1</value></action> 
                    <action method="setData"><name>quanlity</name><value>2</value></action> 
            </block>
        </reference>

To add it to the product detail page you would look for this tag

HTML Code:

 <reference name="left">
            <!--<block type="catalog/layer_view" name="catalog.leftnav" before="-" template="catalog/layer/view.phtml"/>-->
			
            <block type="joomlart_jmproducts/list" after="catalog.leftnav"  name="left.jmproducts.list" template="joomlart/jmproducts/column.phtml">
                    <action method="setData"><name>title</name><value>Latest Products</value></action>
                    <action method="setData"><name>mode</name><value>latest</value></action> 
                    <action method="setData"><name>perrow</name><value>1</value></action> 
                    <action method="setData"><name>quanlity</name><value>2</value></action> 
            </block>
        </reference>

here you add the categories tree block tag to it so change to

HTML Code:

  <reference name="left">
            <!--<block type="catalog/layer_view" name="catalog.leftnav" before="-" template="catalog/layer/view.phtml"/>-->
			<block type="catalog/navigation" name="catalog.leftnavigation" after="catalog.leftnav" template="catalog/navigation/left.phtml"/>
            <block type="joomlart_jmproducts/list" after="catalog.leftnav"  name="left.jmproducts.list" template="joomlart/jmproducts/column.phtml">
                    <action method="setData"><name>title</name><value>Latest Products</value></action>
                    <action method="setData"><name>mode</name><value>latest</value></action> 
                    <action method="setData"><name>perrow</name><value>1</value></action> 
                    <action method="setData"><name>quanlity</name><value>2</value></action> 
            </block>
        </reference>

I hope these changes help

#1
Profile photo of Luís Algarvio 0.00 $tone July 15, 2013
Public

Hi Sherlock, thank you for your reply,

well i changed the catalog.xml and it looks like this but as you can see it still looks like it was.. no change: http://www.pinkstrawberry.pt/bandeau-crystal.html

HTML Code:

<reference name="left">
            <block type="catalog/layer_view" name="catalog.leftnav" after="currency" template="catalog/layer/view.phtml"/>
			<block type="catalog/navigation" name="catalog.leftnavigation" after="catalog.leftnav" template="catalog/navigation/left.phtml"/>
            <block type="joomlart_jmproducts/list" after="catalog.leftnavigation"  name="left.jmproducts.list" template="joomlart/jmproducts/column.phtml">
                    <action method="setData"><name>title</name><value>Latest Products</value></action>
                    <action method="setData"><name>mode</name><value>latest</value></action> 
                    <action method="setData"><name>perrow</name><value>1</value></action> 
                    <action method="setData"><name>quanlity</name><value>2</value></action> 
            </block>
        </reference>

Product view:

HTML Code:

<reference name="left">
            <!--<block type="catalog/layer_view" name="catalog.leftnav" before="-" template="catalog/layer/view.phtml"/>-->
			<block type="catalog/navigation" name="catalog.leftnavigation" after="catalog.leftnav" template="catalog/navigation/left.phtml"/>
            <block type="joomlart_jmproducts/list" after="catalog.leftnav"  name="left.jmproducts.list" template="joomlart/jmproducts/column.phtml">
                    <action method="setData"><name>title</name><value>Latest Products</value></action>
                    <action method="setData"><name>mode</name><value>latest</value></action> 
                    <action method="setData"><name>perrow</name><value>1</value></action> 
                    <action method="setData"><name>quanlity</name><value>2</value></action> 
            </block>
        </reference>
#2

This question is now closed

Written By

Comments