Seventh Son
Seventh Son

Reputation: 131

NopCommerce 3.6 Tax By Country & State & Zip always results in zero tax

The NopCommerce 3.6 Tax By Country & State & Zip plugin always returns zero tax for one of my stores. I have the same results locally and remotely, but the database was not copied from local machine. I performed the steps locally and then again remotely to help eliminate the particular environment as a factor.

What might be wrong?

Here are some screen shots to demonstrate.

Tax provider marked primary : Tax Providers

Test customer address contains example zip code. Customer Address

No roles are marked exempt. Customer roles

Set tax based on shipping address, etc. Tax Settings

Tax rates were imported via SSMS. Tax Rates

Customer is not exempt. Customer Details

General tax category has been added.

Tax Category

CountryID of 1 is present. Country

Specific tax rate for test shipping address is identified. I also attempted a test with a specific StoreId of 1, though there is only 1 store. Also the field is not nullable, zero acts as the wildcard. Tax Rate

All products are taxable and assigned to General tax category. Products Query

No tax displayed in the cart. Tax Cart

No tax displayed in checkout. Tax Checkout

No relevant errors in the log. Error Log

Upvotes: 3

Views: 870

Answers (2)

poyker
poyker

Reputation: 75

Here is how the One Page Checkout plugin for nopCommerce works:

When the customers open the checkout page they start with blank addresses (that is why initially you see two empty addresses in the database - one for the billing address and another one for the shipping address) and that is why your taxes are 0 since there is still no any country selected. Once the customer selects a country then the address in the database will be updated with the country id and all the tax calculations will be based on the newly selected country. The order total will also be updated and the customers will see the new taxes. If the customer changes the country again then the order total will again be updated again with the new taxes based on the new country.

By looking at the provided screenshots, your customer already has an address in his address book and you expect him to use the same address for any new orders. In that case you can simply check these settings in the administration of the One Page Checkout plugin - Preselect Last Customer Billing Address and/or Preselect Last Customer Shipping Address. This way when the customer starts the checkout it will not start with a blank address but with the address he has used to make his latest order. Since the preselected address should already has a country selected then your taxes will automatically be shown for that country right from the start of the checkout.

Upvotes: 0

Seventh Son
Seventh Son

Reputation: 131

As much as I wanted to avoid thinking it was true, this problem was created by a third party plugin. A vendor's alternate "One Page Checkout" was clearing the tax for the cart once the Checkout page was hit, and preventing that user from ever obtaining tax calculations in the cart afterward. Removing the plugin corrected the problem, and I've reached out to the vendor for support.

Thanks for anyone who took the time to look at this!

EDIT: To be clearer, what's occurring is that the Real One Page Checkout plugin creates NULL fields in the Address table and associates them with the customer. Therefore, any subsequent orders put in the cart by that customer will never calculate taxation again. I didn't investigate what else might be happening as a result.

I've downloaded the latest copy of the plugin and tested with the same results. All orders placed without the plugin installed work fine, with the plugin installed there are blank records added to the Address table and associated with the Customer.

enter image description here enter image description here

Upvotes: 1

Related Questions