How to update Shipping rates using Ajax when cart item is deleted on Checkout-Cart page?Display Shipping method chosen by customer during checkout using AJAXHow to modify cart totals on basket pageCheckout cart remove item not updatingHow to trigger a minicart update after adding to cartRWD mini-cart: How to reload cart page if product removed via mini cart?Magento 2: shipping methods not updated on changing of checkout fieldsmagento 2 remove mini cart item page reload?magento2 update cart title in chekcout after update section cartTotals showing wrong value when updating totals section in cart page via ajax magento 1.9Magento 2: Not Allow to Rest Estimate Shipping and Tax value on qty change in checkout/cart/ page

What killed these X2 caps?

Twin primes whose sum is a cube

In a Spin are Both Wings Stalled?

What's the difference between 'rename' and 'mv'?

Is it possible to download Internet Explorer on my Mac running OS X El Capitan?

What reasons are there for a Capitalist to oppose a 100% inheritance tax?

Why is consensus so controversial in Britain?

Is delete *p an alternative to delete [] p?

Today is the Center

How do I write bicross product symbols in latex?

I would say: "You are another teacher", but she is a woman and I am a man

Etiquette around loan refinance - decision is going to cost first broker a lot of money

Is the Joker left-handed?

How can I tell someone that I want to be his or her friend?

How could indestructible materials be used in power generation?

Brothers & sisters

Has there ever been an airliner design involving reducing generator load by installing solar panels?

90's TV series where a boy goes to another dimension through portal near power lines

Is Lorentz symmetry broken if SUSY is broken?

Is it inappropriate for a student to attend their mentor's dissertation defense?

UK: Is there precedent for the governments e-petition site changing the direction of a government decision?

How to draw the figure with four pentagons?

How much of data wrangling is a data scientist's job?

Why is it a bad idea to hire a hitman to eliminate most corrupt politicians?



How to update Shipping rates using Ajax when cart item is deleted on Checkout-Cart page?


Display Shipping method chosen by customer during checkout using AJAXHow to modify cart totals on basket pageCheckout cart remove item not updatingHow to trigger a minicart update after adding to cartRWD mini-cart: How to reload cart page if product removed via mini cart?Magento 2: shipping methods not updated on changing of checkout fieldsmagento 2 remove mini cart item page reload?magento2 update cart title in chekcout after update section cartTotals showing wrong value when updating totals section in cart page via ajax magento 1.9Magento 2: Not Allow to Rest Estimate Shipping and Tax value on qty change in checkout/cart/ page






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








12















My Shipping rates are calculated based on item present in cart and now on deletion of item on Checkout/Cart page, I need to update the Shipping rates. As of now, Remove Item on Checkout/Cart page updates the total section but does not refresh the shipping rates. It would be of great help if someone can guide me on how to trigger get shipping rates once item is deleted from cart using Ajax.










share|improve this question
















bumped to the homepage by Community 5 hours ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.















  • did you find any solution for this?

    – Deeps
    May 3 '18 at 12:03

















12















My Shipping rates are calculated based on item present in cart and now on deletion of item on Checkout/Cart page, I need to update the Shipping rates. As of now, Remove Item on Checkout/Cart page updates the total section but does not refresh the shipping rates. It would be of great help if someone can guide me on how to trigger get shipping rates once item is deleted from cart using Ajax.










share|improve this question
















bumped to the homepage by Community 5 hours ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.















  • did you find any solution for this?

    – Deeps
    May 3 '18 at 12:03













12












12








12


1






My Shipping rates are calculated based on item present in cart and now on deletion of item on Checkout/Cart page, I need to update the Shipping rates. As of now, Remove Item on Checkout/Cart page updates the total section but does not refresh the shipping rates. It would be of great help if someone can guide me on how to trigger get shipping rates once item is deleted from cart using Ajax.










share|improve this question
















