I am creating custom module for RMA(product return) in magento that's why I am trying to add a custom link "Return Request" in My Orders panel in customer account section as shown in below image- enter image description here

For that I have created module "Assel_Rma" which have some files as below-


<?xml version="1.0" encoding="UTF-8"?>


<?xml version="1.0"?>
<layout version="0.1.0">

    <sales_order_history translate="label">
        <label>Customer My Account Order History</label>
        <update handle="customer_account"/>
        <reference name="my.account.wrapper">
            <action method="setTemplate">
          <block type="customer/account_dashboard" name="customer.account.link.back" template="customer/account/link/back.phtml"/> 
        <reference name="left">
            <remove name="catalog.shopby"/>
            <remove name="basenews"/>
            <remove name="bestsales"/>
            <remove name="left-block-banner-free"/>
            <remove name="blogleft" /> 



class Assel_Rma_Block_Sales_Order_History extends Mage_Sales_Block_Order_History

After doing all above now "My Orders" looks like as below-

enter image description here

In above image my sidebar gets doubled and nothing is shown on the page. can anyone please help me to get rid out of this problem.

1 Answer 1


change rewrite code in xml


you have to set template from block as it is set in Mage_sales_Block_Order_History.

public function __construct()

        $orders = Mage::getResourceModel('sales/order_collection')
            ->addFieldToFilter('customer_id', Mage::getSingleton('customer/session')->getCustomer()->getId())
            ->addFieldToFilter('state', array('in' => Mage::getSingleton('sales/order_config')->getVisibleOnFrontStates()))
            ->setOrder('created_at', 'desc')


        Mage::app()->getFrontController()->getAction()->getLayout()->getBlock('root')->setHeaderTitle(Mage::helper('sales')->__('My Orders'));
  • thanks for the reply @ Qaisar..I have added that _construct() function in my block file but no luck even I have cleared cache. Oct 28, 2015 at 12:20
  • did you remove it from xml? Oct 28, 2015 at 12:21
  • Sorry but what I need to remove from xml.? Oct 28, 2015 at 12:23
  • when you set it from block what you need xml for? do it from one place Oct 28, 2015 at 12:23
  • Ok. I removed code from xml so now sidebar comes only once but page still show empty. Oct 28, 2015 at 12:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.