2
votes

I want to display the order invoice page with a custom theme but I don't want to rewrite all of the app code associated with it (blocks, helpers, etc). Here's how it should work from a user point-of-view:

  • User goes to a custom "Order History" page with URL "../custom-account/orders/".
  • They click on the "View Invoices" link in the order history list which takes them to "../custom-account/orders/invoices/order_id/1".
  • The page loads the custom view with almost exactly the same content as "../sales/account/view/order_id/1" - but with a different look and feel (and navigation).

With the flexibility of the Magento system, this seems like something that should be really easy to achieve but I can't figure out exactly what I need to do. I really don't want to go overriding all of the various blocks and models with exactly the same functionality just to get a different UI.

Any ideas?

Thanks for any help provided...

1
Do you mean you don't want to write a whole new theme just for this functionality? Are you using a custom theme right now?Darren
I should point out that I'm only working on one module within a larger team project - haven't had much to do with the theme side of things. The theme being used is .../Local/Default/Default - the custom pages are displaying a 2-column-right layout which excludes the default navigation. If I link one of the built-in pages (such as the View Order page) it displays the original 2-column-left layout with default navigation. Ideally, all I want to do is use a slightly modified *.phtml file from the core version.Zac Seth

1 Answers

3
votes

I don't know if u have figured out this yet or not. But hope this solution will help. Like u said ur using fontend/default/default/templates, u need to create a folder of same structure of the base/default/template & copy paste the files that u want to rewrite into this folder. DO the changes that u want to do. Magento should read this file instead of the base/default/tmeplate

But if ur using a theme already the try to do this thing in ur app/design/frontend/default//templates

if u have a layout problem of 2-col-left & 2-col-right. then I would suggest check it in ur frontend/default/default/layout/sales.xml check for tag then u need to write this code

<reference name="root">
                 <action method="setTemplate"><template>page/<layout_file_name>.phtml</template></action>
</reference>

Ideally this should run on 2-col-left layout.

Hope this helps & let me know if I helped you

:)SAM