Default of VP-ASP is applying the tax after discounts, as below
Eg.
Product A: USD 100
Tax: 10%
Discount/Coupon: USD 20
So the tax will be
(USD 100 - USD 20) * 10% = USD 8
Total charged amount: (USD 100 + USD 8 - USD 20) = USD 88
But some merchants might be interesting on how to apply the tax before discounts, as below:
Eg.
Product A: USD 100
Tax: 10%
Discount/Coupon: USD 20
So the tax will be
USD 100 * 10% = USD 10
Total charged amount: (USD 100 + USD 10 - USD 20) = USD 90
By applying the tax before discounts, please do the following changes:
1. Using your preferred text or HTML editor, open the file shoptax.asp
2. Locate the following code : from line 264 to line 275, within routine sub TaxCalculatenewsubtotal (newsubtotal)
'6.50.4 Bugs Fix - 08 October 2008
if GetSess("discount") <> "" then
if isnumeric(GetSess("discount")) and newsubtotal > 0 then
newsubtotal = newsubtotal - GetSess("discount")
end if
end if
if GetSess("coupondiscount") <> "" then
if isnumeric(GetSess("coupondiscount")) and newsubtotal > 0 then
newsubtotal = newsubtotal - GetSess("coupondiscount")
end if
end if
3. Comment the code above, as below :
'6.50.4 Bugs Fix - 08 October 2008
'if GetSess("discount") <> "" then
'if isnumeric(GetSess("discount")) and newsubtotal > 0 then
'newsubtotal = newsubtotal - GetSess("discount")
'end if
'end if
'if GetSess("coupondiscount") <> "" then
'if isnumeric(GetSess("coupondiscount")) and newsubtotal > 0 then
'newsubtotal = newsubtotal - GetSess("coupondiscount")
'end if
'end if
4. Save and upload the file back to your server.