Chris Norton

Register Log in

I have completed the first part of a new module for the open source ecommerce software Magento which aims to add in a bunch of additional functionality specific for Australia. You can find the module, along with installation instructions at the Fontis Magento project page.

It actually took quite a while to create this, rather simple, first part of the module. This was mostly due to my lack of understanding of the way Magento modules work as well as the Zend Framework upon which Magento is built. At first I only wanted Australia Post shipping (rather than the more ambitious “all Australian functionality”) and, after failing to create a working module based on the outdated tutorial, I was able to get something working by simply adding in the module to the core distribution files, which I achieved by copying things from the existing shipping modules. Unfortunately this isn’t really viable as the module should be separated from the core to avoid conflicts on updates and the like. And it’s not good practice.

So, I then discovered that the shipping methods for the USA carriers (eg. DHL, UPS) were actually contained in a separate module in the core and this inspired me to want to create a similar module for Australia which could include various shipping carriers, payment gateways and GST.

Attempting to extract out the Australia Post shipping didn’t go so well at first and took much trial-and-error and searching of the Magento forums before I managed to get something that actually worked. But work it now does and it should be useful for most cases where you’d want to use Australia Post as a shipping method. It supports all methods available for domestic and international shpping, allows you to set a handling fee and, naturally, uses the Australia Post DRC to work out cost and shipping time.

There are a few things left to do on Australia Post before I’m 100% happy with it: I’d like to add insurance options, give the admin the ability to restrict shipping to certain methods (although I can’t think of why you’d want to do this) and clean up the code a bit. I have also discovered a few things that I’d like to add to the module if Magento actually allows the ability to do so: for instance, giving the user information about the shipping time without having to place it in the method title would be very handy as it means the invoice remains free of superfluous information but the user can make informed decisions during the checkout process.

After this the next thing I want to get working is GST and, following that, move on to getting bank payment gateways running. It will be good when Magento hits version 1.0 and some more developer documentation hits the streets – I may even start writing some up myself based on my experience with this module.

I would very much like to hear back from others about how well the module works on their setup, as well as any feature suggestions for the Australia Post shipping or the Australia module in general.

