View Single Post
  #1  
Old 01-21-2004, 06:24 PM
  shan's Avatar 
shan shan is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Birmingham, UK
Posts: 6,163
 

Default remove discount from totals if no discount used

heres a simple mod that removes the discount field from the checkout if there is no discount being given.

all you have to do is open up cart_totals.tpl and replace


Code:
<TR> <TD nowrap><font class=FormButton>{$lng.lbl_discount}:</font></TD> <TD>[img]{$ImagesDir}/null.gif[/img] </TD> <TD nowrap align=right><font class=ProductPriceSmall>{include file="currency.tpl" value=$cart.discount}</font></TD> <TD nowrap align=right>{include file="customer/main/alter_currency_value.tpl" alter_currency_value=$cart.discount}</TD> </TR>

with

Code:
{if $cart.discount ne 0 } <TR> <TD nowrap><font class=FormButton>{$lng.lbl_discount}:</font></TD> <TD>[img]{$ImagesDir}/null.gif[/img] </TD> <TD nowrap align=right><font class=ProductPriceSmall>{include file="currency.tpl" value=$cart.discount}</font></TD> <TD nowrap align=right>{include file="customer/main/alter_currency_value.tpl" alter_currency_value=$cart.discount}</TD> </TR> {/if}

this was done in 3.5.x but would work pretty much the same in other versions.

this is the only code added
Code:
{if $cart.discount ne 0 } Old code here {/if}
__________________
Looking for a reliable X-cart host ?
You wont go wrong with either of these.

EWD Hosting
Hands On Hosting
Reply With Quote