X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Help adding another subtotal calculation (https://forum.x-cart.com/showthread.php?t=46631)

mmoskva 03-30-2009 08:03 AM

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}
------------

Victor D 03-31-2009 03:21 AM

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}



All times are GMT -8. The time now is 08:40 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.