3rd party contributions - Shipping Modules - Australia Post

From Zen Cart(tm) Wiki
Jump to: navigation, search


This is the famous AusPost module that we all know and love. The previous version was 2.03 and a lot of people who tried to use it with Zen Cart™ v1.3.0.1 received that error in line 72 issue.

What I have done is alter the files that where in the /modules/shipping directory as per the various threads on this issue and added a Readme2nd file with some handy tips.

Thanx to Steve Kemp for the osCommerce version , Greg Hooper for porting it to Zen Cart™ and all the forum members who banded together to make it work for v1.3.

This is not compatible with earlier versions of Zen Cart™.

This mod now has the ability to use Registeed Post for areas within Australia. As always when upgrading BACKUP FIRST.

TIP Open the README NOW file first for existing users.

TIP For new users open all README files first.



Support Thread


Read Me

AUSPOST V3.02 21/07/2006

This updated version includes REGISTERED POST for destinations within Australia.

  1. The changes to this module are in includes/languages/english/modules/shipping/ files changed are austpost.php & austpostexpress.php.
  2. The changes to this module are in includes/modules/shipping/ files changed are austpost.php & austpostexpress.php.

Feel free to PM me if you have problems installing it :) (PM is Gerard)

Enjoy !!!

AUSPOST V3.01 01/06/2006

The changes to this module are all in the INCLUDES/MODULES/SHIPPING section.

This line

if ($cart->show_total() <= $insurance_table[$i]) {

has been changed to

if ($_SESSION['cart']->show_total() <= $insurance_table[$i]) {

to remove the dreaded issues everyone was having with the latest version of Zen Cart™.

The only know issue I have come across with this is...
cannot get the icons to display. Maybe this is just a template thing on my end. I will be looking at fixing it down the track and will upgrade this mod if it is causing the problems.

Feel free to PM me if you have problems installing it :) (PM is Gerard)

Enjoy !!!

auspost.php,v2.0.3a 2004/12/23 for For Zen Cart™

Originally released by Steve Kemp for osCommerce v2.2
Ported to Zencart by Greg Hooper - www.ozetrade.net

Released 23th December 2004
Released under the GNU General Public License

THIS MODULE IS DESIGNED FOR - Zen Cart™ version 1.2.x
This module has been tested on versions 1.2.1, 1.2.2 & 1.2.3

The test environment was:
Apache v1.3.33
PHP v4.3.9
Zend Engine v1.3.0
Zend Optimizer v2.5.5


This mod contains 5 seperate shipping modules:

  • Australian destinations
    • Post Parcel
    • Express Post
  • Overseas destinations
    • Australia AirMail
    • Economy Air
    • SeaMail

All have options for insurance rates, which can be added manually via the admin.

The modules now have an estimated delivery time response that displays an estimated time for delivery.

A shipping handling fee and an Insurance fee can also be added to each module via admin.

Error response codes have been blocked out as they can be confusing to the customer, so a generic error response is shown in the case of an error.

For more info on the Auspost DRC, and for their terms and conditions...

The module allows you to send products to the states of Australia, and Internationally from Australia, based on weight, and destination country and/or postcode, using the various Australia Post options available.

This release fixes a few bugs as well as full implimentation of the new zones functionality allowing you to select which zone the module is available for. It also uses the new shippng tax functions.

This release has also assigned icons to each module in the checkout. The Australia Post Maximum shipping level of 20kg has been taken into account as well. What now happens is if your order is over 20kg the module will split your order into multiple packages and calculate the correct cost. The system now splits the order into multiple packages based total order weight divided by the maximum shipping weight.

The modules also now have adjustable package dimension functions which can be adjusted in admin. This allows for weight calculation by Cubic Weight which is the system that Australia Post uses for large bulky lightweight packages. Individual package dimensions is not supported at the time.

Cubic weight is calculated by measuring and multiplying the length, height and width of the parcel. The result is then multiplied by the industry standard cubic weight conversion factor of 250.

eg. a parcel measuring 40cm long(0.4m) x 20cm high(0.2m) and x 30cm wide(0.3m)is equal to 0.024 cubic meter. Multiplied by the coversion factor of 250 gives, therefore, a cubic weight of 6kg.

0.4 x 0.2 x 0.3 = 0.024 0.024 x 250 = 6 kgs

If the actual weight is 4kg, postage would be assessed on the basis of 6kg.

NOTE: Be cautious of this feature if you are unsure of the dimensions or dont have a full understanding of how cubic weight is determined.

Incorrect settings of the package dimensions can cause the module to return an errro message. If you are unsure leave them at the default 100x100x100 as this turns off the cubic weight and all calculations are based on actual weight.






The default installation willl suit any installation that DOES NOT have table prefixes in the database. Zen Cart™ versions prior to v1.2.3 had the table prefix set to zen_ by default. v1.2.3 does not have a default table prefix.

If you have used a table prefix, you will need to adjust the sql script in auspost.sql to match your table prefix. Table prefix can be checked using MyphpAdmin

Example - if your database has the table prefix zen_ at the begining of every table, then:

These lines:

CREATE TABLE geo_zones (

need to be changed to:

DROP TABLE IF EXISTS zen_geo_zones;
CREATE TABLE zen_geo_zones (

any line starting with:

INSERT INTO geo_zones

change to:

INSERT INTO zen_geo_zones

These lines:

DROP TABLE IF EXISTS zones_to_geo_zones;
CREATE TABLE zones_to_geo_zones (

need to be changed to:

DROP TABLE IF EXISTS zen_zones_to_geo_zones;
CREATE TABLE zen_zones_to_geo_zones (

any line starting with:

INSERT INTO zones_to_geo_zones

change to:

INSERT INTO zen_zones_to_geo_zones


This package does not overwrite any existing files - it does overwrite database tax zones (read NOTE 2).

NOTE 1: Make sure you have read the important notes above first - you have been warned.

NOTE 2: If you have already setup tax zones in your store, record those settings, as the auspost .sql file will overwrite current tax zones.

  1. In admin, choose from the top menu - Configuration > Shipping/Packaging and set the correct "Country of Origin" and "Postal Code". Then set package max size to 20 .
  2. In admin, choose from the top menu - Tools > Install SQL Patches
  3. Browse your hard drive for the for the auspost.sql file.
  4. Click on upload
  5. Copy the "include" folder from the auspost package to the catalog(root) folder. If prompted about existing folders, just accepted and continued.
  6. In admin, choose from the top menu - Module > Shipping - and activated/install the auspost modules you want to use.
  7. Configured the Parcel Post and Express Post modules for Australian Zones.
  8. Configured all other Auspost modules for world zones.
  9. Setup the Dispatch Postcode for all auspost modules to suit your dispatch location.


Turn on the modules you require in admin and apply any insurance or handling fees you may want.

Australia Post insurance varies depending on the type of goods and destination so you may want to refer to the Postal charges book available at any post office for more details.

The World Zones included on the sql contain all current overseas destinations that Australia post delivers to. You may or may not want to offer shipping to all detinations so you can either create seperate zones containing countries you want to deliver to and assign it to the desired auspost module or you can edit the world zones to suit.

You may wish to offer Air Mail to only select countries and perhaps Economy Air to others and Only Sea mail to other destinations. I have included a sample of the zones setup that could be used in this scenario. called sample.sql you can install it via phpMyadmin and edit the countries within those zones to suit.


Nothing i can think of at the moment.


Originally thought to be a bug but not....if you have the "Larger packages - percentage increase" setting in your store configuration set to anything over 0 it will add a percentage of weight to the quote.

Also ensure tare weight is set to 0 otherwise the tare weight will be added to you package.

There are no know issues with the modules.


If you find this mod helpful feel free to make a donation via PayPal or Paymate to the "Save The Snowman Foundation" ....(info@snowtech.com.au)

Or to Greg Hooper via Paymate:</br /> paymate@ozetrade.net