Taxes are not calculated correctly when using a coupon in hikashop and autoload

  • Posts: 165
  • Thank you received: 3
  • Hikashop Business
1 year 1 month ago #276766

-
-- HikaShop version -- : 3.1.1
-- Joomla version -- : 3.7.5
-- PHP version -- : 7.0.22

Hi, Nicolas I have discovered that when I have created a coupon and the "Auto load in cart if possible" is turned on inside a coupon it calculates a different tax amount than if that feature is turned off. I am almost 100% positive this is a bug. I spent hours looking at this.

Below is the correct calculation and price. Of the 2 items in the cart only the 50 Exterior wash tickets has a coupon of 30% and it is also the only item that is taxable amount of 6.75% of the 2 items in the cart. This is also with the "auto load in cart if possible" is turned off.




However, if I go in and turn on the "Auto load in cart if possible" for the coupon I get the below incorrect tax amount being charged.


Here are my settings for the coupon and the taxes below. I live in the United States so discounts are applied before taxes.




The calculation should be 375 x .30 = $112.5 . Then 375 - 112.5= $262.5. Then 262.5 x 0.675 = $17.72

As you notice the calculation without autoload calculates correctly. However, when the autoload the coupon is turned on it calculates the tax as $10.12. I am not sure where that number is even coming from. However, auto-loading the coupon should produce zero changes. Accidentally charging someone less tax than what they are supposed to charged can get you into major legal trouble in the United States. Please let me know how to fix this because this is a major issue for my client and I need to get this resolved as quickly as possible.



This message contains confidential information

Attachments:
Last Edit: 1 year 1 month ago by jschroeder.
The following user(s) said Thank You: PolishedGeek

Please Log in or Create an account to join the conversation.

  • Posts: 325
  • Thank you received: 94
  • Hikaauction Standard Hikashop Business
1 year 1 month ago #276841

This is a huge step forward in figuring out why taxes with coupons aren't always working correctly! Thank you. Eagerly awaiting a fix on this so USA stores will not be under collecting tax for this use case.


~ Deb Cinkus, CEO

Polished Geek LLC
eCommerce Digital Marketing & Web Development
Certified eCommerce Marketing Specialist
Certified Drip Marketing Automation Consultant
Infusionsoft Certified Partner

---- Official HikaShop Integration and Customization Partner ----

Please Log in or Create an account to join the conversation.

  • Posts: 1879
  • Thank you received: 254
  • MODERATOR
1 year 1 month ago #276846

Hello,

Thanks for you return ! We were able to reproduce the issue, and so you're right it's a bug!
Note that we will worked on this right in order to provide a fix as soon as possible.
We will notify you when we have the solution of this weird result.

Regards

The following user(s) said Thank You: PolishedGeek

Please Log in or Create an account to join the conversation.

  • Posts: 165
  • Thank you received: 3
  • Hikashop Business
1 year 1 month ago #276865

Philip wrote: Hello,

Thanks for you return ! We were able to reproduce the issue, and so you're right it's a bug!
Note that we will worked on this right in order to provide a fix as soon as possible.
We will notify you when we have the solution of this weird result.

Regards


Thank you!

Please Log in or Create an account to join the conversation.

  • Posts: 1879
  • Thank you received: 254
  • MODERATOR
1 year 1 month ago #276925

Hello,

jschroeder: Just to tell you, that we progress on this "auto load coupon" bug, we were able to reproduce your bug and have the same results than you.
But you have to know that conditions seems to be impossible for a normal user, let's explain why :
step by step for have good results :
1°) Add a product to the cart (and create by this move a new cart)
2°) Go to checkout, and add the coupon code,
=> In my case I have taxes calculation = 4.90 Euro

Now test the "auto load coupon" ,
1°) Delete the user cart (from back-end or from your account user frontend) => Reset Cart Sql table
2°) Add the product to cart and process checkout
=> the coupon "auto load" works and give me as result : 4.90 Euro

If you process with the same cart (same id and link to the same user), I mean :
- Reach checkout cart add manually coupon, remove it
- Go to back-end and change "Auto load coupon" on yes
- Go back to Front-end, and refresh the checkout cart from this same cart
=> my result for taxe calculation : 2.80 Euro

And so in normal condition this bug is quite difficult, or even impossible to reproduce but we fix it because it mean that something is wrong in our "auto load" process.
You will have the patch if you update your HikaShop.

Hope this solve your issue and awaiting feedback from you.

Regards

Last Edit: 1 year 1 month ago by Philip.

Please Log in or Create an account to join the conversation.

  • Posts: 165
  • Thank you received: 3
  • Hikashop Business
1 year 1 month ago #276931

Philip wrote: Hello,

jschroeder: Just to tell you, that we progress on this "auto load coupon" bug, we were able to reproduce your bug and have the same results than you.
But you have to know that conditions seems to be impossible for a normal user, let's explain why :
step by step for have good results :
1°) Add a product to the cart (and create by this move a new cart)
2°) Go to checkout, and add the coupon code,
=> In my case I have taxes calculation = 4.90 Euro

Now test the "auto load coupon" ,
1°) Delete the user cart (from back-end or from your account user frontend) => Reset Cart Sql table
2°) Add the product to cart and process checkout
=> the coupon "auto load" works and give me as result : 4.90 Euro

If you process with the same cart (same id and link to the same user), I mean :
- Reach checkout cart add manually coupon, remove it
- Go to back-end and change "Auto load coupon" on yes
- Go back to Front-end, and refresh the checkout cart from this same cart
=> my result for taxe calculation : 2.80 Euro

And so in normal condition this bug is quite difficult, or even impossible to reproduce but we fix it because it mean that something is wrong in our "auto load" process.
You will have the patch if you update your HikaShop.

Hope this solve your issue and awaiting feedback from you.

Regards


I am not sure what you mean by it is almost impossible for a customer to reproduce. All I have to do is have a coupon set to autoload which we almost always do and it does it for me the 1st time I go to the cart with the scenario I listed above.This is actually a fairly common scenario for our customer. I will do some testing, however, it will be Monday before I am able to because of prior work that I have to get done today. I will test and let you know if I still have the issue at that point. Thank you for the quick response back.

Thanks,

Josh

Please Log in or Create an account to join the conversation.

  • Posts: 165
  • Thank you received: 3
  • Hikashop Business
1 year 1 month ago #277087

Philip, everything seems to be working correctly from the testing I was able to complete today. I will let you know if I run into any other issue with it.

Thanks,

Josh

Last Edit: 1 year 1 month ago by jschroeder.

Please Log in or Create an account to join the conversation.

Time to create page: 0.115 seconds
Powered by Kunena Forum