1

How can I fetch the options or details of the shipping method configured in the admin side?

1 Answer 1

2

You can get that just like you get any config value:

Mage::getStoreConfig('PATH GOES HERE');

In you case it will be

Mage::getStoreConfig('carriers/[shipping_method_code]/[field_name]');

Replace '[shipping_method_code]' and '[field_name]' with the appropriate values.

[EDIT]
as @nevvermind said in the comments below.
If you have the shiping method model instance you can use:

$model->getConfigData('[field_name]');  

take a look at how Mage_Shipping_Model_Carrier_Abstract::getConfigData works.

3
  • For completeness' sake: and Mage_Shipping_Model_Carrier_Abstract::getConfigData/getConfigFlag('[field_name]').
    – nevvermind
    Commented May 7, 2014 at 8:56
  • @nevvermind. Right. That would work to. I will add it to the answer. Thanks.
    – Marius
    Commented May 7, 2014 at 9:01
  • Than you so much, I'm still new to magento so I had a hard time configuring these stuffs. But this already answered my question ^_^
    – user6493
    Commented May 8, 2014 at 2:06

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.