| 4.2.2. The Shipping API specification |
| Prev | 4.2. Shipping Modules | Next |
|---|
The following is a list of all methods that must be implemented by a shipping module's class file.
Lists all available shipping rates.
The array $d contains the values
for the cart total weight ($d['weight'])
and the ID for the shipping address the user has selected
($d['ship_to_info_id']). The
ship_to_info_id refers to the field user_info_id in the
tables mos_users OR mos_vm_user_info. Check both for a
matching entry!
Returns the amount for the selected shipping rate by analyzing the parameter shipping_rate_id.
Returns the tax rate for this shipping module (e.g. 0.16).
Validates the value for the parameter
shipping_rate_id usually using isset(
$_SESSION[$shipping_rate_id] ).
Assumes you have set the value in the function list_rates for each returned shipping rate.
Stores all configuration values for this shipping module in the configuration file.
Shows the configuration form for this shipping module in the shipping module form.
returns true if the configuration file for that module is writeable, false if not
Please always change configuration variables in both functions: show_configuration and write_configuration!