O'Reilly logo

Getting Started with Magento Extension Development by Branko Ajzele

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Defining your shipping method

Now that we have a clear picture on different elements that comprise a single shipping method, let's define one, by performing the following steps:

  1. Edit the config.xml file by adding the following code to it. This defines a model class group that we will use later for further defining the config/default/carriers XML element.
    <?xml version="1.0" encoding="UTF-8"?>
    <config>
      <!-- ... -->
      <global>
        <models>
            <foggyline_cargo>
              <class>Foggyline_Cargo_Model</class>
            </foggyline_cargo>
          </models>
      </global>    
      <!-- ... -->
    </config>
  2. Edit the config.xml file by adding the following code to it. This adds the definition for our shipping method (carrier).
    <?xml version="1.0" encoding="UTF-8"?> <config> <!-- ... --> <default> <carriers> <foggyline_cargo_fixy> ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required