
This is the implementation guide for the Modulus parcelpost.module, versions 1.0 and later. It is assumed that the reader is familiar with HTML and execution of CGI scripts.
parcelpost.module provides you with an easily-integrated routine for calculating Australia Post parcel post charges to any postcode within Australia.
To calculate the Australia Post parcel post charges, you provide the source and destination postcode, the weight of the parcel in grammes, the volume of the parcel (for bulky parcels) and whether to get charges for parcel post of Express service. The Australia Post charge is returned.
This routine implements all of the special cases and exceptions for parcels up to 20 kg (Australia Post does not accept parcels over 20 kg), including light parcels, bulks parcels, intrastate deliveries, Norfolk Island special charges and least values for borderline postcodes.
parcelpost.module has been updated to the latest rates as at September 2006, and will be updated with each A.P. revision of rates (usually annual).
The module comprises a Perl file ("parcelpost.pl"). The Perl file should be installed in your CGI-BIN executable path; we suggest to install it in its own directory, e.g.:
...your site.../cgi-bin/parcelpost/parcelpost.pl
Make sure to set permissions executable, e.g. 0755 for *NIX.
The interface is very simple. There is one function which provides all of the required functionality, viz:
lib_getCharge();
This function is called with the following parameters:
source postcode: This is the postcode from which you are to send the parcel.
destination postcode: This is the postcode to which you wish to send the parcel.
weight grammes: This is the weight in grammes of the package. You should include an appropriate packaging allowance.
volume cc: This is the volume in cubic centimetres of the package. You should include for packing/wrapping, especially for awkward shaped parcels (A wrapped kitchen chair
will have a much larger volume than the bare chair).
express: Set to 1 for Express Post rates, or 0 for Parcel Post rates.
An example call would be $post = lib_getCharge('3187','0800',550,38,0);
This example calculates the postal charge for Parcel Post postage of a 550 gramme parcel of 38 cc volume from Brighton East to Alice Springs.
If the 'deemed weight' (greater of weight or volume/4) exceeds 20 kilograms, Australia Post will not accept the parcel for postage and the pricing routine will return the undefined value 'undef'.
If you experience problems with the implementation, contact Modulus for assistance.