Magento 2: Hide other shipping methods when free shipping is available The 2019 Stack Overflow Developer Survey Results Are In Unicorn Meta Zoo #1: Why another podcast? Announcing the arrival of Valued Associate #679: Cesar ManaraHow can I hide a shipping option if that option is available as flat-rate or free?Hide shipping method when another availableMagento hide flat rate on orders over x.xxIn magento how to add flat price for shipping outside the default countryHide/disable standard shipping when qualified for free shippingCan't remove Free ShippingFree Shipping not workingMagento 2 Free Shipping options showing all the time in cart pageHow can i hide flat rate shipping method when free shipping is available in magento 2.1.5?Need to override Free shipping method

What can I do if neighbor is blocking my solar panels intentionally?

Intergalactic human space ship encounters another ship, character gets shunted off beyond known universe, reality starts collapsing

Using dividends to reduce short term capital gains?

My body leaves; my core can stay

Presidential Pardon

What other Star Trek series did the main TNG cast show up in?

Single author papers against my advisor's will?

What's the point in a preamp?

Can the DM override racial traits?

What does Linus Torvalds mean when he says that Git "never ever" tracks a file?

How to read αἱμύλιος or when to aspirate

Keeping a retro style to sci-fi spaceships?

Student Loan from years ago pops up and is taking my salary

How do you keep chess fun when your opponent constantly beats you?

Fixing different display colors within string

Accepted by European university, rejected by all American ones I applied to? Possible reasons?

How to support a colleague who finds meetings extremely tiring?

Do working physicists consider Newtonian mechanics to be "falsified"?

Can withdrawing asylum be illegal?

Homework question about an engine pulling a train

Simulating Exploding Dice

How to handle characters who are more educated than the author?

Do I have Disadvantage attacking with an off-hand weapon?

How did passengers keep warm on sail ships?



Magento 2: Hide other shipping methods when free shipping is available



The 2019 Stack Overflow Developer Survey Results Are In
Unicorn Meta Zoo #1: Why another podcast?
Announcing the arrival of Valued Associate #679: Cesar ManaraHow can I hide a shipping option if that option is available as flat-rate or free?Hide shipping method when another availableMagento hide flat rate on orders over x.xxIn magento how to add flat price for shipping outside the default countryHide/disable standard shipping when qualified for free shippingCan't remove Free ShippingFree Shipping not workingMagento 2 Free Shipping options showing all the time in cart pageHow can i hide flat rate shipping method when free shipping is available in magento 2.1.5?Need to override Free shipping method



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








8















I charge my customers flat rate for shipping and I also offer free shipping for orders that are above certain amount. At the moment, customers who qualify for free shipping will also have paid shipping option shown, which may confuse some customers. Does anyone know if there's a way to hide other shipping methods when free shipping method is available?










