Getting the store ID when placing an admin order
-
01-10-2020 - |
Question
I have a multisite setup with multiple custom shipping modules. Each store has different settings for free shipping etc.. (based on weight/value)
Everything works great from the front end, however on the backend the modules take the default values and do not recognize that a store has been selected.
I can detect if it is an admin order, but no idea how to detect what store has been selected and how to get the variables for that store
I am using the following
$current_cart_total_inc >=Mage::getStoreConfig('general/custom_values/free_ship_threshold');
How can I detect the store and then get the correct value based on the store ID rather than use the admin one?
Solution
You can get store value with below code: to get store id in adminend
$this->getRequest()->getParam('store_id');
for frontend
$store_id = Mage::app()->getStore()->getStoreId();
$current_cart_total_inc = Mage::getStoreConfig('general/custom_values/free_ship_threshold', $store_id);
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange