Magento2 reset shipping methods?












0















What i want that,when customer goes on checkout page generally select shipping method but if he came back to cart then again go to checkout in that case shipping should be reset.



But Magento 2 generally do,it keeps the data in cache when we go to checkout then if again come back then it load from there.



Could any one know about this how we can approach it?










share|improve this question



























    0















    What i want that,when customer goes on checkout page generally select shipping method but if he came back to cart then again go to checkout in that case shipping should be reset.



    But Magento 2 generally do,it keeps the data in cache when we go to checkout then if again come back then it load from there.



    Could any one know about this how we can approach it?










    share|improve this question

























      0












      0








      0








      What i want that,when customer goes on checkout page generally select shipping method but if he came back to cart then again go to checkout in that case shipping should be reset.



      But Magento 2 generally do,it keeps the data in cache when we go to checkout then if again come back then it load from there.



      Could any one know about this how we can approach it?










      share|improve this question














      What i want that,when customer goes on checkout page generally select shipping method but if he came back to cart then again go to checkout in that case shipping should be reset.



      But Magento 2 generally do,it keeps the data in cache when we go to checkout then if again come back then it load from there.



      Could any one know about this how we can approach it?







      magento2 shipping-methods






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 50 mins ago









      Charul TyagiCharul Tyagi

      671112




      671112






















          1 Answer
          1






          active

          oldest

          votes


















          0














          You can reset the shipping method as :



          Go to vendormagentomodule-checkoutviewfrontendwebtemplateshipping-addressshipping-method-list.phtml



          and replace the line 10 code from



          <input type="radio"
          class="radio"
          ifnot="method.error_message"
          ko-checked="element.isSelected"
          ko-value="method.carrier_code + '_' + method.method_code"
          attr="'aria-labelledby': 'label_method_' + method.method_code + '_' + method.carrier_code + ' ' + 'label_carrier_' + method.method_code + '_' + method.carrier_code,
          'checked': element.rates().length == 1 || element.isSelected" />


          To :



          <input type="radio"
          class="radio"
          ifnot="method.error_message"
          ko-value="method.carrier_code + '_' + method.method_code"
          attr="'aria-labelledby': 'label_method_' + method.method_code + '_' + method.carrier_code + ' ' + 'label_carrier_' + method.method_code + '_' + method.carrier_code" />


          And run the php binmagento setup:upgrade command.



          Note : Override the file in your theme, do not change directly in the core file.






          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%2f260930%2fmagento2-reset-shipping-methods%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            You can reset the shipping method as :



            Go to vendormagentomodule-checkoutviewfrontendwebtemplateshipping-addressshipping-method-list.phtml



            and replace the line 10 code from



            <input type="radio"
            class="radio"
            ifnot="method.error_message"
            ko-checked="element.isSelected"
            ko-value="method.carrier_code + '_' + method.method_code"
            attr="'aria-labelledby': 'label_method_' + method.method_code + '_' + method.carrier_code + ' ' + 'label_carrier_' + method.method_code + '_' + method.carrier_code,
            'checked': element.rates().length == 1 || element.isSelected" />


            To :



            <input type="radio"
            class="radio"
            ifnot="method.error_message"
            ko-value="method.carrier_code + '_' + method.method_code"
            attr="'aria-labelledby': 'label_method_' + method.method_code + '_' + method.carrier_code + ' ' + 'label_carrier_' + method.method_code + '_' + method.carrier_code" />


            And run the php binmagento setup:upgrade command.



            Note : Override the file in your theme, do not change directly in the core file.






            share|improve this answer




























              0














              You can reset the shipping method as :



              Go to vendormagentomodule-checkoutviewfrontendwebtemplateshipping-addressshipping-method-list.phtml



              and replace the line 10 code from



              <input type="radio"
              class="radio"
              ifnot="method.error_message"
              ko-checked="element.isSelected"
              ko-value="method.carrier_code + '_' + method.method_code"
              attr="'aria-labelledby': 'label_method_' + method.method_code + '_' + method.carrier_code + ' ' + 'label_carrier_' + method.method_code + '_' + method.carrier_code,
              'checked': element.rates().length == 1 || element.isSelected" />


              To :



              <input type="radio"
              class="radio"
              ifnot="method.error_message"
              ko-value="method.carrier_code + '_' + method.method_code"
              attr="'aria-labelledby': 'label_method_' + method.method_code + '_' + method.carrier_code + ' ' + 'label_carrier_' + method.method_code + '_' + method.carrier_code" />


              And run the php binmagento setup:upgrade command.



              Note : Override the file in your theme, do not change directly in the core file.






              share|improve this answer


























                0












                0








                0







                You can reset the shipping method as :



                Go to vendormagentomodule-checkoutviewfrontendwebtemplateshipping-addressshipping-method-list.phtml



                and replace the line 10 code from



                <input type="radio"
                class="radio"
                ifnot="method.error_message"
                ko-checked="element.isSelected"
                ko-value="method.carrier_code + '_' + method.method_code"
                attr="'aria-labelledby': 'label_method_' + method.method_code + '_' + method.carrier_code + ' ' + 'label_carrier_' + method.method_code + '_' + method.carrier_code,
                'checked': element.rates().length == 1 || element.isSelected" />


                To :



                <input type="radio"
                class="radio"
                ifnot="method.error_message"
                ko-value="method.carrier_code + '_' + method.method_code"
                attr="'aria-labelledby': 'label_method_' + method.method_code + '_' + method.carrier_code + ' ' + 'label_carrier_' + method.method_code + '_' + method.carrier_code" />


                And run the php binmagento setup:upgrade command.



                Note : Override the file in your theme, do not change directly in the core file.






                share|improve this answer













                You can reset the shipping method as :



                Go to vendormagentomodule-checkoutviewfrontendwebtemplateshipping-addressshipping-method-list.phtml



                and replace the line 10 code from



                <input type="radio"
                class="radio"
                ifnot="method.error_message"
                ko-checked="element.isSelected"
                ko-value="method.carrier_code + '_' + method.method_code"
                attr="'aria-labelledby': 'label_method_' + method.method_code + '_' + method.carrier_code + ' ' + 'label_carrier_' + method.method_code + '_' + method.carrier_code,
                'checked': element.rates().length == 1 || element.isSelected" />


                To :



                <input type="radio"
                class="radio"
                ifnot="method.error_message"
                ko-value="method.carrier_code + '_' + method.method_code"
                attr="'aria-labelledby': 'label_method_' + method.method_code + '_' + method.carrier_code + ' ' + 'label_carrier_' + method.method_code + '_' + method.carrier_code" />


                And run the php binmagento setup:upgrade command.



                Note : Override the file in your theme, do not change directly in the core file.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered 11 mins ago









                Amit NaraniwalAmit Naraniwal

                28027




                28027






























                    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%2f260930%2fmagento2-reset-shipping-methods%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

                    Polycentropodidae

                    Magento 2 Error message: Invalid state change requested

                    Paulmy