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

Help adding another subtotal calculation

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 03-30-2009, 08:03 AM
 
mmoskva mmoskva is offline
 

eXpert
  
Join Date: Aug 2005
Location: Pennsylvania
Posts: 306
 

Default Help adding another subtotal calculation

On the cart/order pages the subtotal is displayed by:
{include file="currency.tpl" value=$cart.display_subtotal}
{include file="currency.tpl" value=$order.subtotal}


How do I add another calculation for SUBTOTAL (call it) SUBTOTALGC?


ex.
subtotalgc, would take the subtotal and also subtract any ⌠discount/coupon■ that was submitted.

IF customer has:

subtotal = $20.00
disount/coupon = -$2.00

THEN

subtotalgc =$18.00



------------
so I would have an additional field created:
{include file="currency.tpl" value=$cart.display_subtotalgc}
{include file="currency.tpl" value=$order.subtotalgc}
------------
__________________
x-cart 4.0.16v
linux server
Reply With Quote
  #2  
Old 03-31-2009, 03:21 AM
  Victor D's Avatar 
Victor D Victor D is offline
 

X-Adept
  
Join Date: Aug 2008
Posts: 643
 

Default Re: Help adding another subtotal calculation

Something like this
Code:
{if $cart.discount_coupon gt 0} {assign var=display_subtotalgc value=$cart.display_subtotal-$cart.discount_coupon} {include file="currency.tpl" value=$display_subtotalgc} {/if}
__________________
Regards,
Victor Dubiniuk

X-Cart Skins Store
- twenty two different skins for 4.1.x and 4.2.x;
- 4.3.x compatible versions are available;
- refresh you store now!

Smart menu X-Cart add-on for 4.1.8 - 4.3.x
Featured Products Slide Show X-Cart add-on for 4.1.8 - 4.3.x
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



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 03:19 AM.

   

 
X-Cart forums © 2001-2020