Magento Expert Forum - Improve your Magento experience

Results 1 to 2 of 2

How to Refresh Shipping Rates on Checkout Using JS in Magento 2

  1. #1
    Junior Member
    Join Date
    Aug 2022
    Posts
    179
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Post How to Refresh Shipping Rates on Checkout Using JS in Magento 2

    Internet business storekeepers utilize different transportation strategies to augment the benefits and subsequently charge delivering rates in light of the area, client bunch, and so forth.

    Presently, for instance, a client is at the checkout step for certain things in the truck to be conveyed at a specific area. In any case, assuming he changes the area of conveyance during the checkout, the delivery rates applied for that request likewise change.

    In any case, in the event that the whole page is reloaded and assuming he needs to go through the checkout once more, it adds to the terrible client experience. In this present circumstance, he might forsake the truck moreover.

    To keep away from it, execute the beneath answer for Refresh Shipping Rates on Checkout Using JS in Magento 2.

    For more info, visit https://meetanshi.com/blog/refresh-s...-in-magento-2/

    View more threads in the same category:


  2. #2
    Junior Member
    Join Date
    Sep 2018
    Location
    Oman, Muscat
    Posts
    2,084
    Thanks
    0
    Thanked 4 Times in 4 Posts

    Default

    Technique to revive transporting rates on checkout involving JS in Magento 2:
    requirejs([
    'Magento_Checkout/js/model/quote',
    'Magento_Checkout/js/model/delivering rate-library'
    ], function(mainQuote, rateReg){
    var address = mainQuote. shippingAddress();
    rateReg. set(address.
    rateReg. set(address.
    mainQuote.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •