Programatically enable Free Shipping and set minimum order ammount for it
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
add a comment |
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
add a comment |
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
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
magento-1.7 configuration shipping-methods installation install-script
edited 40 mins ago
Teja Bhagavan Kollepara
2,96341847
2,96341847
asked Sep 15 '14 at 9:03
someGuyOnTheWebsomeGuyOnTheWeb
1117
1117
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
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
add a comment |
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
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
add a comment |
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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
add a comment |
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
add a comment |
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
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
answered Nov 20 '14 at 11:59
David MannersDavid Manners
24.6k862211
24.6k862211
add a comment |
add a comment |
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
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
add a comment |
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
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
add a comment |
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
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
edited May 23 '17 at 12:37
Community♦
1
1
answered Sep 15 '14 at 14:05
Amit Bera♦Amit 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
add a comment |
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
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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