My Shipping rates are calculated based on item present in cart and now on deletion of item on Checkout/Cart page, I need to update the Shipping rates. As of now, Remove Item on Checkout/Cart page updates the total section but does not refresh the shipping rates. It would be of great help if someone can guide me on how to trigger get shipping rates once item is deleted from cart using Ajax.







magento2 checkout cart ajax quote






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jul 30 '18 at 18:02









nikin

778315




778315










asked Sep 23 '17 at 14:44









Rizwan DhukaRizwan Dhuka

19811




19811





bumped to the homepage by Community 5 hours ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







bumped to the homepage by Community 5 hours ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.














  • did you find any solution for this?

    – Deeps
    May 3 '18 at 12:03

















  • did you find any solution for this?

    – Deeps
    May 3 '18 at 12:03
















did you find any solution for this?

– Deeps
May 3 '18 at 12:03





did you find any solution for this?

– Deeps
May 3 '18 at 12:03










2 Answers
2






active

oldest

votes


















0














Hope you doing well.



Please try with this JavaScript code.Hope this will help you.



define(
[
'Magento_Checkout/js/model/quote',
'Magento_Checkout/js/model/shipping-rate-processor/new-address',
'Magento_Checkout/js/model/shipping-rate-processor/customer-address',
'Magento_Checkout/js/model/shipping-rate-registry'

],
function (quote, defaultProcessor, customerAddressProcessor, rateRegistry)
'use strict';

var processors = [];

rateRegistry.set(quote.shippingAddress().getCacheKey(), null);

processors.default = defaultProcessor;
processors['customer-address'] = customerAddressProcessor;

var type = quote.shippingAddress().getType();

if (processors[type])
processors[type].getRates(quote.shippingAddress());
else
processors.default.getRates(quote.shippingAddress());



);





