onepica / avatax

One Pica Magento extension for sales tax calculation performed by Avatax
http://www.magentocommerce.com/magento-connect/6760.html
29 stars 34 forks source link

Force Final Lookup #237

Open mpchadwick opened 8 years ago

mpchadwick commented 8 years ago

On the flip side of https://github.com/onepica/avatax/issues/28 I've been working through an issue where sometimes, even though tax is meant to be applied to order items, it never gets applied, and therefore is never collected.

I'm still trying to determine all the conditions that can lead to this result, but from what I can see this check seems to be failing, leading to rates being cached incorrectly (there's an observer doing some questionable things during cart update).

Regardless, it seems it could be useful in solving some real-world problems to have a setting to force a final lookup (e.g. after saveShippingMethod) in case, for whatever reason, things get cached incorrectly. This is basically a failsafe, to ensure that the tax being collected on the order correctly reflects the items in the order. It can be disabled by default, but in case anyone else runs into similar situations they can use it.

Is this something that you would consider incorporating into this module? I'd be happy to submit a PR if so.