Tag Archives: shipping Method Module

Magento is one of the best and well-to-do e-commerce platforms where you can find quite a lot of shipping methods. On the other hand, when you are having big e-commerce sites you may need to build up your own custom shipping methods.

Generating a custom shipping method is not so difficult; you just have to get all the necessary information regarding various functions that have to be use inside the shipping method class to put in various configuration selections.

Every shipping method can be prepared as separate module but if some methods could be used together or have same functionality than it can be combined in the same module.

Make sure that app/code/local is in PHP‘s include_path. For doing this, you need to carry out the following code:

<?php echo get_include_path();?>

Be certain you place this code anywhere after Magento was loaded.
Configuration:

You need to form app/code/local/YourCompany/NewModule/etc/config.xml:
<?xml version=”1.0″?>
<config>
<modules>
<!– declare module’s version information –>
<YourCompany_NewModule>
<!– this version number will be used for database upgrades –>
<version>0.1.0</version>
</YourCompany_NewModule>
</modules>
<global>
<!– declare model group for new module –>
<models>
<!– model group alias to be used in Mage::getModel() –>
<newmodule>
<!– base class name for the model group –>
<class>YourCompany_NewModule_Model</class>
</newmodule>
</models>
<!– declare resource setup for new module –>
<resources>
<!– resource identifier –>
<newmodule_setup>
<!– specify that this resource is a setup resource and used for upgrades –>
<setup>
<!– which module to look for install/upgrade files in –>
<module>YourCompany_NewModule</module>
</setup>
<!– specify database connection for this resource –>
<connection>
<!– do not create new connection, use predefined core setup connection –>
<use>core_setup</use>
</connection>
</newmodule_setup>
</resources>
</global>
</config>