Knowledge Base How do I display the On Sale coupon data or...

How do I display the On Sale coupon data or sale information on the customers invoice?

Author Bill Brewer
Created 05-14-2009 11:27 pm
Last Modified 07-25-2013 05:14 pm
If you are using a version of On Sale prior to 1.2 you will need to update to the latest version.

Make the following changes

1. Open <skin>/mail/html/order_data.tpl

Find this code near line 122:

{if $ and $order.coupon_type eq "free_ship"} <tr> <td align="right" height="20"><b>{$lng.lbl_coupon_saving} ({$}):</b> </td> <td align="right">{include file="currency.tpl" value=$order.coupon_discount} </td> </tr> {/if}
If you are using version 4.3.x or higher find this code:

{if $ and $order.coupon_type ne "free_ship"} <tr> <td {if $is_nomail eq 'Y'}class="invoice-total-name"{else}style="padding-right: 3px; height: 20px; width: 100%; text-align: right;"{/if}><strong>{$lng.lbl_coupon_saving} ({$}):</strong></td> <td {if $is_nomail eq 'Y'}class="invoice-total-value"{else}style="white-space: nowrap; padding-right: 5px; height: 20px; text-align: right;"{/if}>{include file="currency.tpl" value=$order.coupon_discount}</td> </tr> {/if}
Immediately after insert:

{*** On Sale :: ***} {if $order.onsale_data && $active_modules.alteredCart_On_Sale} {include file="modules/alteredCart_On_Sale/onsale_order_data.tpl" onsale_data=$order.onsale_data} {/if} {*** On Sale :: ***}

2. Open include/func/func.order.php

If using X-Cart 4.1.x - 4.4.x Find this code near line 384:

if (!empty($active_modules['Google_Checkout']))       include $xcart_dir."/modules/Google_Checkout/get_order_data.php";
If using version 4.5.x or greater find this code near line 845:

 $order['can_get_info'] = func_order_can_get_info($orderid);
Immediately after insert:

// On Sale :: // if ($active_modules['alteredCart_On_Sale']){       require $xcart_dir."/modules/alteredCart_On_Sale/onsale_orders.php";       $order['onsale_data'] = $onsale_data; } // End On Sale //

Was this article helpful?


Still Have Questions?

Let Us Help You

My Account