0

How can I get the options of a custom shipping method. I couldn't really find anything useful. Only that:

$shippingmethods = Mage::getSingleton('shipping/config');
        foreach($shippingmethods as $code =>$carrier) {
            if ($code == 'my_shipping_metho')
                //do something1
        }

But $shippingmethods is always empty and therefore I never enter the foreach.

and that:

$shippingMethods = Mage::getSingleton('shipping/config')->getActiveCarriers();
        $shippingMethods['my_shipping_method'];

But here I don't have any useful data. Just ID and store.

So, I have a shipping method, which has options for certain kilograms. And I want to get the minimum weight of that method. I know the code of the method.

1

To get the options created in admin for a shipping method please use following code:

$carriers_selected = Mage::getStoreConfig('config_mode/namespaces/myuser');

like see the xml format for system.xml

<config>
    <sections>
        <config_mode>
            <groups>
                <namespaces translate="label" module="ship"> 
                 <myuser translate="label">
                            <label>Username</label>
                            <frontend_type>text</frontend_type>
                            <sort_order>2</sort_order>
                            <show_in_default>1</show_in_default>
                            <show_in_website>1</show_in_website>
                            <show_in_store>1</show_in_store>
                        </myuser>

Hope you find a solution its working for me

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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