Mity Docs Mity Docs for Mity Digital
Australia Post Shipping for Simple Commerce Documentation

Configuration

If you haven't already, make sure you publish the addon's config file - you'll need to do this:

1php please vendor:publish --tag=simple-commerce-australia-post-config

When you have published the configuration file, you can find it in /config/simple-commerce-australia-post.php. This is where you can:

  • define your Blueprint field mappings

  • define your "from" postcode, required for calculations to work

  • tweak your .env API key variable name (if you wanted)

The comments in the config file should help you set up your configuration with ease.

mappings

The mappings array defines a number of properties that the addon requires to operate correctly.

The mapping keys must remain - but the values for each are the field handle to collect the dimension attributes.

The default config looks for a field called "height". If you had a different field, such as "package_height", you would change the config below to be:

1'height' => 'package_height'

You can also have a field (use the AP Shipping Methods fieldtype) to make it easy to exclude specific products from calculations.

from_postcode

This defines your "from" postcode that is used with the Australia Post PAC to help calculate costs to the customer's destination.

api_key

You can set your Australia Post PAC API Key here.

The default setting will look for the AUSTRALIA_POST_PAC_KEY key in your .env file.