Comments

  1. 14 June 7:28 pm

    Hi Chris,

    Very glad to have found your post, am looking at setting up a store and Magento was recommended as the best option around.

    How has this Auspost module worked out? Is it a goer? Would you be able to recommend it?

    Thanks & Best Regards,
    Scott

  2. 15 June 3:13 am

    Hi Scott,

    I can definitely recommend the Australia Post module I created – all it does is send data to Australia Post’s DRC and returns the values, converting them for Magento use. There shouldn’t be anything wrong with it now (there were a few bugs initially) so please let me know if you find anything out of the ordinary.

    You can find the latest version of the extension on Magento Connect:
    http://www.magentocommerce.com/extension/141/fontis-australia-extension

  3. 26 June 8:50 pm

    Hi again Chris. I added your module, that was a cinch! Thanks! I’ve been trying to configure a coupon for free postage, so that I can test out the payment modules for less that $5 a pop (because the first try resulted in a debit from my CC, but no corresponding credit into my paypal, lol). Does the module support free postage? Another reason for wanting that is that I plan to advertise the store in my local town, with the option of COD….

    Thanks again & Best Regards,
    Scott

  4. 29 June 6:38 pm

    Hi again Scott!

    No, the Australia Post module does not handle free postage as it simply relays AusPost’s shipping fees – you’ll want to activate the Flat Rate shipping module present in Magento already and set it to be $0.00.

  5. Joseph
    14 July 5:23 pm

    Hi Chris,

    Great work. Thanks for sharing it.

    I get the following exception after installing the extension through the admin interface:

    Exception caught:

    Warning: Invalid argument supplied for foreach() in /home/magento/htdocs/downloader/template/pear/packages.phtml on line 71

    Backtrace:

    #0 /home/magento/htdocs/downloader/template/pear/packages.phtml(71): mageCoreErrorHandler(2, ‘Invalid argumen…’, ‘/home/magento/h…’, 71, Array)
    #1 /home/magento/htdocs/downloader/Maged/View.php(53): include(‘/home/magento/h…’)
    #2 /home/magento/htdocs/downloader/Maged/Controller.php(107): Maged_View->template(‘pear/packages.p…’)
    #3 /home/magento/htdocs/downloader/Maged/Controller.php(327): Maged_Controller->pearPackagesAction()
    #4 /home/magento/htdocs/downloader/Maged/Controller.php(147): Maged_Controller->dispatch()
    #5 /home/magento/htdocs/downloader/index.php(29): Maged_Controller::run()
    #6 {main}

    Any advice migth have gone wrong?

    thanks
    Joseph

  6. Al
    15 July 3:42 pm

    Hey,

    I got a similar error message to Joseph, but I got called away from my computer for a minute and when I got back it was working!

    Has anyone got any idea on how to add an insurance option?

    cheers,
    Al.

    p.s. awesome work Chris.

  7. 15 July 4:21 pm

    Thanks guys, I’ll run through another test round to see if it’s something screwy with my code.

    As for insurance, I am looking at including that in a future release but I would first like to wait for shipping methods to allow customer options so that a customer could choose whether or not they want to pay for insurance. This is how the osCommerce module was set up and I thought it was a good idea to allow it as an option.

  8. Joseph
    22 July 6:51 pm

    Hi Chris,

    I’m trying to uninstall the extension, because of the error I’m getting (post on 14th of July) and will then try to reinstall. I’ve already tried to simply reinstalling the extension through Magento Connect, but get the following response:

    Ignoring installed package magento-community/Fontis_Australia
    Nothing to install

    Please let me know if there’s a way of uninstalling the extension.

    thanks
    Joseph

  9. 22 July 11:49 pm

    Hi Joseph,

    Do you have access to a shell on the server? If so you can use PEAR from the shell to uninstall it with “./pear uninstall magento-community/Fontis_Australia”.

    You can then try installing the same way.

    Otherwise, I’m a bit out of my league – can you install any other extensions or is the Australia one the only place where things go wrong?

  10. Smitty
    3 August 10:04 pm

    Hi Chris, I recently upgraded to magento 1.1.2 and now the Aust Post option wont show up in the front end. Can you shed any light on the situation? I’m stuck…help!

  11. 4 August 9:48 am

    The Australian extension has not yet been upgraded for 1.1, so that’s likely the cause of the issue. I’ll take a look at it and release a new version once I’ve sorted out problems with the upgrade.

  12. Smitty
    7 August 12:14 pm

    Cheers Chris. You rock. Any idea on timeframe for the new release? Need any beta testers or bribes to assist you? :)

  13. 9 August 1:27 am

    Ha ha – bribes are always welcome! :)

    I’m just getting through the tail end of some tight project deadlines so next weekend should be a pretty realistic time to expect a new release.

    I want to thank everyone for sticking in there the last couple weeks!

  14. kyle
    5 December 7:13 am

    I am working on a shipping method through another carrier, and am very frustrated with the tutorial, forums, and available help on the subject. I am close to having it work, but have still a few problems to overcome. Do you have any advise as to where you found good information that helped you in development?

  15. 16 December 6:09 pm

    Hey What do you guys use to print your Australia Postage? A label print or just a normal printer ?

    Is Australian post the best way to ship?

  16. Ali
    24 January 5:31 am

    I have install Australian post extension, it comes in magento admin panel and i have enabled it but it does not appear on the front-end while selecting shipping methods.

    Thanks for your guidance (advance)

  17. 25 January 12:42 am

    Hi Chris, have fresh installed 1.2.0.1 (after a crash-&-burn attempt at upgerding), and tried to install your module – yikes! I got this. I have since deleted the folder, and the site works again. Yow!

    I hope this helps…

    Magento Commerce
    There has been an error processing your request.

    Error in file: “/home/bhaktibo/public_html/app/code/community/Fontis/Australia/sql/australia_setup/mysql4-install-0.7.0.php” – SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘bhaktibo_i2EWVma.i2ew_au_postcode’ doesn’t exist
    Trace:
    #0 /home/bhaktibo/public_html/app/code/core/Mage/Core/Model/Resource/Setup.php(287): Mage::exception(‘Mage_Core’, ‘Error in file: …’)
    #1 /home/bhaktibo/public_html/app/code/core/Mage/Core/Model/Resource/Setup.php(167): Mage_Core_Model_Resource_Setup->_modifyResourceDb(‘install’, ”, ’1.0′)
    #2 /home/bhaktibo/public_html/app/code/core/Mage/Core/Model/Resource/Setup.php(155): Mage_Core_Model_Resource_Setup->_installResourceDb(’1.0′)
    #3 /home/bhaktibo/public_html/app/code/core/Mage/Core/Model/Resource/Setup.php(121): Mage_Core_Model_Resource_Setup->applyUpdates()
    #4 /home/bhaktibo/public_html/app/code/core/Mage/Core/Model/Config.php(215): Mage_Core_Model_Resource_Setup::applyAllUpdates()
    #5 /home/bhaktibo/public_html/app/code/core/Mage/Core/Model/App.php(241): Mage_Core_Model_Config->init(Array)
    #6 /home/bhaktibo/public_html/app/Mage.php(427): Mage_Core_Model_App->init(”, ‘store’, Array)
    #7 /home/bhaktibo/public_html/app/Mage.php(446): Mage::app(”, ‘store’, Array)
    #8 /home/bhaktibo/public_html/index.php(52): Mage::run()
    #9 {main}

    Magento is a trademark of Irubin Consulting Inc. DBA Varien. Copyright © 2008 Irubin Consulting Inc.

  18. 25 January 12:45 am

    oh yeah, just read above, i’ll keep my eyes peeled, thanks

  19. 27 January 7:55 pm

    Have you managed to get the GST thing working? My team and I are on the crux of finnising a big site and cannot get this last step! We get the GST in on the product but when it hits the shipping it goes wrong – shows the correct Total though.

    Please let me know.

    Carlos

  20. elaine
    29 January 2:00 pm

    Hi Chris,

    Was wondering if you will considered Registered Post as an option? Are you still working on the insurance option or its just at standard and express for now?

    thanks…

  21. 29 January 3:20 pm

    Registered post will be coming in the near future – just as soon as I find some free time to finish it off! :)

  22. 25 March 9:37 am

    Urgent, i have used magento australian post module (magento version 1.2.1). But after I change some settings, it doesn’t be shown at the frontend any more. Have any clues?

    Charlie

  23. Oliver
    30 January 4:13 pm

    We have Australia post active on our magento site, with registered post enabled. Unfortunately when customers click to select registered post, and move through, it automatically reverts to regular post… any ideas??

  24. 13 July 10:36 am

    Hi Chris,

    Been trying to get your module to work in our new magento store and it is working fine with one product, however it doesn’t seem to ‘add’ postage when a second item is added.

    All the products have weight assigned but no dimensions, (in fact we haven’t been able to locate anywhere we can actually assign dimensions to the products on the product item page)

    I’m hoping it is just a case of something simple that we have overlooked.
    You don’t also have a paypal account for donations at all do you? as this module once we get it firing perfectly will be helping us out quite a lot.

    Cheers

  25. 5 August 9:36 am

    Hi Chris

    We are just setting up a site which needs to use DHL Express to ship from NZ ( a different system to the built in Magento DHL functionality which I gather is USA only). Before I embark on writing a module for this have you done anything on DHL for Australia as that is the same system apparently.

    Cheers

    Steve

  26. 24 November 4:26 pm

    Hi Chris – The AUST Post module works a treat – Only thing is I want to remove the Delivery times ie (1 day, 2 days etc) as its setting unrealistic expectations for the customer. Can you help with where & what to change in the code pls.

    Thanks

    Todd

  27. Lee Nguyen
    6 February 12:52 am

    Hello Chris,

    I’m in the same situation as Todd above. Can you help us out please and email me? I have a developer on hand, but were having trouble removing the days.

    Lee

  28. 21 February 8:56 pm

    Hi Chris – Any hints here? Lee did you have any luck? thx

    todd

  29. 31 October 2:22 pm

    Chris,

    You are an absolute champion, we’re starting to roll out large Magento sites and will most definitely need such a a module, awesome work!

  30. James
    15 December 3:57 pm

    Hi Chris

    have the eparcel module working fine. it just always gives a ‘transitcover’ result. in short, i dont want to offer this and just dont want it as a visible option. not sure why its always applying even though the admin says the insurance step is 0, or i leave it empty (tried lots of things). is there an easy way of removing this?

    any help would be fantastic!

    thanks heaps

Add A Comment