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

Return to UK after being refused entry years previously

How to notate time signature switching consistently every measure

What do hard-Brexiteers want with respect to the Irish border?

How to deal with fear of taking dependencies

Why do UK politicians seemingly ignore opinion polls on Brexit?

The difference between dialogue marks

What is the meaning of Triage in Cybersec world?

Can a flute soloist sit?

Am I thawing this London Broil safely?

How to answer pointed "are you quitting" questioning when I don't want them to suspect

Who coined the term "madman theory"?

Why was M87 targetted for the Event Horizon Telescope instead of Sagittarius A*?

What are the motivations for publishing new editions of an existing textbook, beyond new discoveries in a field?

Scaling a graph of a circle and the standard parabola in TikZ

What is the closest word meaning "respect for time / mindful"

Is "plugging out" electronic devices an American expression?

Have you ever entered Singapore using a different passport or name?

Why is the maximum length of OpenWrt’s root password 8 characters?

Shouldn't "much" here be used instead of "more"?

Deal with toxic manager when you can't quit

If a Druid sees an animal’s corpse, can they wild shape into that animal?

How to obtain Confidence Intervals for a LASSO regression?

I see my dog run

Are children permitted to help build the Beis Hamikdash?



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

                                        Jet Time Laivasto | Lähteet | Aiheesta muualla | NavigointivalikkoJet Time - The CompanyThe CompanyManagementJet Time aloittaa lauantaina Suomi-rekisterissä olevalla Boeing 737 -koneellaJettime Finland Fleet Details and HistoryJettime Fleet Details and HistoryRegional Jet OÜ takes over ATR production for SASJet Time Returns To Its Core BusinessYhtiön kotisivutlaajentamalla

                                        Olympian arkeologinen museo Sisällysluettelo Historia ja rakennus | Kokoelmat | Lähteet | Aiheesta muualla | Navigointivalikko37°38′36″N, 21°37′46″EInfobox OKArchaeological Museum of Olympia: HistoryArchaeological Museum of Olympia: DescriptionΜουσείο Ιστορίας των Ολυμπιακών Αγώνων της Αρχαιότητας: ΙστορικόArchaeological Museum of Olympia

                                        Äpy Sisällysluettelo Äpyt kautta historian | Esimerkkejä Äpy-huumorista | Katso myös | Kirjallisuutta | Aiheesta muualla | Navigointivalikkowww.äpy.fi