3

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

Seventh Son
  • 131
  • 6
  • Clue: today I created a new test user, with the same state and zip code. After going from the cart to the checkout, the tax was effectively zeroed out and returning to the cart, removing the items and re-adding them had no effect. I could not get tax to show up again for that user's cart. – Seventh Son Jul 27 '15 at 22:02

2 Answers2

1

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

Seventh Son
  • 131
  • 6
  • For the sole purpose of preventing anyone else from having this problem, note that there is a bug in the current version of Real One Page Checkout from the Nop-Templates vendor, resulting in mis-association of address entries for customers. It also created a near duplicate entry (one with a specific store name) in settings which prevented the default one-page included with Nop from working even after being disabled or uninstalled. I hope this helps someone! – Seventh Son Jul 28 '15 at 17:53
  • Yes, there was a bug that was corrected a long time ago. The current version of the One Page Checkout plugin is much improved since then and also now offers a lot more options in the plugin administration. The plugin vendors Nop-Templates use the same plugin on https://Nop-Templates.com (their website), which should speak enough for the current quality of the plugin. – poyker Mar 12 '16 at 10:05
0

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.

poyker
  • 75
  • 3
  • 1
    Preselect Last Customer Billing Address and/or Preselect Last Customer Shipping Address. yes but in this case, you make 2 copies of the selected address. why cant you justuse existing address. they dont need to be amended. default NC behaviour is not like that. – Emil Nov 11 '15 at 13:40
  • The old version of the plugin used to create copies of the selected addresses but not anymore. This has been corrected and the plugin now uses the existing addresses and simply change them instead (to be like the preselected ones). – poyker Mar 12 '16 at 09:57