Reputation: 325
I'm currently developing a payment module, which is already working fine, even managed to override the success email template, however I can't seem to be able to put some simple additional info onto the checkout succes page.
I've been trying to find this for hours but none of the solutions I've found are complete in describing where exactly to put which file. And what to write in the xmls.
Thanks
Upvotes: 0
Views: 1486
Reputation: 23205
Why override a template when you can add your block via the layout system (which is how the normal content is added as well)?
Define a layout XML file for your module if you haven't already:
<frontend>
<layout>
<updates>
<your_module module="Your_Module">
<file>your/module.xml</file>
</your_module>
</updates>
</layout>
</frontend>
Use your layout file (app/design/frontend/base/default/layout/your/module.xml) to add a block to the and layout update handles. Example:
<?xml version="1.0"?>
<layout>
<a_handle_for_you>
<reference name="content">
<block type="core/text" name="yourblock">
<action method="setText">
<arg>You should see this text.</arg>
</action>
</block>
</reference>
</a_handle_for_you>
<checkout_onepage_success>
<update handle="a_handle_for_you" />
</checkout_onepage_success>
<checkout_multishipping_success>
<update handle="a_handle_for_you" />
</checkout_multishipping_success>
</layout>
The above layout instructions should add content to the success pages for both the onepage and multishipping processes.
Upvotes: 3