Programatically enable Free Shipping and set minimum order ammount for it












3















I am writing a custom module, which deals with order creation, for
multiple stores with free-shipping disabled.



What should I call in my install scripts or add to my config.xml in order to enable shipping_method == freeshipping_freeshipping and set it's minimum order amount to 0 ?










share|improve this question





























    3















    I am writing a custom module, which deals with order creation, for
    multiple stores with free-shipping disabled.



    What should I call in my install scripts or add to my config.xml in order to enable shipping_method == freeshipping_freeshipping and set it's minimum order amount to 0 ?










    share|improve this question



























      3












      3








      3


      1






      I am writing a custom module, which deals with order creation, for
      multiple stores with free-shipping disabled.



      What should I call in my install scripts or add to my config.xml in order to enable shipping_method == freeshipping_freeshipping and set it's minimum order amount to 0 ?










      share|improve this question
















      I am writing a custom module, which deals with order creation, for
      multiple stores with free-shipping disabled.



      What should I call in my install scripts or add to my config.xml in order to enable shipping_method == freeshipping_freeshipping and set it's minimum order amount to 0 ?







      magento-1.7 configuration shipping-methods installation install-script






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited 40 mins ago









      Teja Bhagavan Kollepara

      2,96341847




      2,96341847










      asked Sep 15 '14 at 9:03









      someGuyOnTheWebsomeGuyOnTheWeb

      1117




      1117






















          2 Answers
          2






          active

          oldest

          votes


















          4














          You should be able to do the following in your setup script to enable free shipping.



          $installer->setConfigData('carriers/freeshipping/active', true);
          $installer->setConfigData('carriers/freeshipping/free_shipping_subtotal', 0);


          Where the installer is of type Mage_Core_Model_Resource_Setup






          share|improve this answer































            1














            You can do this using install which is update this free shipping method details using



            $groups=array();
            $groups[freeshipping][fields][active][value]=true;
            $groups[freeshipping][fields][free_shipping_subtotal][value]=0


            here [freeshipping][fields][active][value] is field name .you can see this in
            here freeshipping is shipping method code and active is field name of activation



            from admin input field



            Mage::getModel('adminhtml/config_data')
            ->setSection('carriers')
            ->setWebsite(null)
            ->setStore($StoreId)
            ->setGroups($groups)
            ->save();


            if you have multi store then you need fetch all store and run this code in foop



            see more at



            https://stackoverflow.com/questions/2474039/magento-update-store-logo-programmatically






            share|improve this answer


























            • Thank you, very much for the answer, Mr. Bera. Unfortunately some IRL changes, prevented me from implementing what was going to be a golden-plating functionality for the said client. Regardless I will test the solution at 1st available opportunity and accept the answer. Thanks again.

              – someGuyOnTheWeb
              Oct 23 '14 at 17:24













            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%2f35828%2fprogramatically-enable-free-shipping-and-set-minimum-order-ammount-for-it%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            4














            You should be able to do the following in your setup script to enable free shipping.



            $installer->setConfigData('carriers/freeshipping/active', true);
            $installer->setConfigData('carriers/freeshipping/free_shipping_subtotal', 0);


            Where the installer is of type Mage_Core_Model_Resource_Setup






            share|improve this answer




























              4














              You should be able to do the following in your setup script to enable free shipping.



              $installer->setConfigData('carriers/freeshipping/active', true);
              $installer->setConfigData('carriers/freeshipping/free_shipping_subtotal', 0);


              Where the installer is of type Mage_Core_Model_Resource_Setup






              share|improve this answer


























                4












                4








                4







                You should be able to do the following in your setup script to enable free shipping.



                $installer->setConfigData('carriers/freeshipping/active', true);
                $installer->setConfigData('carriers/freeshipping/free_shipping_subtotal', 0);


                Where the installer is of type Mage_Core_Model_Resource_Setup






                share|improve this answer













                You should be able to do the following in your setup script to enable free shipping.



                $installer->setConfigData('carriers/freeshipping/active', true);
                $installer->setConfigData('carriers/freeshipping/free_shipping_subtotal', 0);


                Where the installer is of type Mage_Core_Model_Resource_Setup







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Nov 20 '14 at 11:59









                David MannersDavid Manners

                24.6k862211




                24.6k862211

























                    1














                    You can do this using install which is update this free shipping method details using



                    $groups=array();
                    $groups[freeshipping][fields][active][value]=true;
                    $groups[freeshipping][fields][free_shipping_subtotal][value]=0


                    here [freeshipping][fields][active][value] is field name .you can see this in
                    here freeshipping is shipping method code and active is field name of activation



                    from admin input field



                    Mage::getModel('adminhtml/config_data')
                    ->setSection('carriers')
                    ->setWebsite(null)
                    ->setStore($StoreId)
                    ->setGroups($groups)
                    ->save();


                    if you have multi store then you need fetch all store and run this code in foop



                    see more at



                    https://stackoverflow.com/questions/2474039/magento-update-store-logo-programmatically






                    share|improve this answer


























                    • Thank you, very much for the answer, Mr. Bera. Unfortunately some IRL changes, prevented me from implementing what was going to be a golden-plating functionality for the said client. Regardless I will test the solution at 1st available opportunity and accept the answer. Thanks again.

                      – someGuyOnTheWeb
                      Oct 23 '14 at 17:24


















                    1














                    You can do this using install which is update this free shipping method details using



                    $groups=array();
                    $groups[freeshipping][fields][active][value]=true;
                    $groups[freeshipping][fields][free_shipping_subtotal][value]=0


                    here [freeshipping][fields][active][value] is field name .you can see this in
                    here freeshipping is shipping method code and active is field name of activation



                    from admin input field



                    Mage::getModel('adminhtml/config_data')
                    ->setSection('carriers')
                    ->setWebsite(null)
                    ->setStore($StoreId)
                    ->setGroups($groups)
                    ->save();


                    if you have multi store then you need fetch all store and run this code in foop



                    see more at



                    https://stackoverflow.com/questions/2474039/magento-update-store-logo-programmatically






                    share|improve this answer


























                    • Thank you, very much for the answer, Mr. Bera. Unfortunately some IRL changes, prevented me from implementing what was going to be a golden-plating functionality for the said client. Regardless I will test the solution at 1st available opportunity and accept the answer. Thanks again.

                      – someGuyOnTheWeb
                      Oct 23 '14 at 17:24
















                    1












                    1








                    1







                    You can do this using install which is update this free shipping method details using



                    $groups=array();
                    $groups[freeshipping][fields][active][value]=true;
                    $groups[freeshipping][fields][free_shipping_subtotal][value]=0


                    here [freeshipping][fields][active][value] is field name .you can see this in
                    here freeshipping is shipping method code and active is field name of activation



                    from admin input field



                    Mage::getModel('adminhtml/config_data')
                    ->setSection('carriers')
                    ->setWebsite(null)
                    ->setStore($StoreId)
                    ->setGroups($groups)
                    ->save();


                    if you have multi store then you need fetch all store and run this code in foop



                    see more at



                    https://stackoverflow.com/questions/2474039/magento-update-store-logo-programmatically






                    share|improve this answer















                    You can do this using install which is update this free shipping method details using



                    $groups=array();
                    $groups[freeshipping][fields][active][value]=true;
                    $groups[freeshipping][fields][free_shipping_subtotal][value]=0


                    here [freeshipping][fields][active][value] is field name .you can see this in
                    here freeshipping is shipping method code and active is field name of activation



                    from admin input field



                    Mage::getModel('adminhtml/config_data')
                    ->setSection('carriers')
                    ->setWebsite(null)
                    ->setStore($StoreId)
                    ->setGroups($groups)
                    ->save();


                    if you have multi store then you need fetch all store and run this code in foop



                    see more at



                    https://stackoverflow.com/questions/2474039/magento-update-store-logo-programmatically







                    share|improve this answer














                    share|improve this answer



                    share|improve this answer








                    edited May 23 '17 at 12:37









                    Community

                    1




                    1










                    answered Sep 15 '14 at 14:05









                    Amit BeraAmit Bera

                    58.8k1475174




                    58.8k1475174













                    • Thank you, very much for the answer, Mr. Bera. Unfortunately some IRL changes, prevented me from implementing what was going to be a golden-plating functionality for the said client. Regardless I will test the solution at 1st available opportunity and accept the answer. Thanks again.

                      – someGuyOnTheWeb
                      Oct 23 '14 at 17:24





















                    • Thank you, very much for the answer, Mr. Bera. Unfortunately some IRL changes, prevented me from implementing what was going to be a golden-plating functionality for the said client. Regardless I will test the solution at 1st available opportunity and accept the answer. Thanks again.

                      – someGuyOnTheWeb
                      Oct 23 '14 at 17:24



















                    Thank you, very much for the answer, Mr. Bera. Unfortunately some IRL changes, prevented me from implementing what was going to be a golden-plating functionality for the said client. Regardless I will test the solution at 1st available opportunity and accept the answer. Thanks again.

                    – someGuyOnTheWeb
                    Oct 23 '14 at 17:24







                    Thank you, very much for the answer, Mr. Bera. Unfortunately some IRL changes, prevented me from implementing what was going to be a golden-plating functionality for the said client. Regardless I will test the solution at 1st available opportunity and accept the answer. Thanks again.

                    – someGuyOnTheWeb
                    Oct 23 '14 at 17:24




















                    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%2f35828%2fprogramatically-enable-free-shipping-and-set-minimum-order-ammount-for-it%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

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

                    Berlina muro

                    Berlina aerponto