X hide

Magento Print Order Confirmation As Guest v1.x Developer's Guide & API Reference

From Plumrocket Documentation


You are viewing:  Print-order-confirmation-as-guest-32.png  Print Order Confirmation As Guest

Order Success Page Template Management

After 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.


Information Sign sm.png Step-by-Step action:
  1. Press the “System” tab in the menu.
  2. Select “Configuration”.


Configure Newsletter Popup0.png


Information Sign sm.png Step-by-Step action:
  1. Select "Print Order Confirmation As Guest" in the menu Configuration.
  2. Replace Order Success Page Templates: Set it to "No" if you want to keep your existing order success page template.


Print Order Confirmation API Settings.png


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;?>


Attention green.png 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 .
Navigation