I want to get string from store level configuration (for each store differntly), but its taking from default

CONST SMS_FOR_ORDER_SHIPPED = 'sendsms/sms_templates/order_shipped';

i have also tried

Mage::getStoreConfig(SMS_FOR_ORDER_SHIPPED, $order_id->getData('store_id'))

I also tried

Mage::getStoreConfig('sendsms/sms_templates/order_shipped', $order_id->getData('store_id'))

But not working

  • Also tried :$template = Mage::getStoreConfig('sendsms/sms_templates/order_shipped',Mage::app()->getStore());
    – Hitendra
    Commented Aug 16, 2016 at 13:21

1 Answer 1


I Solved by

Mage::getStoreConfig(self::SMS_FOR_ORDER_SHIPPED, Mage::getModel('core/store')->load($order->getStoreId())->getWebsiteId());

$order : I got by using event observer $order = $observer->getEvent()->getOrder();

What was the problem ?

-I was getting store or website id irrespective of the order related to website or store. I found that it was giving store id / website id as 0 and hence it was taking data from default configuration.

What is the solution ?

-I have to get store or website id on which the order has received and then i have to get the configuration data related to that particular website(id).
so it will get the website id/ store id of the order.

for example : If Magento has received order from website id 2 then basically it will look like

Mage::getStoreConfig(self::SMS_FOR_ORDER_SHIPPED, 2);

Where Mage::getModel('core/store')->load($order->getStoreId())->getWebsiteId() will give website id on which order has arrived and then it will get configuration content belong to that website

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.