Jump to content

How sales tax is calculated


JCB Kim

Recommended Posts

Hello,

 

I'm new to PrestaShop, but I've spent the last 2 months or so building my site. Now everything is ready to go, but I just noticed that sales tax is not calculating and appearing in my cart. It isn't being sent to PayPal, so it isn't charging correctly either. There is a spot in the cart for sales tax, and I can see some logic for displaying tax in my template files.

 

I only want sales tax added for WA state, and I've triple checked my Tax rules. They're enabled and everything looks correct there. I know when I was first starting to set up my site, sales tax appeared in the cart, so I know I have the rules set correctly.

 

Most of my modifications have been changing template files to customize the look, and I haven't changed any tax stuff that I know of.

 

Any ideas? What can break the sales tax calculations?

 

A lot of the logic references $total_tax, can someone tell me where this is defined?

 

Thanks for any help or guidance!

 

Kim

Link to comment
Share on other sites

Hi Kim,

 

Me again, I must have miread your last post.

It isn't being sent to PayPal, so it isn't charging correctly either.

Last TIme I red it was being sent...Since it isn't Your configuration must be wrong. Can you tell me which Country are you trying to configure for?

 

Martin

Link to comment
Share on other sites

Well, I can't say that I'm making much progress, but I did find something interesting when debugging:

 

SELECT SQL_NO_CACHE * FROM `ps_tax_rule` WHERE `id_country` = 21 AND `id_tax_rules_group` = 47 AND `id_state` IN (0, 0) AND ('0' BETWEEN `zipcode_from` AND `zipcode_to` OR (`zipcode_to` = 0 AND `zipcode_from` IN(0, '0'))) ORDER BY `zipcode_from` DESC, `zipcode_to` DESC, `id_state` DESC, `id_country` DESC

in /homepages/21/db1234/htdocs/classes/tax/TaxRulesTaxManager.php:92

 

The id_tax_rules_group is set to 47, which is the right tax rule for WA, but the state should also be 47, not 0 like in this query. What process writes this query?

Link to comment
Share on other sites

Well, I finally got it working. I switched to the new Paypal US module, that added tax, but the order did not show up in the backoffice despite it clearing with Paypal. I then switched back to the default PayPal module, but turned off Express checkouts. Now taxes are added and the orders appear in the backoffice.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...