Magento: Move Related Products to centre column in Modern theme
The modern theme made available by the good folks at Varian for their free e-commerce product Magento is a great template and a good starting point for anyone looking to customise magento for their own look and feel. However, the default layout has the Related products block in the left hand menu which unless you have very long product descriptions can leave the page unbalanced.
These instructions will move the block to to the centre under the product descriptions.
You can see this at work here on a <a href=”http://www.cl-floraldesigns.co.uk”>wedding flowers</a> site.
In catalog.xml find
<reference name=“right”> <block type=“catalog/product_list_related” name=“catalog.product.related” before=“-”template=“catalog/product/list/related.phtml”/> </reference>
Remove or comment out
<block type=“catalog/product_list_related” name=“catalog.product.related” before=“-”template=“catalog/product/list/related.phtml”/>
Change the following to include the above…
<block type=“core/template_facade” name=“product.info.container2″ as=“container2″> <action method=“setDataByKey”><key>alias_in_layout</key><value>container2 </value> </action> <action method=“setDataByKeyFromRegistry”><key>options_container</key> <key_in_registry>product</key_in_registry></action> <action method=“append”><block>product.info.options.wrapper</block></action> <action method=“append”><block>product.info.options.wrapper.bottom</block> </action> </block> <action method=“unsetCallChild”><child>container1</child><call>ifEquals</call> <if>0</if><key>alias_in_layout</key><key>options_container</key></action> <action method=“unsetCallChild”><child>container2</child><call>ifEquals</call> <if>0</if><key>alias_in_layout</key><key>options_container</key></action> </block> <block type=“catalog/product_list_related” name=“catalog.product.related” after=“-”template=“catalog/product/list/related.phtml”/> </reference>
Note the use of after=“-” instead of before=“-”
You may need to restyle it depending on your layout.
Rock solid speed and reliability
Robust, reliable, fully backed up, secure UK based Magento hosting for £175 per year. Full details here or Contact us
Share this:
Related posts:
This entry was posted by admin on January 1, 2010 at 12:00 pm, and is filed under Magento. Follow any responses to this post through RSS 2.0.You can leave a response or trackback from your own site.
-
By default, Magento removes related products from the product page when you have the [related] product in your cart already.
Related product also rely on the same visibility queries as regular products; the related product must be enabled, visible in search or category or both and in stock or not stock controlled. Otherwise the related product will not be visible.
Also don’t forget to clear your cache and possibly re-index.
-
- Notes on Magento benchmarking..
- Magetno fix : Cant add products to admin create order
- Magento fix : Invalid method Mage_Wishlist_Model_Item::canConfigure(Array
- Create a multi-store setup in Magento
- Magento fix: Fatal error: Method Varien_Object::__tostring() cannot take arguments in /magento/lib/Varien/Object.php
- Magento fix : Local file doesn’t exist
- Magento tip: after upgrade prices on product page simple product are gone……
- Add attribute to Grid or List view
- Magento tip : add Google Checkout button to side bar shopping cart
- Magento Tip: Add simple product url to grouped product items

Hi There,
I have an issue with Relate products.
Example:
Product 1 (Category 1)
Product 2 (Category 1)
Product 3 (Category 1)
I have three products in my store. I have added the product 2 and product 3 as related product for product 1 in admin section. I did same with all products. Product 2 having its related product as product 1 and product 3. Product 3 having its related products as product 1 and product 2. I did all in admin section. But in products detail page all the two product are not visible.
On product 1 details page both the other two are visible as related products. But for product 2 only product 3 is visible in related product and for product 3 only 2 is visible.
I can’t understand the magento behaviour for related products. On which logic it shows related product in related product section in frontend.
I have tried that with fresh installation. But the thing are same. I can’t see the product 1 in product 2 and product 3 details page as related products. That’s done in the admin section but does not effect the frontend.
Anybody can help me out to show the product 1 as related product for product 2 and product 3?