View Single Post
  #73  
Old 05-03-2004, 08:04 AM
 
jeremye jeremye is offline
 

Senior Member
  
Join Date: Apr 2004
Location: Philadelphia, PA
Posts: 158
 

Default

I made a few customizations to this after I noticed that this custom order invoice does not display discounts and/or coupon code (gift certificate) discounts. In /skin1/orders/invoice.tpl, I added:

Code:
{if $order.discount gt 0} <tr> <td width="600" height="1" colspan="5" bgcolor="#E1E1E1"> <p align="right" style="margin-right: 5"><font size="2"> Discount:</font></td> <td width="92" align="left" height="1" bgcolor="#E1E1E1"> <font size="2">{include file="currency.tpl" value=$order.discount}</font></td> <td width="314" align="center" height="1"></td> </tr> {/if} {if $order.coupon_discount gt 0} <tr> <td width="600" height="1" colspan="5" bgcolor="#E1E1E1"> <p align="right" style="margin-right: 5"><font size="2"> Gift Cert.:</font></td> <td width="92" align="left" height="1" bgcolor="#E1E1E1"> <font size="2">{include file="currency.tpl" value=$order.coupon_discount}</font></td> <td width="314" align="center" height="1"></td> </tr> {/if}

Put that immediately before:

Code:
<tr> <td width="600" height="1" colspan="5" bgcolor="#E1E1E1"> <p align="right" style="margin-right: 5"><font size="2"> Shipping:</font></td> <td width="92" align="left" height="1" bgcolor="#E1E1E1"> <font size="2">{include file="currency.tpl" value=$order.shipping_cost}</font></td> <td width="314" align="center" height="1"></td> </tr>

That will only show the discount or gift certificate if one exists. It tested fine for me.

Jeremy
__________________
Jeremy
X-Cart Gold v3.4.14 [Linux/Apache]
Heavily Modded
Reply With Quote