Issue
how to refresh shipping methods on checkout Magento 2, which js functions?
Solution
https://alanstorm.com/refresh-shipping-rates-for-the-magento-2-checkout/
requirejs([
'Magento_Checkout/js/model/quote',
'Magento_Checkout/js/model/shipping-rate-registry'
], function(quote, rateRegistry){
var address = quote.shippingAddress();
address.trigger_reload = new Date().getTime();
rateRegistry.set(address.getKey(), null);
rateRegistry.set(address.getCacheKey(), null);
quote.shippingAddress(address);
});
Answered By - Tristanisginger Answer Checked By - Robin (PHPFixing Admin)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.