Jump to content

Tax calculation bug


Recommended Posts

There is a bug with tax calculation in Prestashop 1.6. I've tested with Prestashop 1.6.0.x.

 

It is very easy to reproduce the bug and it will happen every time. Do it in this order:

 

1. Make sure that your items have a tax rule set up.

2. Make sure that you have One Page Checkout selected in preferences.

3. Make a new account, pretending that you are a new customer to the site. Do not add an address yet.

4. Add an item to the cart.

5. Start the checkout process. (you will be asked for your address since you haven't added one yet).

6. You will notice even after you have entered your address and go to the next page, the tax will be 0. Always 0. However, when you add another product to the cart, that item's tax is included. 

 

Has anyone experienced this issue? The only way I can get around this bug is to hack the theme by adding on top of order-opc.js the call updateAddressSelection(). This will update the tax, but is rather dirty as once you change themes, the fix is lost. Not ideal.

 

If a Presta dev could point out a workaround in the PHP code that would be very appreciated. We have customers purchasing items and paying the goods without tax! :/

Edited by helloworlder (see edit history)
Link to comment
Share on other sites

There is a bug with tax calculation in Prestashop 1.6. I've tested with Prestashop 1.6.0.x.

 

It is very easy to reproduce the bug and it will happen every time. Do it in this order:

 

1. Make sure that your items have a tax rule set up.

2. Make sure that you have One Page Checkout selected in preferences.

3. Make a new account, pretending that you are a new customer to the site. Do not add an address yet.

4. Add an item to the cart.

5. Start the checkout process. (you will be asked for your address since you haven't added one yet).

6. You will notice even after you have entered your address and go to the next page, the tax will be 0. Always 0. However, when you add another product to the cart, that item's tax is included. 

 

Has anyone experienced this issue? The only way I can get around this bug is to hack the theme by adding on top of order-opc.js the call updateAddressSelection(). This will update the tax, but is rather dirty as once you change themes, the fix is lost. Not ideal.

 

If a Presta dev could point out a workaround in the PHP code that would be very appreciated. We have customers purchasing items and paying the goods without tax! :/

Also has equal problems with the tax in PS1.6.0.14,
would you explain in more details how adding "Call Update address selection ()" on top of order-opc.js  
Link to comment
Share on other sites

Add updateAddressSelection();  to the top of order-opc.js of your theme, just inside document ready.

Is this what you mean?

 

$(document).ready(function(){
updateAddressSelection();
// GUEST CHECKOUT / NEW ACCOUNT MANAGEMENT
           
if ((typeof isLogged == 'undefined' || !isLogged) || (typeof isGuest !== 'undefined' && isGuest))
{
if (guestCheckoutEnabled && !isLogged)
{
Link to comment
Share on other sites

×
×
  • Create New...