| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | Mark Forums Read | User manuals | Login |
Discount Coupons and Tax Calculation | ||||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
Discount Coupons and Tax Calculation
Can anyone help me modify my discount coupon and tax calculation for xcart ver. 3.4.8
Xcart seems to still base sales tax on the price before the coupon. For example, a customer makes a $100 purchase and applies a 10% discount coupon. Currently Xcart calculates sales tax based on $100 instead of $90. I would like it calculate the tax on the total after the discount is applied. I have had a few customers notice this and complain that I'm overcharging. They are right! I use Canadian Tax system GST & PST . If anyone knows how to correct this that would be great. Thanks Mike |
|||||||
#2
|
|||||||
|
|||||||
You're best bet is to look at the 2 functions func_calculate_single and func_calculate and see if its doing the tax calculation before the discount
In the version i have it does the discount before the taxes (or atleast the comments say so) I don't have access to the version of cart that you are using, but if you have trouble, you can e-mail me your func.php and i can take a look.
__________________
Mod King |
|||||||
#3
|
|||||||||
|
|||||||||
Let's keep this forum for finished mods only please. This is a better post for Order Management or Storefront Management.
That said, I would love to know the answer as well, but hopefully a moderator will move it back once we have modified code to share. |
|||||||||
#4
|
|||||||
|
|||||||
I made an attempt to fix it, and sent it to him for testing.
If it works i'll post the fix.
__________________
Mod King |
|||||||
#5
|
|||||||||
|
|||||||||
That would be great.
The idea is try to keep this forum clean and free of requests that should be posted in the other areas dedicated to Q & A. Tested and complete solutions are always welcome. |
|||||||||
#6
|
|||||||
|
|||||||
that is totally understandable, i'll watch before I post next time.
But from what i looked at. It appears that they calculate a taxable total for all 3 types tax, gst, pst then they only subtract the discount from the shipping_total and total instead of those 3 values. So I added some code to subtract discount and coupon discount from all three of those. Hopefully it works properly.
__________________
Mod King |
|||||||
#7
|
|||||||||
|
|||||||||
Should really be an option in the admin. Check boxes to enable various taxes on discounts.
I've suggested it to X-cart before, I hope it makes it into future builds. |
|||||||||
#8
|
|||||||
|
|||||||
I'm really surprised it isn't. It seems logical to not tax the discounted amount.
__________________
Mod King |
|||||||
#9
|
|||||||
|
|||||||
Here's the fix i did that seemed to work.
I didn't post the whole function, but here is part of it. I am not sure what versions everyone is using, but this is the fix to mixmans its in ./funch.php around line 731 for his, in the function func_calculate_single I put comments in where i added some lines so everyone can see the change. Code:
__________________
Mod King |
|||||||
#10
|
|||||||
|
|||||||
discount coupons and taxes
Hi Mod King,
Thanks for solving the problem. It is calculating everything correctly. Job well done!!! To adpboss; I got your message and will stick to recommended forums. Regards, Mixman |
|||||||
|
Thread Tools | Search this Thread |
|
|
|
|||
X-Cart forums © 2001-2020
|