Magento 2: Hide other shipping methods when free shipping is available The 2019 Stack Overflow Developer Survey Results Are InHow 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

Is three citations per paragraph excessive for undergraduate research paper?

Why is my custom API endpoint not working?

How to manage monthly salary

Is flight data recorder erased after every flight?

Why hard-Brexiteers don't insist on a hard border to prevent illegal immigration after Brexit?

Does a dangling wire really electrocute me if I'm standing in water?

Write faster on AT24C32

How to notate time signature switching consistently every measure

What is the most effective way of iterating a std::vector and why?

Resizing object distorts it (Illustrator CC 2018)

Why do UK politicians seemingly ignore opinion polls on Brexit?

Landlord wants to switch my lease to a "Land contract" to "get back at the city"

Time travel alters history but people keep saying nothing's changed

Should I use my personal e-mail address, or my workplace one, when registering to external websites for work purposes?

What does "fetching by region is not available for SAM files" means?

"as much details as you can remember"

Worn-tile Scrabble

What does ひと匙 mean in this manga and has it been used colloquially?

Why isn't airport relocation done gradually?

Did Section 31 appear in Star Trek: The Next Generation?

Apparent duplicates between Haynes service instructions and MOT

I see my dog run

What is the motivation for a law requiring 2 parties to consent for recording a conversation

Deal with toxic manager when you can't quit



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



The 2019 Stack Overflow Developer Survey Results Are InHow 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;








7















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




























    7















    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
























      7












      7








      7


      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

      3815




      3815




















          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








              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








                                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








                                  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








                                    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








                                    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


                                    share






                                    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 6 mins 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

                                        Best approach to update all entries in a list that is paginated?Best way to add items to a paginated listChoose Your Country: Best Usability approachUpdate list when a user is viewing the list without annoying themWhen would the best day to update your webpage be?What should happen when I add a Row to a paginated, sorted listShould I adopt infinite scrolling or classical pagination?How to show user that page objects automatically updateWhat is the best location to locate the comments section in a list pageBest way to combine filtering and selecting items in a listWhen one of two inputs must be updated to satisfy a consistency criteria, which should you update (if at all)?

                                        Вунгтау (аеропорт) Загальні відомості | Див. також | Посилання | Навігаційне меню10°22′00″ пн. ш. 107°05′00″ сх. д. / 10.36667° пн. ш. 107.08333° сх. д. / 10.36667; 107.0833310°22′00″ пн. ш. 107°05′00″ сх. д. / 10.36667° пн. ш. 107.08333° сх. д. / 10.36667; 107.083337731608Vinh AirportVinh airport facelift improves serviceвиправивши або дописавши їївиправивши або дописавши їїр

                                        Тонконіг бульбистий Зміст Опис | Поширення | Екологія | Господарське значення | Примітки | Див. також | Література | Джерела | Посилання | Навігаційне меню1114601320038-241116202404kew-435458Poa bulbosaЭлектронный каталог сосудистых растений Азиатской России [Електронний каталог судинних рослин Азіатської Росії]Малышев Л. Л. Дикие родичи культурных растений. Poa bulbosa L. - Мятлик луковичный. [Малишев Л. Л. Дикі родичи культурних рослин. Poa bulbosa L. - Тонконіг бульбистий.]Мятлик (POA) Сем. Злаки (Мятликовые) [Тонконіг (POA) Род. Злаки (Тонконогові)]Poa bulbosa Linnaeus, Sp. Pl. 1: 70. 1753. 鳞茎早熟禾 lin jing zao shu he (Description from Flora of China) [Poa bulbosa Linnaeus, Sp. Pl. 1: 70. 1753. 鳞茎早熟禾 lin jing zao shu he (Опис від Флора Китаю)]Poa bulbosa L. – lipnice cibulkatá / lipnica cibulkatáPoa bulbosa в базі даних Poa bulbosa на сайті Poa bulbosa в базі даних «Global Biodiversity Information Facility» (GBIF)Poa bulbosa в базі даних «Euro + Med PlantBase» — інформаційному ресурсі для Євро-середземноморського розмаїття рослинPoa bulbosa L. на сайті «Плантариум»