share|improve this question




























    8















    I charge my customers flat rate for shipping and I also offer free shipping for orders that are above certain amount. At the moment, customers who qualify for free shipping will also have paid shipping option shown, which may confuse some customers. Does anyone know if there's a way to hide other shipping methods when free shipping method is available?










    share|improve this question
























      8












      8








      8


      3






      I charge my customers flat rate for shipping and I also offer free shipping for orders that are above certain amount. At the moment, customers who qualify for free shipping will also have paid shipping option shown, which may confuse some customers. Does anyone know if there's a way to hide other shipping methods when free shipping method is available?










      share|improve this question














      I charge my customers flat rate for shipping and I also offer free shipping for orders that are above certain amount. At the moment, customers who qualify for free shipping will also have paid shipping option shown, which may confuse some customers. Does anyone know if there's a way to hide other shipping methods when free shipping method is available?







      magento2 shipping shipping-methods free-shipping






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Feb 24 '16 at 7:26









      ifekifek

      4315




      4315




















          4 Answers
          4






          active

          oldest

          votes


















          2














          I had the same problem.



          Remove "Free Shipping" configuration because you don't need it (you already have "Cart Price Rules").



          When your customer qualifies for free shipping it happens based on "Flat Rate" not in "Free Shipping".






          share|improve this answer






























            4














            Use the extension ShippingTweaks.






            share|improve this answer






























              3














              Write a plugin to disable flat rate shipping method when free shipping is actually enabled based on cart sub total.



              <?xml version="1.0"?>
              <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
              <type name="MagentoOfflineShippingModelCarrierFlatrate">
              <plugin name="disable-flatrate" type="VendorModuleNameModelCarrierFlatrate" sortOrder="1" />
              </type>
              </config>


              Write a Model class to process sub total validation.



              <?php
              namespace VendorModuleNameModelCarrier;

              class Flatrate


              const XML_PATH_FREE_SHIPPING_SUBTOTAL = "carriers/freeshipping/free_shipping_subtotal";

              /**
              * @var MagentoCheckoutModelSession
              */
              protected $_checkoutSession;

              /**
              * @var MagentoFrameworkAppConfigScopeConfigInterface
              */
              protected $_scopeConfig;

              public function __construct(
              MagentoCheckoutModelSession $checkoutSession,
              MagentoFrameworkAppConfigScopeConfigInterface $scopeConfig,
              MagentoStoreModelStoreManagerInterface $storeManager
              )
              $this->_storeManager = $storeManager;
              $this->_checkoutSession = $checkoutSession;
              $this->_scopeConfig = $scopeConfig;


              public function afterCollectRates(MagentoOfflineShippingModelCarrierFlatrate $flatRate, $result)

              $scopeId = $this->_storeManager->getStore()->getId();

              $storeScope = MagentoStoreModelScopeInterface::SCOPE_STORES;

              // Get MOA value from system configuration.
              $freeShippingSubTotal = $this->_scopeConfig->getValue(self::XML_PATH_FREE_SHIPPING_SUBTOTAL, $storeScope, $scopeId);

              // Get cart subtotal from checkout session.
              $baseSubTotal = $this->_checkoutSession->getQuote()->getBaseSubtotal();

              // Validate subtoal should be empty or Zero.
              if(!empty($baseSubTotal) && !empty($freeShippingSubTotal))

              if($baseSubTotal >= $freeShippingSubTotal)
              return false;



              return $result;







              share|improve this answer























              • hi @maniprakash where i need to create di.xml ?

                – Nagaraju Kasa
                Oct 30 '18 at 11:36






              • 1





                Romba nandri its working fine.

                – Nagaraju Kasa
                Oct 30 '18 at 13:26


















              0














              in response to @Nagaraju and hoping to help to anyone.



              The di.xml can be created in any module you have, or if you dont know how and where:



              app/code/My_Vendor/MyModule/etc/di.xml -> here is where you put the code of @maniprakash



              then you should create the class in:



              app/code/My_Vendor/MyModule/Model/Flatrate -> and paste the class code of @maniprakash



              Just remember to change the path in type tag on the di.xml



              <plugin name="disable-flatrate" type="VendorModuleNameModelCarrierFlatrate" sortOrder="1" />


              the path must match where your Model class is it. in my example should be



              <plugin name="disable-flatrate" type="My_VendorMyModuleModelFlatrate" sortOrder="1" />


              AND that's it! hope it helps! and thanks to @manipakrash , it helps me! =)






              share|improve this answer








              New contributor




              Joshua Castro is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
              Check out our Code of Conduct.




















                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%2f103175%2fmagento-2-hide-other-shipping-methods-when-free-shipping-is-available%23new-answer', 'question_page');

                );

                Post as a guest















                Required, but never shown

























                4 Answers
                4






                active

                oldest

                votes








                4 Answers
                4






                active

                oldest

                votes









                active

                oldest

                votes






                active

                oldest

                votes









                2














                I had the same problem.



                Remove "Free Shipping" configuration because you don't need it (you already have "Cart Price Rules").



                When your customer qualifies for free shipping it happens based on "Flat Rate" not in "Free Shipping".






                share|improve this answer



























                  2














                  I had the same problem.



                  Remove "Free Shipping" configuration because you don't need it (you already have "Cart Price Rules").



                  When your customer qualifies for free shipping it happens based on "Flat Rate" not in "Free Shipping".






                  share|improve this answer

























                    2












                    2








                    2







                    I had the same problem.



                    Remove "Free Shipping" configuration because you don't need it (you already have "Cart Price Rules").



                    When your customer qualifies for free shipping it happens based on "Flat Rate" not in "Free Shipping".






                    share|improve this answer













                    I had the same problem.



                    Remove "Free Shipping" configuration because you don't need it (you already have "Cart Price Rules").



                    When your customer qualifies for free shipping it happens based on "Flat Rate" not in "Free Shipping".







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Mar 21 '17 at 0:05









                    Gabriel SilvaGabriel Silva

                    1047




                    1047























                        4














                        Use the extension ShippingTweaks.






                        share|improve this answer



























                          4














                          Use the extension ShippingTweaks.






                          share|improve this answer

























                            4












                            4








                            4







                            Use the extension ShippingTweaks.






                            share|improve this answer













                            Use the extension ShippingTweaks.







                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered Aug 28 '17 at 13:21









                            VitaliiVitalii

                            393139




                            393139





















                                3














                                Write a plugin to disable flat rate shipping method when free shipping is actually enabled based on cart sub total.



                                <?xml version="1.0"?>
                                <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
                                <type name="MagentoOfflineShippingModelCarrierFlatrate">
                                <plugin name="disable-flatrate" type="VendorModuleNameModelCarrierFlatrate" sortOrder="1" />
                                </type>
                                </config>


                                Write a Model class to process sub total validation.



                                <?php
                                namespace VendorModuleNameModelCarrier;

                                class Flatrate


                                const XML_PATH_FREE_SHIPPING_SUBTOTAL = "carriers/freeshipping/free_shipping_subtotal";

                                /**
                                * @var MagentoCheckoutModelSession
                                */
                                protected $_checkoutSession;

                                /**
                                * @var MagentoFrameworkAppConfigScopeConfigInterface
                                */
                                protected $_scopeConfig;

                                public function __construct(
                                MagentoCheckoutModelSession $checkoutSession,
                                MagentoFrameworkAppConfigScopeConfigInterface $scopeConfig,
                                MagentoStoreModelStoreManagerInterface $storeManager
                                )
                                $this->_storeManager = $storeManager;
                                $this->_checkoutSession = $checkoutSession;
                                $this->_scopeConfig = $scopeConfig;


                                public function afterCollectRates(MagentoOfflineShippingModelCarrierFlatrate $flatRate, $result)

                                $scopeId = $this->_storeManager->getStore()->getId();

                                $storeScope = MagentoStoreModelScopeInterface::SCOPE_STORES;

                                // Get MOA value from system configuration.
                                $freeShippingSubTotal = $this->_scopeConfig->getValue(self::XML_PATH_FREE_SHIPPING_SUBTOTAL, $storeScope, $scopeId);

                                // Get cart subtotal from checkout session.
                                $baseSubTotal = $this->_checkoutSession->getQuote()->getBaseSubtotal();

                                // Validate subtoal should be empty or Zero.
                                if(!empty($baseSubTotal) && !empty($freeShippingSubTotal))

                                if($baseSubTotal >= $freeShippingSubTotal)
                                return false;



                                return $result;







                                share|improve this answer























                                • hi @maniprakash where i need to create di.xml ?

                                  – Nagaraju Kasa
                                  Oct 30 '18 at 11:36






                                • 1





                                  Romba nandri its working fine.

                                  – Nagaraju Kasa
                                  Oct 30 '18 at 13:26















                                3














                                Write a plugin to disable flat rate shipping method when free shipping is actually enabled based on cart sub total.



                                <?xml version="1.0"?>
                                <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
                                <type name="MagentoOfflineShippingModelCarrierFlatrate">
                                <plugin name="disable-flatrate" type="VendorModuleNameModelCarrierFlatrate" sortOrder="1" />
                                </type>
                                </config>


                                Write a Model class to process sub total validation.



                                <?php
                                namespace VendorModuleNameModelCarrier;

                                class Flatrate


                                const XML_PATH_FREE_SHIPPING_SUBTOTAL = "carriers/freeshipping/free_shipping_subtotal";

                                /**
                                * @var MagentoCheckoutModelSession
                                */
                                protected $_checkoutSession;

                                /**
                                * @var MagentoFrameworkAppConfigScopeConfigInterface
                                */
                                protected $_scopeConfig;

                                public function __construct(
                                MagentoCheckoutModelSession $checkoutSession,
                                MagentoFrameworkAppConfigScopeConfigInterface $scopeConfig,
                                MagentoStoreModelStoreManagerInterface $storeManager
                                )
                                $this->_storeManager = $storeManager;
                                $this->_checkoutSession = $checkoutSession;
                                $this->_scopeConfig = $scopeConfig;


                                public function afterCollectRates(MagentoOfflineShippingModelCarrierFlatrate $flatRate, $result)

                                $scopeId = $this->_storeManager->getStore()->getId();

                                $storeScope = MagentoStoreModelScopeInterface::SCOPE_STORES;

                                // Get MOA value from system configuration.
                                $freeShippingSubTotal = $this->_scopeConfig->getValue(self::XML_PATH_FREE_SHIPPING_SUBTOTAL, $storeScope, $scopeId);

                                // Get cart subtotal from checkout session.
                                $baseSubTotal = $this->_checkoutSession->getQuote()->getBaseSubtotal();

                                // Validate subtoal should be empty or Zero.
                                if(!empty($baseSubTotal) && !empty($freeShippingSubTotal))

                                if($baseSubTotal >= $freeShippingSubTotal)
                                return false;



                                return $result;







                                share|improve this answer























                                • hi @maniprakash where i need to create di.xml ?

                                  – Nagaraju Kasa
                                  Oct 30 '18 at 11:36






                                • 1





                                  Romba nandri its working fine.

                                  – Nagaraju Kasa
                                  Oct 30 '18 at 13:26













                                3












                                3








                                3







                                Write a plugin to disable flat rate shipping method when free shipping is actually enabled based on cart sub total.



                                <?xml version="1.0"?>
                                <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
                                <type name="MagentoOfflineShippingModelCarrierFlatrate">
                                <plugin name="disable-flatrate" type="VendorModuleNameModelCarrierFlatrate" sortOrder="1" />
                                </type>
                                </config>


                                Write a Model class to process sub total validation.



                                <?php
                                namespace VendorModuleNameModelCarrier;

                                class Flatrate


                                const XML_PATH_FREE_SHIPPING_SUBTOTAL = "carriers/freeshipping/free_shipping_subtotal";

                                /**
                                * @var MagentoCheckoutModelSession
                                */
                                protected $_checkoutSession;

                                /**
                                * @var MagentoFrameworkAppConfigScopeConfigInterface
                                */
                                protected $_scopeConfig;

                                public function __construct(
                                MagentoCheckoutModelSession $checkoutSession,
                                MagentoFrameworkAppConfigScopeConfigInterface $scopeConfig,
                                MagentoStoreModelStoreManagerInterface $storeManager
                                )
                                $this->_storeManager = $storeManager;
                                $this->_checkoutSession = $checkoutSession;
                                $this->_scopeConfig = $scopeConfig;


                                public function afterCollectRates(MagentoOfflineShippingModelCarrierFlatrate $flatRate, $result)

                                $scopeId = $this->_storeManager->getStore()->getId();

                                $storeScope = MagentoStoreModelScopeInterface::SCOPE_STORES;

                                // Get MOA value from system configuration.
                                $freeShippingSubTotal = $this->_scopeConfig->getValue(self::XML_PATH_FREE_SHIPPING_SUBTOTAL, $storeScope, $scopeId);

                                // Get cart subtotal from checkout session.
                                $baseSubTotal = $this->_checkoutSession->getQuote()->getBaseSubtotal();

                                // Validate subtoal should be empty or Zero.
                                if(!empty($baseSubTotal) && !empty($freeShippingSubTotal))

                                if($baseSubTotal >= $freeShippingSubTotal)
                                return false;



                                return $result;







                                share|improve this answer













                                Write a plugin to disable flat rate shipping method when free shipping is actually enabled based on cart sub total.



                                <?xml version="1.0"?>
                                <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
                                <type name="MagentoOfflineShippingModelCarrierFlatrate">
                                <plugin name="disable-flatrate" type="VendorModuleNameModelCarrierFlatrate" sortOrder="1" />
                                </type>
                                </config>


                                Write a Model class to process sub total validation.



                                <?php
                                namespace VendorModuleNameModelCarrier;

                                class Flatrate


                                const XML_PATH_FREE_SHIPPING_SUBTOTAL = "carriers/freeshipping/free_shipping_subtotal";

                                /**
                                * @var MagentoCheckoutModelSession
                                */
                                protected $_checkoutSession;

                                /**
                                * @var MagentoFrameworkAppConfigScopeConfigInterface
                                */
                                protected $_scopeConfig;

                                public function __construct(
                                MagentoCheckoutModelSession $checkoutSession,
                                MagentoFrameworkAppConfigScopeConfigInterface $scopeConfig,
                                MagentoStoreModelStoreManagerInterface $storeManager
                                )
                                $this->_storeManager = $storeManager;
                                $this->_checkoutSession = $checkoutSession;
                                $this->_scopeConfig = $scopeConfig;


                                public function afterCollectRates(MagentoOfflineShippingModelCarrierFlatrate $flatRate, $result)

                                $scopeId = $this->_storeManager->getStore()->getId();

                                $storeScope = MagentoStoreModelScopeInterface::SCOPE_STORES;

                                // Get MOA value from system configuration.
                                $freeShippingSubTotal = $this->_scopeConfig->getValue(self::XML_PATH_FREE_SHIPPING_SUBTOTAL, $storeScope, $scopeId);

                                // Get cart subtotal from checkout session.
                                $baseSubTotal = $this->_checkoutSession->getQuote()->getBaseSubtotal();

                                // Validate subtoal should be empty or Zero.
                                if(!empty($baseSubTotal) && !empty($freeShippingSubTotal))

                                if($baseSubTotal >= $freeShippingSubTotal)
                                return false;



                                return $result;








                                share|improve this answer












                                share|improve this answer



                                share|improve this answer










                                answered Aug 28 '17 at 12:22









                                Maniprakash ChinnasamyManiprakash Chinnasamy

                                1537




                                1537












                                • hi @maniprakash where i need to create di.xml ?

                                  – Nagaraju Kasa
                                  Oct 30 '18 at 11:36






                                • 1





                                  Romba nandri its working fine.

                                  – Nagaraju Kasa
                                  Oct 30 '18 at 13:26

















                                • hi @maniprakash where i need to create di.xml ?

                                  – Nagaraju Kasa
                                  Oct 30 '18 at 11:36






                                • 1





                                  Romba nandri its working fine.

                                  – Nagaraju Kasa
                                  Oct 30 '18 at 13:26
















                                hi @maniprakash where i need to create di.xml ?

                                – Nagaraju Kasa
                                Oct 30 '18 at 11:36





                                hi @maniprakash where i need to create di.xml ?

                                – Nagaraju Kasa
                                Oct 30 '18 at 11:36




                                1




                                1





                                Romba nandri its working fine.

                                – Nagaraju Kasa
                                Oct 30 '18 at 13:26





                                Romba nandri its working fine.

                                – Nagaraju Kasa
                                Oct 30 '18 at 13:26











                                0














                                in response to @Nagaraju and hoping to help to anyone.



                                The di.xml can be created in any module you have, or if you dont know how and where:



                                app/code/My_Vendor/MyModule/etc/di.xml -> here is where you put the code of @maniprakash



                                then you should create the class in:



                                app/code/My_Vendor/MyModule/Model/Flatrate -> and paste the class code of @maniprakash



                                Just remember to change the path in type tag on the di.xml



                                <plugin name="disable-flatrate" type="VendorModuleNameModelCarrierFlatrate" sortOrder="1" />


                                the path must match where your Model class is it. in my example should be



                                <plugin name="disable-flatrate" type="My_VendorMyModuleModelFlatrate" sortOrder="1" />


                                AND that's it! hope it helps! and thanks to @manipakrash , it helps me! =)






                                share|improve this answer








                                New contributor




                                Joshua Castro is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                Check out our Code of Conduct.
























                                  0














                                  in response to @Nagaraju and hoping to help to anyone.



                                  The di.xml can be created in any module you have, or if you dont know how and where:



                                  app/code/My_Vendor/MyModule/etc/di.xml -> here is where you put the code of @maniprakash



                                  then you should create the class in:



                                  app/code/My_Vendor/MyModule/Model/Flatrate -> and paste the class code of @maniprakash



                                  Just remember to change the path in type tag on the di.xml



                                  <plugin name="disable-flatrate" type="VendorModuleNameModelCarrierFlatrate" sortOrder="1" />


                                  the path must match where your Model class is it. in my example should be



                                  <plugin name="disable-flatrate" type="My_VendorMyModuleModelFlatrate" sortOrder="1" />


                                  AND that's it! hope it helps! and thanks to @manipakrash , it helps me! =)






                                  share|improve this answer








                                  New contributor




                                  Joshua Castro is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                  Check out our Code of Conduct.






















                                    0












                                    0








                                    0







                                    in response to @Nagaraju and hoping to help to anyone.



                                    The di.xml can be created in any module you have, or if you dont know how and where:



                                    app/code/My_Vendor/MyModule/etc/di.xml -> here is where you put the code of @maniprakash



                                    then you should create the class in:



                                    app/code/My_Vendor/MyModule/Model/Flatrate -> and paste the class code of @maniprakash



                                    Just remember to change the path in type tag on the di.xml



                                    <plugin name="disable-flatrate" type="VendorModuleNameModelCarrierFlatrate" sortOrder="1" />


                                    the path must match where your Model class is it. in my example should be



                                    <plugin name="disable-flatrate" type="My_VendorMyModuleModelFlatrate" sortOrder="1" />


                                    AND that's it! hope it helps! and thanks to @manipakrash , it helps me! =)






                                    share|improve this answer








                                    New contributor




                                    Joshua Castro is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                    Check out our Code of Conduct.










                                    in response to @Nagaraju and hoping to help to anyone.



                                    The di.xml can be created in any module you have, or if you dont know how and where:



                                    app/code/My_Vendor/MyModule/etc/di.xml -> here is where you put the code of @maniprakash



                                    then you should create the class in:



                                    app/code/My_Vendor/MyModule/Model/Flatrate -> and paste the class code of @maniprakash



                                    Just remember to change the path in type tag on the di.xml



                                    <plugin name="disable-flatrate" type="VendorModuleNameModelCarrierFlatrate" sortOrder="1" />


                                    the path must match where your Model class is it. in my example should be



                                    <plugin name="disable-flatrate" type="My_VendorMyModuleModelFlatrate" sortOrder="1" />


                                    AND that's it! hope it helps! and thanks to @manipakrash , it helps me! =)







                                    share|improve this answer








                                    New contributor




                                    Joshua Castro is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                    Check out our Code of Conduct.









                                    share|improve this answer



                                    share|improve this answer






                                    New contributor




                                    Joshua Castro is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                    Check out our Code of Conduct.









                                    answered 2 days ago









                                    Joshua CastroJoshua Castro

                                    1




                                    1




                                    New contributor




                                    Joshua Castro is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                    Check out our Code of Conduct.





                                    New contributor





                                    Joshua Castro is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                    Check out our Code of Conduct.






                                    Joshua Castro is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                    Check out our Code of Conduct.



























                                        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%2f103175%2fmagento-2-hide-other-shipping-methods-when-free-shipping-is-available%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

                                        Grendel Contents Story Scholarship Depictions Notes References Navigation menu10.1093/notesj/gjn112Berserkeree

                                        Area configuration aggregation error after install Porto themeMagento 2.1 CE Installed but front/backend not loading/workingCSS not loading on page within Magento 2 pageCannot install module in Magento 2no commands defined in the “setup” namespace. in Magento2Magento 2: Static files are present but shows 404Why do i have to always run the commands to clean cache in Magento 2.1.8?Failure reason: 'Unable to unserialize value.'Error 500 after magento migrationIn production mode the site does not loadMagento 2 : Error 500 after installing

                                        Middle Expansion Olielle Resaix Definition: Uttering songs of triumph shouting with joy triumphant exulting Sejunction Journal 붙다 달 고급 품목 외출 The stretch trades the screeching tin. Definition: The act of speaking with a drawl a drawl Cough Sand Definition: An uproar a quarrel a noisy outbreak Shake Iron Publicize Horse House Baby 사과 Resaix Flaggy Jelly Temporary Unequaled Puppet A drop in the bucket Shrew 성격 회원 성질 미팅 The burn frames the tacky quality. Materialistic The smoke reduces the way. Yammoe Nondescript Cheek 얼굴 배 약하다 날리다 타다 The illegal country shows the iron. Help Rule Drearien Smoke Teaching Meaty Wasp Abraham Lincoln Jaws 진심 수리하다 Size Cork Idea Convert Think Lark John Lennon 거울 청소 군 추천하다 아이스크림