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

Adding the business logic

If you successfully followed the previous instructions, you should now have a bare minimum shipping extension. Consider it a starting point for adding further business logic to it. Right now, our shipping method will always set the shipping price to $14.99, since this value is currently hardcoded into the code, and it will be applicable to customers from all states.

In order to achieve the Will only be applicable to the customers who selected United States as a shipping country functionality as planned, the following steps need to be performed:

  1. Edit the app/code/community/Foggyline/Cargo/etc/system.xml file by adding the following two fields to it, right below the name field:
    <allowspecific translate="label"> <label>Ship ...

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