[contact-form-7 id="24078" title="Feedback EN"]

Featured templates

Locating Magento sidebar modules

This tutorial will show you where you can find the sidebar modules code.

Open app\design\frontend\default\your_theme\layout. This directory contains the XML files that determine the modules positions and order. Open any XML file and search for the tag <reference>. The reference tags determine modules position for various pages of your Magento store.

As you can see there are several references like: <reference name="top.menu">, <reference name="left">, <reference name="right">, <reference name="footer_links"> etc.

Let’s see where you can find most used sidebar modules Magento modules.

 

Compare products

File: catalog.xml

  <block  type="catalog/product_compare_sidebar"  before="cart_sidebar" name="catalog.compare.sidebar"  template="catalog/product/compare/sidebar.phtml"/>

 

Shop By/Browse By

File: catalog.xml

  <block  type="catalog/navigation" name="catalog.leftnav"  before="-" template="catalog/navigation/left.phtml"/>

 

Product Viewed

File: catalog.xml

  <block  type="reports/product_viewed"  before="right.permanent.callout"  name="left.reports.product.viewed"  template="reports/product_viewed.phtml" />

 

Related Products

File: catalog.xml

<block type="catalog/product_list_related" name="catalog.product.related" before="-" template="catalog/product/list/related.phtml"/>
	<block type="checkout/cart_sidebar" name="cart_sidebar" template="checkout/cart/sidebar.phtml">
    	<action method="addItemRender"><type>simple</type><block>checkout/cart_item_renderer</block><template>checkout/cart/sidebar/default.phtml</template></action>
        <action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>checkout/cart/sidebar/default.phtml</template></action>
        <action method="addItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>checkout/cart/sidebar/default.phtml</template></action>
        	<block type="core/text_list" name="cart_sidebar.extra_actions" as="extra_actions" translate="label" module="checkout">
            	<label>Shopping Cart Sidebar Extra Actions</label>
            </block>
    </block>

 

My Cart

File: checkout.xml

	<block type="checkout/cart_sidebar" name="cart_sidebar" template="checkout/cart/sidebar.phtml" before="-">
    	<action method="addItemRender"><type>simple</type><block>checkout/cart_item_renderer</block><template>checkout/cart/sidebar/default.phtml</template></action>
        <action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>checkout/cart/sidebar/default.phtml</template></action>
        <action method="addItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>checkout/cart/sidebar/default.phtml</template></action>
        <block type="core/text_list" name="cart_sidebar.extra_actions" as="extra_actions" translate="label" module="checkout">
        	<label>Shopping Cart Sidebar Extra Actions</label>
        </block>
    </block>

 

Community Poll

File: poll.xml

<block type="poll/activePoll" name="right.poll">
    <action method="setPollTemplate"><template>poll/active.phtml</template><type>poll</type></action>
    <action method="setPollTemplate"><template>poll/result.phtml</template><type>results</type></action>
</block>

 

Popular Tags

File: tag.xml

<reference name="left">
    <block type="tag/popular" name="tags_popular" template="tag/popular.phtml"/>
</reference>

 

PayPal logo

File: paypal.xml

<block type="paypal/logo" name="paypal.partner.right.logo" template="paypal/partner/logo.phtml"/>

 

Newsletter

File: newsletter.xml

<block type="newsletter/subscribe" name="newsletter" as="newsletter" template="newsletter/subscribe.phtml"/>

 

 

Locating Magento sidebar modules, 4.0 out of 5 based on 1 rating