Magento – Compare / Product Comparison / Compare to move from right to left

Picture

Who or Compare. Compare the box with the likes of right to left or vice versa, of course, would also move, is a high probability for the layout / XML files will find it.

In our example this file catalog.xml in the directory app / design / frontend /[base or default]/IhrTemplate/layout responsible. It looked like this (as. Line 40):

<!--
Default layout, loads most of the pages
-->

<default>

<!-- Mage_Catalog ->
<reference name="top.menu">
<block type="catalog / navigation" name ="catalog.topnav" template ="catalog/navigation/top.phtml"/>
</reference>
<reference name="left">
<block type="core/template" name ="left.permanent.callout" template ="callouts/left_col.phtml">
<action method="setImgSrc"><src>images/media/col_left_callout.jpg</src></action>
<action method="setImgAlt" translate="old" module ="catalog"><old>Our customer service is available 24/7. Call us at (555) 555-0123.</old></action>
<action method="setLinkUrl"><url>checkout/cart</url></action>
</block>
</reference>
<reference name="right">
<block type="catalog/product_compare_sidebar" before="cart_sidebar" name ="catalog.compare.sidebar" template ="catalog/product/compare/sidebar.phtml"/>
<block type="core/template" name ="right.permanent.callout" template ="callouts/right_col.phtml">
<action method="setImgSrc"><src>images/media/col_right_callout.jpg</src></action>
<action method="setImgAlt" translate="old" module ="catalog"><old>Keep your eyes open for our special Back to School items and save A LOT!</old></action>
</block>
</reference>
<reference name="footer_links">
<action method="addLink" translate="title label" module ="catalog" ifconfig ="catalog/seo/site_map"><label>Site Map</label><url helper="catalog/map/getCategoryUrl" /><title>Site Map</title></action>
</reference>
<block type="catalog/product_price_template" name ="catalog_product_price_template" />
</default>

The bold areas defined here, what on which page or. which will appear in navigation bar. For the comparison list is the section

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

responsible. This must be so either by “right” Area after “left” be moved or copied. Probably would be a sensible move, However, if you work with only two NavBars, this matter would be.

The new code would look like this:

<!--
Default layout, loads most of the pages
-->

<default>

<!-- Mage_Catalog ->
<reference name="top.menu">
<block type="catalog / navigation" name ="catalog.topnav" template ="catalog/navigation/top.phtml"/>
</reference>
<reference name="left">
<block type="core/template" name ="left.permanent.callout" template ="callouts/left_col.phtml">
<action method="setImgSrc"><src>images/media/col_left_callout.jpg</src></action>
<action method="setImgAlt" translate="old" module ="catalog"><old>Our customer service is available 24/7. Call us at (555) 555-0123.</old></action>
<action method="setLinkUrl"><url>checkout/cart</url></action>
</block>
<block type="catalog/product_compare_sidebar" before="cart_sidebar" name ="catalog.compare.sidebar" template ="catalog/product/compare/sidebar.phtml"/>
</reference>
<reference name="right">
<block type="core/template" name ="right.permanent.callout" template ="callouts/right_col.phtml">
<action method="setImgSrc"><src>images/media/col_right_callout.jpg</src></action>
<action method="setImgAlt" translate="old" module ="catalog"><old>Keep your eyes open for our special Back to School items and save A LOT!</old></action>
</block>
</reference>
<reference name="footer_links">
<action method="addLink" translate="title label" module ="catalog" ifconfig ="catalog/seo/site_map"><label>Site Map</label><url helper="catalog/map/getCategoryUrl" /><title>Site Map</title></action>
</reference>
<block type="catalog/product_price_template" name ="catalog_product_price_template" />
</default>

It should be noted, of course,, that the code will not be pushed as a separate block to another block, but either before or after that should be inserted.

Then clear the cache (mglw. In addition, browsers) Compare and has jumped from right to left.

Used in 1.4.1.1

Published by Covos

Since 2009 I have been working intensively with Magento. I started with the creation and operation of B2C stores. This was extended through my work in the logistics sector. This resulted first specialized B2E systems. Today I work day-a day with exciting B2C, B2B- and B2E projects and reports in this blog about challenges and give insider tips.

Leave a Reply

Your email address will not be published. Required fields are marked *