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!

Add A Comment