Try the Demo

Magento

eCommerce Software for Online Growth

Magento Forum

Our new hosted solution for small & emerging businesses
   
Override a default template without creating a new theme
 
TioSolid
Jr. Member
 
Total Posts:  28
Joined:  2008-11-07
 

Hi, I need to override the default sales/orders/history.phtml template, but how can I do that without creating a whole new theme or replacing the default magento file?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Shahid Sarvani
Member
 
Avatar
Total Posts:  63
Joined:  2009-08-05
 

You can use the following lines in your module layout file to override the above template:

<yourmodule_sales_index>
<reference name="sales.order.history">
<action method="setTemplate"><template>yourmodule/history.phtml</template></action>
</reference>
</yourmodule_sales_index>

The sales.order.history is the name of actual history.phtml reference which you can find out in sales.xml.

 Signature 

Shahid
My blog for magento questions and answers

 
Magento Community Magento Community
Magento Community
Magento Community
 
atoz
Jr. Member
 
Total Posts:  5
Joined:  2010-01-17
Trivandrum
 

Hello, If I want to modify the success page then how can I do that . I am new to magento so please give me the exact way.
I have tried it exactly what you have explained above but i couldn’t got correctly. So please help. I am finding great difficulty in dealing with the placing of xml files and tags downer
Pleas help confused

 Signature 

 
Magento Community Magento Community
Magento Community
Magento Community
 
Shahid Sarvani
Member
 
Avatar
Total Posts:  63
Joined:  2009-08-05
 

Can you please share your code, so I can see and help you?

 Signature 

Shahid
My blog for magento questions and answers

 
Magento Community Magento Community
Magento Community
Magento Community
 
atoz
Jr. Member
 
Total Posts:  5
Joined:  2010-01-17
Trivandrum
 

thank you for your kind reply.

here you can find my config.xml http://pastebin.com/Lkr6ScD1

And created the following folder structure

\magento\app\design\frontend\default\EsrTemplate\template\EsrPaymentModule\Onepage\success.phtml

and

C:\xampp\htdocs\magento\app\design\frontend\default\EsrTemplate\layout\EsrPaymentModule.xml

and the xml is here --- http://pastebin.com/4sdvAN6T

Thanx in advance..................

 Signature 

 
Magento Community Magento Community
Magento Community
Magento Community
 
atoz
Jr. Member
 
Total Posts:  5
Joined:  2010-01-17
Trivandrum
 

Hai all I sorted it out .
thanx.. grin

 Signature 

 
Magento Community Magento Community
Magento Community
Magento Community
 
Mike Plant
Jr. Member
 
Total Posts:  11
Joined:  2008-05-06
 

Atoz,

Can you explain how you handled it?

I want to override the billing.phtml file for Onepage Checkout because I want to add a field to the form.

I was thinking maybe I should use the existing billing.phtml file and copy it on my module setup and insert my line of code? Does that sound right or should I just use my own files for this and reference them as mentioned above.

I was hoping you would share your steps to success with doing this.

Thanks,
Mike

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top
 
© Copyright 2012 Magento Inc.
Privacy Policy|Terms of Service
Magento Community Count
701238 users|667 users currently online|497075 forum posts