Categories

Featured templates

Magento. How to change blocks order

Judy Waters November 18, 2015
Rating: 5.0/5. From 5 votes.
Please wait...

This tutorial shows how to change blocks order in Magento templates.

Magento. How to change blocks order

Sidebar blocks can be rearranged in one of the template files. Use either FTP or hosting cPanel to reach it. Open the following file on server /app/design/frontend/tm_themes/themeXXX/layout/local.xml. Use any HTML editor to check its content, locate the following piece of code:

    
            
                simplecheckout/cart_item_renderer
                groupedcheckout/cart_item_renderer_grouped
                configurablecheckout/cart_item_renderer_configurable
                
                    
                
            
        
    

Update the reference name to be :

Magento_How_to_change_blocks_order_1

This allows using before="-" and after="-" tools to reorder the sidebar blocks. Insert the actual block name instead of hyphen.

Let’s reorder ‘Shop By’ and ‘My Cart’ blocks as an example:

  1. Locate the following line in the local.xml file: checkout/cart_sidebar" name="cart_sidebar" template="checkout/cart/sidebar.phtml" before="-">

    before="-"is the value to update.

  2. Specify if you want to have cart before or after the Shop By filter. Let’s put it after Shop By filter. Code should be eventually updated as follows:

    Magento_How_to_change_blocks_order_2

The same values can be changed for other sidebar blocks. Update the file once all modifications are applied.

Note: you might need to rebuild the index and clear cache to apply the changes.

Get back to the category page and refresh it. Sidebar blocks have been successfully reordered.

Feel free to check the detailed video tutorial below:

Magento. How to change blocks order

Magento Templates
This entry was posted in Magento Tutorials and tagged block, Magento, order. Bookmark the permalink.

Submit a ticket

If you are still unable to find a sufficient tutorial regarding your issue please use the following link to submit a request to our technical support team. We'll provide you with our help and assistance within next 24 hours: Submit a ticket