share|improve this answer






























    0














     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);
    );





    share|improve this answer

























      Your Answer








      StackExchange.ready(function()
      var channelOptions =
      tags: "".split(" "),
      id: "479"
      ;
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function()
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled)
      StackExchange.using("snippets", function()
      createEditor();
      );

      else
      createEditor();

      );

      function createEditor()
      StackExchange.prepareEditor(
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: false,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: null,
      bindNavPrevention: true,
      postfix: "",
      imageUploader:
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      ,
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      );



      );













      draft saved

      draft discarded


















      StackExchange.ready(
      function ()
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f194469%2fhow-to-update-shipping-rates-using-ajax-when-cart-item-is-deleted-on-checkout-ca%23new-answer', 'question_page');

      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      0














      Hope you doing well.



      Please try with this JavaScript code.Hope this will help you.



      define(
      [
      'Magento_Checkout/js/model/quote',
      'Magento_Checkout/js/model/shipping-rate-processor/new-address',
      'Magento_Checkout/js/model/shipping-rate-processor/customer-address',
      'Magento_Checkout/js/model/shipping-rate-registry'

      ],
      function (quote, defaultProcessor, customerAddressProcessor, rateRegistry)
      'use strict';

      var processors = [];

      rateRegistry.set(quote.shippingAddress().getCacheKey(), null);

      processors.default = defaultProcessor;
      processors['customer-address'] = customerAddressProcessor;

      var type = quote.shippingAddress().getType();

      if (processors[type])
      processors[type].getRates(quote.shippingAddress());
      else
      processors.default.getRates(quote.shippingAddress());



      );





      share|improve this answer



























        0














        Hope you doing well.



        Please try with this JavaScript code.Hope this will help you.



        define(
        [
        'Magento_Checkout/js/model/quote',
        'Magento_Checkout/js/model/shipping-rate-processor/new-address',
        'Magento_Checkout/js/model/shipping-rate-processor/customer-address',
        'Magento_Checkout/js/model/shipping-rate-registry'

        ],
        function (quote, defaultProcessor, customerAddressProcessor, rateRegistry)
        'use strict';

        var processors = [];

        rateRegistry.set(quote.shippingAddress().getCacheKey(), null);

        processors.default = defaultProcessor;
        processors['customer-address'] = customerAddressProcessor;

        var type = quote.shippingAddress().getType();

        if (processors[type])
        processors[type].getRates(quote.shippingAddress());
        else
        processors.default.getRates(quote.shippingAddress());



        );





        share|improve this answer

























          0












          0








          0







          Hope you doing well.



          Please try with this JavaScript code.Hope this will help you.



          define(
          [
          'Magento_Checkout/js/model/quote',
          'Magento_Checkout/js/model/shipping-rate-processor/new-address',
          'Magento_Checkout/js/model/shipping-rate-processor/customer-address',
          'Magento_Checkout/js/model/shipping-rate-registry'

          ],
          function (quote, defaultProcessor, customerAddressProcessor, rateRegistry)
          'use strict';

          var processors = [];

          rateRegistry.set(quote.shippingAddress().getCacheKey(), null);

          processors.default = defaultProcessor;
          processors['customer-address'] = customerAddressProcessor;

          var type = quote.shippingAddress().getType();

          if (processors[type])
          processors[type].getRates(quote.shippingAddress());
          else
          processors.default.getRates(quote.shippingAddress());



          );





          share|improve this answer













          Hope you doing well.



          Please try with this JavaScript code.Hope this will help you.



          define(
          [
          'Magento_Checkout/js/model/quote',
          'Magento_Checkout/js/model/shipping-rate-processor/new-address',
          'Magento_Checkout/js/model/shipping-rate-processor/customer-address',
          'Magento_Checkout/js/model/shipping-rate-registry'

          ],
          function (quote, defaultProcessor, customerAddressProcessor, rateRegistry)
          'use strict';

          var processors = [];

          rateRegistry.set(quote.shippingAddress().getCacheKey(), null);

          processors.default = defaultProcessor;
          processors['customer-address'] = customerAddressProcessor;

          var type = quote.shippingAddress().getType();

          if (processors[type])
          processors[type].getRates(quote.shippingAddress());
          else
          processors.default.getRates(quote.shippingAddress());



          );






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Oct 23 '18 at 5:18









          Bhavin GehlotBhavin Gehlot

          8616




          8616























              0














               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);
              );





              share|improve this answer





























                0














                 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);
                );





                share|improve this answer



























                  0












                  0








                  0







                   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);
                  );





                  share|improve this answer















                   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);
                  );






                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Feb 2 at 10:02









                  Rama Chandran M

                  2,74381530




                  2,74381530










                  answered Feb 2 at 9:44









                  Urvashi PrajapatiUrvashi Prajapati

                  211




                  211



























                      draft saved

                      draft discarded
















































                      Thanks for contributing an answer to Magento Stack Exchange!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid


                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.

                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f194469%2fhow-to-update-shipping-rates-using-ajax-when-cart-item-is-deleted-on-checkout-ca%23new-answer', 'question_page');

                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      Can not update quote_id field of “quote_item” table magento 2Magento 2.1 - We can't remove the item. (Shopping Cart doesnt allow us to remove items before becomes empty)Add value for custom quote item attribute using REST apiREST API endpoint v1/carts/cartId/items always returns error messageCorrect way to save entries to databaseHow to remove all associated quote objects of a customer completelyMagento 2 - Save value from custom input field to quote_itemGet quote_item data using quote id and product id filter in Magento 2How to set additional data to quote_item table from controller in Magento 2?What is the purpose of additional_data column in quote_item table in magento2Set Custom Price to Quote item magento2 from controller

                      Magento 2 disable Secret Key on URL's from terminal The Next CEO of Stack OverflowMagento 2 Shortcut/GUI tool to perform commandline tasks for windowsIn menu add configuration linkMagento oAuth : Generating access token and access secretMagento 2 security key issue in Third-Party API redirect URIPublic actions in admin controllersHow to Disable Cache in Custom WidgetURL Key not changing in Magento 2Product URL Key gets deleted when importing custom options - Magento 2Problem with reindex terminalMagento 2 - bin/magento Commands not working in Cpanel Terminal

                      Aasi (pallopeli) Navigointivalikko