0

I have a order timeline page on frontend at :

/magento/app/design/frontend/default/mytheme/template/sales/order/info.phtml

I am trying to use the same page on adminhtml, from sales -> orders on a single view order page I am creating a hyperlink on click of that I would like to show a popup that will display the timeline same as displayed on frontend page of info.phtml. Can I use the same template info.phtml I have in frontend or I have to create one more for backend? also any ideas how to approach this? thanks

I have created a black in

magento/app/design/adminhtml/default/default/layout/sales.xml and added the template code of info.phtml in timeline.phtml

    <adminhtml_sales_order_timeline>
        <block type="adminhtml/sales_order_timeline" name="timeline_tracking" template="sales/order/view/timeline.phtml"></block>
    </adminhtml_sales_order_timeline>

Edit :

The request is going to the controller :

 public function timelineAction()
    {
        $this->loadLayout();
        $this->renderLayout();
    }

which loads the following layout :

    <adminhtml_sales_order_timeline>
                <remove name="header" />
                <remove name="footer" />

                <block type="adminhtml/sales_order_timeline" name="sales_order_timeline" template="sales/order/timeline/timeline.phtml" />
    </adminhtml_sales_order_timeline>

this removes the header and footer but this is not displaying the content of the template timeline.phtml, I have not done any other configurations for block, what am I missing?

Naveen
  • 773
  • 3
  • 17
  • 40
  • Perhaps this helps: http://stackoverflow.com/questions/9755621/sharing-template-between-frontend-and-backend-admin-or-adminhtml-in-magento – Oktay Acikalin Mar 25 '15 at 08:23

1 Answers1

0

your Admin layouts will look for the phtmls inside adminhtml/ folder and not the frontend/ folders. What you can do is copy the info.phtml inside your adminhtml/default/default/template/your_folder_name and include that in your adminhtml layout.

Mihir Bhende
  • 8,677
  • 1
  • 30
  • 37