Page 1 of 24

[Released] Australia Post Shipping Module (Read 1st post!)

Posted: Thu Aug 13, 2009 12:40 pm
by SuperJuice
Hi all,

The latest version of the Extension is available from the following page:
http://www.opencart.com/index.php?route ... on_id=1011

If you have any feedback, feature requests, bug reports or module suggestions please don't raise them on the Extension page, raise them IN THIS THREAD.

Thanks.

Re: Australia Post Shipping Module (v1.0)

Posted: Fri Aug 14, 2009 3:53 pm
by SuperJuice
Update: Just released v1.1

It appears that I actually wrote the original module on OpenCart v1.3.0. I did a fresh install of OpenCart v1.3.1 last night and due to a change made in the v1.3.1 update this module was showing an error in the admin control panel (didn't impact functionality). I have now fixed this, so please use v1.1 if you are planning to use this module.

*knip*

-edit-

I just noticed that OpenCart v1.3.2 has been released, so I am hoping this hasn't affected this module and will test it tonight to confirm. :P

Re: Australia Post Shipping Module (v1.0)

Posted: Fri Aug 14, 2009 6:23 pm
by Daniel
pelase reupload. I just fixed a bug int he contributions section.

Re: Australia Post Shipping Module (v1.0)

Posted: Fri Aug 14, 2009 6:53 pm
by SuperJuice
Daniel wrote:pelase reupload. I just fixed a bug int he contributions section.
Done.

Thanks Daniel.

Re: Australia Post Shipping Module (v1.0)

Posted: Fri Aug 14, 2009 9:35 pm
by SuperJuice
Have confirmed V1.1 works correctly and as expected with OpenCart v1.3.2.

Re: Australia Post Shipping Module (v1.0)

Posted: Fri Sep 04, 2009 9:06 pm
by blackhand
Superjuice

like you, I have come from cubecart.

it would be good to see your AustPost shipping mod handle international post like the cubecart version did.

what are the chances of you getting around to putting it in?

edit. cheers for the contribute by the way.

Re: Australia Post Shipping Module (v1.0)

Posted: Wed Nov 11, 2009 10:54 am
by johnmax
i 've got an error on opencart 1.34 when choosing the shipping method :

Australia Post
Error interfacing with Australia Post (connection)

any fix ? thanks

Re: Australia Post Shipping Module (v1.0)

Posted: Wed Nov 11, 2009 11:15 am
by Qphoria
likely that is has not been updated to work with 1.3.4

Re: Australia Post Shipping Module (v1.0)

Posted: Wed Nov 11, 2009 3:11 pm
by SuperJuice
As the error says, it appears to be a connection issue to the Australia Post site. I doubt that portion of the module has anything to do with 1.3.4 update (will need to confirm when I have time)

Is the host your are using allowing http connections outbound (port 80)? it needs this to do the live calculation.

Test the connectivity and let me know.

Re: Australia Post Shipping Module (v1.0)

Posted: Tue Nov 17, 2009 3:04 pm
by datacon
I have OpenCart 1.3.4 and installed it, everything works great except for the Australia Post Plugin which I really need to work. I see that Australia Post module is included in the 1.3.4 by default.

Australia Post
Error interfacing with Australia Post (connection)

It is setup in the admin, all variables are set, and i have changed them all around for testing purposes, and I have also tried different times of the day/night. I have also checked my webhost supports inbound/outbound traffic to port 80. So that cancels out the link between my webhost and the australia post website. Even if I try the link below in my browser it works fine:

http://drc.edeliver.com.au/ratecalc.asp ... 1&weight=1

I need any help I can get. Thanks
Adam (adam@datacon.net.au)

Re: Australia Post Shipping Module (v1.0)

Posted: Tue Nov 17, 2009 3:14 pm
by SuperJuice
I currently don't have a lot of time to look at it as I haven't upgraded to 1.3.4 yet.

I will investigate the issue, it may be worthwhile stepping through the module to see why it is falling back to that error.

Was the Australia Post module working on the same exact server on a previous version of OpenCart?

The fact you can access the link in your browser means absolutely nothing, in OpenCart you aren't making the connection to Australia Post when it's calculating the postage, the webserver is.

If you have access to ssh on the server try "telnet auspost.server.name 80".

I will hopefully get a chance to look at this tonight.

-edit-

I just had quick skim through the code and noticed destination_postcode is static, which it shouldn't be, not sure how that made it in.. but that also needs to be fixed.

Now Integrated - No longer supported by original author

Posted: Tue Nov 17, 2009 7:19 pm
by SuperJuice
Well.. I am glad to say the problem has nothing to do with me but to do with the modifications made to my module when it was merged into Opencart. Not only was it heavily modified, all credit was removed (thought this was a 'Community'?) and a lot of the module was changed inconsistently so what appears to the end user as something the module _should_ do it actually won't.

I don't agree at all with what has been done, and will no longer be supporting this code because of the nature in which it was modified and merged into Opencart without any obvious testing (hate to think of the implications of weight units etc. as no conversion happens in the module itself). I concede the module was far from perfect before, but I now no longer know the state of what was modified and don't have the time or energy to go back through it. The only plus I can see from this is the destination_postcode that accidentally made it in to the last release was fixed or wasn't in the version merged so this won't need to be re-fixed.

To fix the Australia Post connection problem is extremely basic, when the module administration control panel was modified, someone decided to change the name of the "Origin" postcode to auspost_postcode, which is completely non-descript. You will also notice that the admin control panel now just says "Post Code" which actually means nothing out of context, this is your "origin", ie. where the parcel will be shipped from.

The code that needs to be 'fixed' now that they have renamed the origin variable is auspost_origin in the following file:

/var/www/opencart/catalog/model/shipping/auspost.php

All references to $this->config->get('auspost_origin') need to be changed to $this->config->get('auspost_postcode')

The module was failing because the config name changed so there was no origin in the URL passed to Australia Post.

Whoever modified the admin side also removed validation code from the administration module for 'auspost_handling' so it is now no longer forced into a 0.00 style currency. Because of this it fails the validation check in the calculator itself and the handling cost won't be added or charged to the customer, something end users should probably be aware of.

Can't guarantee anything else works as I don't know what other parts of the module have been changed and I don't have the energy to bug check / test other peoples modifications.

It's been swell.

Re: Australia Post Shipping Module (v1.0)

Posted: Tue Nov 17, 2009 8:18 pm
by Qphoria
It would have likely needed heavy modification for the guestcheckout ajax callback. I've had to change all my shipping modules in design for that as well to support the passing in of the country_id, zone_id, and postcode. But I'm not defending broken code.

Re: Australia Post Shipping Module (v1.0)

Posted: Wed Nov 18, 2009 8:19 am
by datacon
Thank you for your reply SuperJuice. It is much appreciated, to see the author of a module to support the community as best he/she can.

It is a shame the same support doesnt seem to come from the author of OpenCart, who has taken your module without even congratulating you that its made it in to the real version of OpenCart, or thanking you, or leaving your credits in the php commented code, and releasing 1.3.4 without even proper testing of the module as it does not work out of the box in the final release of 1.3.4.

I hope the author shows more appreciation for the comunity that supports the software, I sure do appreciate all the effort from everyone putting their time into this great shopping cart - thank you OpenCart Author, and all module authors!! It is a great product, and as long as there is support from everyone, the project will continue, and it certainly should, its a great cart that can only get better!

Hope I can sort something out for this AUSPOST module to work better.

Re: Australia Post Shipping Module (v1.0)

Posted: Wed Nov 18, 2009 6:14 pm
by SuperJuice
I received quite a few emails about this module, and several people appear to be put out by what has happened here.

It frustrates me to see code I have spent time on released in this state, so I wrote a fix for it tonight

http://www.pixeldrift.net/opencart/open ... ion.tar.gz

Drop the auspost.php into the following location in your 1.3.4 install (backup your previous version)
/opencart/catalog/model/shipping/auspost.php

No other modifications need to be made. The following that was broken in the 1.3.4 release was fixed.

* Live shipping calculation works again now (variable renamed and not fixed)
* Estimation for shipping now displays correctly (variable renamed and not fixed)
* Additional handling now works (validation check taken out of admin module resulted in many values not working)

New additions (added as they were pending requests):
* Module will now display an error if the parcel is over 20kg
* Module now supports tax, have tested with GST sample for Australia and works as expected

Please test and provide feedback. I want this to be working so people in Australia don't suffer because of the lack of testing in the recent upgrade.

Re: Australia Post Shipping Module (v1.0)

Posted: Thu Nov 19, 2009 8:22 am
by cc6264
Thanks SuperJuice

Worked great on local test, didn't work on main server though. Came up with a bunch of gobbldeygook in the guest checkout page. My guess is the upload failed for some reason (has happened before) Will retry later.

Thanks again.
Craig

Re: Australia Post Shipping Module (v1.0)

Posted: Thu Nov 19, 2009 8:57 am
by datacon
Thank you very much SuperJuice.

Works an absolute charm! I have uploaded on the website and works perfectly with 1.3.4. Great new additions too!

Im sure everybody really appreciates your contribution. Hopefully this fix is used and released in 1.3.5.

Re: Australia Post Shipping Module (v1.0)

Posted: Thu Nov 19, 2009 7:02 pm
by SuperJuice
cc6264, did you fix the problem you were having?

Thanks for the feedback, there may need to be some more work done on the Tax because I believe the rate provided by Auspost includes GST, so if you want the GST to be a discreet line item I will need to strip the GST off the returned value and then pass the tax amount in the tax variable... rather than adding GST to the returned value which is the current situation (this is minor).

Re: Australia Post Shipping Module (v1.0)

Posted: Fri Nov 20, 2009 11:27 am
by cc6264
A big thankyou to SuperJuice.

Works fine - as I suspected one of the files failed in the upload (filesize was wrong).

I would leave it as it is. Works perfectly.

Cheers
Craig

Re: Australia Post Shipping Module (v1.0)

Posted: Tue Nov 24, 2009 7:15 am
by cmebd
SuperJuice wrote:cc6264, did you fix the problem you were having?

Thanks for the feedback, there may need to be some more work done on the Tax because I believe the rate provided by Auspost includes GST, so if you want the GST to be a discreet line item I will need to strip the GST off the returned value and then pass the tax amount in the tax variable... rather than adding GST to the returned value which is the current situation (this is minor).
Hi SuperJuice,

I would find it helpful to have GST as a discreet line itme. :-)

Cheers
Christine