PropertiesShow Parent
Tags:   No tags associated yet.

You can search the whole VirtueMart Knowledge Base! Just type in your search keywords in the text box on the upper right of this page.

Shipping Modules

The Basics

Shipping modules are located in the directory

/administrator/components/com_virtuemart/classes/shipping/

and have three files: the class file, the information file and the configuration file.

Example: Module "myShipping"

You must have three files, called

myShipping.php
Contains the class myShipping
myShipping.ini
Contains Information about the Name of the Module & the Author and the File Version, ...)
myShipping.cfg.php
Contains all necessary configuration constant definitions

When activated in the Shop configuration, this shipping module will be loaded on the shipping method selection screen, beside all other activated shipping modules.

The shipping rate, a user has selected during checkout is passed from step to step by the parameter shipping_rate_id.

This parameter follows a strict syntax and must be a string build like this:

ShippingClassName|carrier_name|rate_name|totalshippingcosts|rate_id

For our example the shipping rate id for one rate could be:

myShipping|My Carrier|My Rate Name|45.00

The last field (rate_id) can be left empty. The shipping_rate_id parameter is always passed as an urlencoded string.

Installing a Shipping Module

Shipping modules also can't be automatically installed, but you must copy the three files mentioned above into the directory

/administrator/components/com_virtuemart/classes/shipping/

After having done that, you must go to the Shop Configuration, where your new shipping module will be automatically recognized (by reading its ini - File) and presented to you as an additional shipping method under the Tab "Shipping".

You can now select it and save the Configuration.