Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

remove discount from totals if no discount used

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #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
  #2  
Old 01-21-2004, 06:49 PM
  leon's Avatar 
leon leon is offline
 

X-Wizard
  
Join Date: Mar 2003
Location: Costa Rica
Posts: 1,213
 

Default

Thats nice shan, could you give the code to the developers so they can add it to the next release ?
__________________
It doesn\'t matter what is done... it is how it is done.
=============================
XCart Version: 3.5.3 -> Dmcigars.com
XCart Version: 4.1.3....
Reply With Quote
  #3  
Old 01-22-2004, 05:12 AM
  adpboss's Avatar 
adpboss adpboss is offline
 

X-Man
  
Join Date: Feb 2003
Location: Ontario, Canada
Posts: 2,389
 

Default

You will also want to clean up your print and email invoices wherever possible.

I find that the Coupon and Discount fields in the invoices leave the customer feeling like they missed some kind of pricing advantage when they ordered.

Change the Discount and Coupon Display in mail.order_data.tpl to

Code:
{if $order.discount ne "0.00"}{$lng.lbl_discount}: {include file="currency.tpl" value=$order.discount}{/if} {if $order.coupon ne ""}{$lng.lbl_coupon_saving}: {include file="currency.tpl" value=$order.coupon_discount} ({$order.coupon}){/if}

I do the same with my taxes (Canada) because we have 2 and it only serves to confuse US and UK customers (to which they do not apply). 1 less Customer Service email to answer is one less headache.
Reply With Quote
  #4  
Old 01-23-2004, 06:33 AM
 
ylenyon ylenyon is offline
 

Member
  
Join Date: Oct 2003
Posts: 17
 

Default thanks

Thanks for the mod. Just a reminder for everyone to also change the template in the mail/html section if you are using html mail notifications. Same code, just placed around the html table tags.
Reply With Quote
  #5  
Old 05-29-2004, 10:46 PM
 
GM GM is offline
 

eXpert
  
Join Date: Mar 2004
Location: Canada
Posts: 293
 

Default

I think Shan & adpboss (among others) should be on the design team for XCART
Have you ever noticed that they work good together? Adpboss is also good at destroying speedbars! Don't even mention the word speedbar around him... missles come out of his shoulders and he destroys them! This post deserved to be bumbed to the top again, it should be standard cart issue, nice work guys!
__________________
v. 4.0.14 (GM Style)
O.S. Linux
Build Your Own Diamond Ring
Reply With Quote
  #6  
Old 09-15-2004, 06:51 AM
 
24md 24md is offline
 

Advanced Member
  
Join Date: Jul 2003
Location: United Kingdom
Posts: 44
 

Default

Lovely little mod to help tidy up xcart and make it look a bit neater. Thanks a million.
__________________
www.anime-on-line.com
4.5.2 (live)
php 5.3.17
mysql 5.5.27
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 07:06 AM.

   

 
X-Cart forums © 2001-2020