A) Components
To create a shipping module two main files are compolsory:
/includes/languages/english/modules/shipping/YOUR_SHIPPING_MODULE.php
Usually it contains two lines: title and description
For example:
define(‘MODULE_SHIPPING_YOUR_SHIPPING_MODULE_TEXT_TITLE’ , ‘YOUR_SHIPPING_MODULE‘);
define(‘MODULE_SHIPPING_YOUR_SHIPPING_MODULE_TEXT_DESCRIPTION’ , ‘YOUR_SHIPPING_MODULE‘) ;
/includes/modules/shipping/YOUR_SHIPPING_MODULE.php
It contains a “class” which will be initialised into into : /admin/modules.php
Table and / or external server interrogation may be necessary.
B) How it works
Module is initialised in : /admin/modules.php
Quotation is done in : checkout_shipping (see its header in /includes/pages/checkout_shipping/header.php )
See line (approx) #178
// get all available shipping quotes
$quotes = $shipping_modules->quote();
You can get to this page from many points.
Estimation shipping may be added.




(20 votes, average: 4.75 out of 5, rated)