Order Success Page Template Management
After the Magento Confirmation Order Print extension is installed, it is necessary to choose if you would like to replace your order success page template with this extension template to display the “print” link for guest customers or leave your existing template. To set this option properly, please follow the steps below.
Step-by-Step action:
- Press the “System” tab in the menu.
- Select “Configuration”.
Step-by-Step action:
- Select “Print Order Confirmation As Guest” in the menu Configuration.
- Replace Order Success Page Templates: Set it to “No” if you want to keep your existing order success page template.
Now, if you want to edit the template yourself (for its proper functioning with this Magento print invoice module) – you will need to find the following file:
/app/design/frontend/YOUR_THEME/default/template/checkout/success.phtml
(where "YOUR_THEME" is the name of your theme)
In the file please locate the following part of the code:
<?php if ($this->getCanViewOrder() && $this->getCanPrintOrder()) :?>
<p>
<?php echo $this->__(
'Click <a href="%s" onclick="this.target='_blank'">here to print</a>
a copy of your order confirmation.', $this->getPrintUrl()) ?>
<?php echo $this->getChildHtml() ?>
</p>
<?php endif;?>
Once you found the above part of the code – replace it with the following code:
<?php if ($this->getCanViewOrder() && $this->getCanPrintOrder() ||
$this->helper('guestprintorder')->moduleEnabled()) :?>
<p>
<?php echo $this->__(
'Click <a href="%s" onclick="this.target='_blank'">here to print</a>
a copy of your order confirmation.', $this->getPrintUrl()) ?>
</p>
<?php endif;?>
<?php if ($this->getCanViewOrder() && $this->getCanPrintOrder()) :?>
<p>
<?php echo $this->getChildHtml() ?>
</p>
<?php endif;?>
Important Information:
Note: If you’re using extensions that modify the order success page – the above mentioned changes should be also applied to according templates of that extensions. You can find the needed files for making the changes by enabling template path hints. The information for enabling hints can be found here.