Open GerFres opened 1 year ago
This issue has been linked to a new work item: W-14239814
Thanks for reporting this, @GerFres! While investigating this, I also noticed that if a user does not update the shipping method, they can make it all the way to submitting the order, which fails due to taxTotal (and related fields) not being properly set.
Summary
On a multi locale and currency site, shipping method pushed to the basket by default does not update whenever the currency of the basket changes, producing unwanted behaviors on tax calculation on cart.
Let's say we have one site with two locales and currencies:
When we navigate to the storefront a basket will be created with EUR as currency and the default shipping method for the EUR currency will be pushed into the basket.
Then if we switch locales to EN-US, the currency of the basket gets updated to USD but the shipping method pushed to the basket is still the same as before, having now USD as currency but a EUR shipping method. Then if I add a product to the basket the taxTotal will be null.
Steps To Reproduce
Expected result
Shipping method to be adjusted to the default shipping method of the updated currency
Actual result
Shipping method does not updated regardless the value of the currency of the basket. This has impact with the tax calculation on the cart and it will be null. It only gets fixed if the customer selects a shipping method in the checkout but until then the taxTotal is null if a product has been added to the basket.
System Information (as applicable)
Browser: Node version: pwa-kit version: Desktop OS: Mobile Device Info:
Additional information