Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Local.xml problem
 
altoscomputers
Jr. Member
 
Total Posts:  2
Joined:  2013-04-21
 

Hi Folks,
I’m trying to change the order of two blocks in local.xml I just want to change the order of appearance for the comapre products block and the cart.  I thought it would be as simple as:

<default>

    <
remove name="left.permanent.callout" />         <!-- customer service logo -->
    <
remove name="right.permanent.callout" />     <!-- back to school -->
    <
remove name="right.poll" />             <!-- customer poll -->
    <
reference name="right">
        <
block name="catalog.compare.sidebar" before="-" />
        <
block name="cart_sidebar" before="catalog.compare.sidebar" />
    </
reference>

    </default>
but this has no effect.

So I tried:

<default>

    <
remove name="left.permanent.callout" />         <!-- customer service logo -->
    <
remove name="right.permanent.callout" />     <!-- back to school -->
    <
remove name="right.poll" />             <!-- customer poll -->
    <
reference name="right">
        <
block type="catalog/product_compare_sidebar" before="-" name="catalog.compare.sidebar" template="catalog/product/compare/sidebar.phtml"/>
        <<
block type="checkout/cart_sidebar" name="cart_sidebar" template="checkout/cart/sidebar.phtml" before="catalog.compare.sidebar" />
    </
reference>

    </default>
This displays the blocks repeated below the pair I want to edit, albeit in the right order!

Any ideas?

Cheers

Pete

 
Magento Community Magento Community
Magento Community
Magento Community
 
Lyonscg
Sr. Member
 
Avatar
Total Posts:  173
Joined:  2009-11-13
Chicago IL
 

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

This should put the cart block at the top with the compare block after it.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top