Biz Connection FREE TRIAL + $75 GOOGLE ADWORD - FREE VOUCHER for YOU!

Shipping Module – ZenCart

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.

Related articles

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

Leave a Comment