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)
-   -   applying coupon discount AFTER global discounts (https://forum.x-cart.com/showthread.php?t=37050)

bcddd214 01-25-2008 06:44 PM

applying coupon discount AFTER global discounts
 
We have set up global volume discounts based on cart total levels, and want to employ a coupon discount of 10%. Right now, the volume discount on orders of $300.00 or more is 10%. The coupon discount is also set at 10%.

Currently, the totals are calculated (on a $300 order) as:

SUBTOTAL: 300.00
Discount: 30.00
Discount Coupon: 30.00
DISCOUNTED SUBTOTAL: 240.00

what we want it to do is:

SUBTOTAL: 300.00
Discount: 30.00
Discount Coupon: 27.00 <--10% of 300 - 30
DISCOUNTED SUBTOTAL: 243.00

How can this be done in the code? any help would be greatly appreciated!

balinor 01-27-2008 05:37 PM

Re: applying coupon discount AFTER global discounts
 
Please don't double post...I have removed your second post on this topic.

Holub 01-28-2008 04:23 AM

Re: applying coupon discount AFTER global discounts
 
It's would be a violation because any type of discounts applying to product price at the same time, not to subtotal.
The most simple desicion without violation would be using discounts coupon with 9% not 10%. (i.e. you should decrese discount of coupons with percents of global discounts)

SUBTOTAL: 300.00
Discount: 30.00 (10%)
Discount Coupon: 27.00 (9%)
DISCOUNTED SUBTOTAL: 243.00


All times are GMT -8. The time now is 04:25 PM.

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