Open peteeveleigh opened 2 months ago
Also, we started support with Craft, but confirmed it's a Postie issue.
@peteeveleigh disabled Postie, then set up a single shipping method with 3 different rules for US, Canada, International. When he changed the shipping address on the front-end, the shipping rate also changed (because the selected shipping method changed by default).
Also just confirmed what happens in the CP when using Postie. If I change the shipping address on the cart in the CP then the original option is greyed out and when I click "Update Order" the first valid shipping method is set on the cart.
So what could be different about doing it on the front end via the update-cart controller?
Do you have manualFetchRates
enabled? I'm not seeing this behaviour. Rates and their shipping methods are cached based on their cart content and the customer address, so if that changes, new shipping methods are then available.
If the previously-selected shipping method still exists for the new address, but a different price, then nothing will change (apart from the shipping cost, already applied to the order of course), but if the shipping method (the specific service for the provider) is no longer available, the shipping method with in invalidated.
@engram-design No, manualFetchRates
is not enabled. It's not defined in our config at all.
Describe the bug
A customer sets a shipping address, then proceeds to choose a shipping method. Both are set on the cart. They then backtrack through the checkout and change their shipping address. The new address results in the original selected shipping method being invalid but it is not removed from the cart.
The standard Commerce behaviour would be to remove the selected invalid shipping method from the cart and instead apply the first valid one available for the new shipping address.
Steps to reproduce
Craft CMS version
4.10.4
Plugin version
3.1.8
Multi-site?
No
Additional context
No response