Take the 2-minute tour ×
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It's 100% free, no registration required.

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

share|improve this question
add comment

1 Answer 1

up vote 2 down vote accepted

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.

share|improve this answer
    
For completeness' sake: and Mage_Shipping_Model_Carrier_Abstract::getConfigData/getConfigFlag('[field_name]‌​'). –  nevvermind May 7 at 8:56
    
@nevvermind. Right. That would work to. I will add it to the answer. Thanks. –  Marius May 7 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 May 8 at 2:06
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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