VP-ASP :: Shopping Cart Software

Shopping Cart Software Solutions for anywhere in the World

US/Canada(Toll Free): +1 888 587 2278
Europe/UK: +44 (020) 7193 9408
Australia/New Zealand: +61 3 9016 4497

VP-Cart StoreFront Customer Forum

Home | Profile | Register | Active Topics | Members | Search | FAQ
Save Password
Forgot your Password?

 All Forums
 VPCart Forum
 Problems and bugs
 Bug in Tax processing w/discount- I think ?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

15 Posts

Posted - July 18 2006 :  08:31:33  Show Profile  Reply with Quote
I'm a newbie with VPASP so maybe I'm missing something here - but here it goes.

Here's the setup:
coupon with % discount
Order going to state with tax

buy any item and get to checkout page.

if you have something populated in xtaxexcludeproducts (i.e. gift certificate value 99999)- then tax is calculated on total order value.
if xtaxexcludeproducts is null - then tax is calculated on discounted value.

this is regardless of the xtaxdiscount setting - being set to Yes or No and NO tex excluded item is in the cart.

Seems to me - when you check if the config is setup for any tax exclude items and then recalculate the new subtotal you do not re-apply the discount value. you only apply the tax on the recalculated subtotal.

Let me know what you think !

Starting Member

15 Posts

Posted - July 19 2006 :  10:51:32  Show Profile  Reply with Quote
Can I get an answer from support ?
I'm about to go live with my site and need to understand the fix.
I'll reiterate the problem 1 more time.

running 6.08 version of VPASP - windows based.

I have an order that is going to be charged sales tax sitting in the cart. I have a discount coupon applied for a percentage discount. If I have my system configured for tax free gift certificates (as it should be - xtaxexcludecategories=99999) - then when the system calculates sales tax - it calculates it against the pre-discounted total (which is wrong!) - it should calculate tax on the post discounted total. All I did was change the xtaxexcludecategories setting ( xtaxexcludecategories=NULL) then the tax calculated properly. I did not change the xtaxdiscount setting at all - between the 2 tests.

I believe the bug resides in the apply tax code that checks to see if the system is configured anywhere to allow for tax free/excluded categories or products (which it is ! in the case of the gift certificate setup) and then proceeds to check and see if there are any tax free items in the cart (which there are NOT) and recalculates the order total and then applies tax - but it does not reduce the order total by the discount of the coupon (which IS already accepted) prior to assessing and applying the tax value.

I could fix the code myself - but this is a base codeline bug that should be remediated by the product author. There should also be a notification to all 6.08 users as there open stores would be over charging tax on their currrent sales - if this scenario should occur.
Go to Top of Page


4287 Posts

Posted - July 19 2006 :  22:44:52  Show Profile  Visit support's Homepage  Reply with Quote

Please try applying the following fix:

Open your shoptax.asp file

Locate the TaxCalculatenewsubtotal sub routine on approximately line 227

Find line 249
arrCart = getsessa("cartarray")

Below this line add
dim oldsubtotal
oldsubtotal = newsubtotal

Now find approximately line 271 - 272

if foundproduct=false then
Newsubtotal=newsubtotal + ProdQuantity* ProdPrice

replace this with

if foundproduct=false then

Unfortunately sometimes some coding bugs do get past us. If you do happen to find a bug in the software, please let as know in the helpdesk at http://www.vpasp.com/virtprog/helpdesk. This will ensure that our support and development teams get the report of the bug as soon as possible.

Thank you

VP-ASP Support
Go to Top of Page

Starting Member

15 Posts

Posted - July 20 2006 :  00:50:27  Show Profile  Reply with Quote
Dean - Thanks for the patch. I do believe that the switch for Tax Discounts or not (xtaxdiscounts Yes/No)- is still not working. Doesn't seem to have an effect on then cart in either setting. Not a showstopper as we don't tax discounts anyhow - just thought I would mention.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000