Post by cmebd » Thu Sep 23, 2010 8:57 am

SuperJuice wrote:
Unfortunately I have a lot of paying work on at the moment.. so this module isn't getting my full attention.
ROFL you're the first person I have seen/hears consider getting paid work "unfortunate". I for one really appreciate your AustraliaPost module SuperJuice, as I am sure others do!!

Thanks for your hardwork and thoughtfulness.

Cheers

A stupid question is the one you -don't- ask.........(Anon)

)C1.5.0.1 (IN devel)
OC V1.4.9.5
OC V1.4.9.2
OC V1.4.7
OC V1.3.4


User avatar
Active Member

Posts

Joined
Fri Nov 13, 2009 11:17 am
Location - Tasmania, Australia

Post by imcdermid » Mon Oct 04, 2010 7:55 am

I have installed the Australia Post Module on my 1.4.7 open cart. All is OK except that the dimensions appear to be hard coded in the /upload/catalog/module/shipping/auspost.php at line 95

$request_url = 'http://drc.edeliver.com.au/ratecalc.asp ... _postcode=' . $this->config->get('auspost_postcode') . '&height=100&width=100&length=100&country=' . $country . '&service_type=' . $service . '&quantity=1&weight=' . $weight;

This causes the postage to be under quoted. I have been trying to cost a package with the following dimensions 400x350x15 which weighs 2.5kg. The module quotes $17.45, whereas if I use the Australia Post web site it comes out as $20.20.

Is there a way to pickup the dimensions from the data settings in the catalog data definition ? also could a checkbox be added for registered post.

A Great module, thanks for all the efforts so far. I do not code in PHP, otherwise I would have attempted to fix it myself.

Wire shark also shows the data sent:

/ratecalc.asp?pickup_postcode=4037&height=100&width=100&length=100&country=AU&service_type=standard&quantity=1&weight=2500&destination_postcode=5158

TIA

Ian

Newbie

Posts

Joined
Tue May 04, 2010 1:08 pm

Post by SuperJuice » Mon Oct 04, 2010 2:27 pm

If you read through this post I mention the challenges of using the dimensions from the items (only becomes a problem with multiple items).

I realise the hard coded option isn't the best method but calculating the total package size if the package contains multiple items is extremely challenging. For a solution in this thread I have suggested that you push the hardcoded size up if you are having problems with underquoting. The dimensions that are in the module were set where they are (100x100x100) because of the item size a client had in his store.

The method I will eventually code in (and that is at the top of the list) is getting the cube root of the total shopping cart volume (multiple items)... so adding up all their volumes then sending the cube root to the module. This also has some issues with parcels being physically too big for Australia Post getting through (extremely long items) but it should give a much more accurate postage calculation.

So the logic I plan to implement is

If 1 item, send item dimensions to Australia Post
If more than 1 item, calculate total volume of all items in cart and forward the cube root of that volume to the Australia Post module.

If you are interested in why multiple items are challenging, take a look at the following site, it has an excellent write up:
http://www.plambeck.org/oldhtml/mathema ... /index.htm

As for an ETA on the size calculation, I was planning to spend some time on it tomorrow. Registered post I will look into, can honestly say it is something I have completely overlooked until you pointed it out.

Active Member

Posts

Joined
Thu Aug 13, 2009 12:06 pm

Post by imcdermid » Mon Oct 04, 2010 4:43 pm

Hi Superjuice,

Thank you for your prompt reply. I will increase the hard coded sizes until the cost is the same or exceeds the Australia Post Cost.

Thanks again,

Ian

Newbie

Posts

Joined
Tue May 04, 2010 1:08 pm

Post by rockuman_ex » Wed Oct 06, 2010 8:57 am

SuperJuice wrote:I have updated the Australia Post module for 1.4.9.1 so it now works correctly with the admin token system (from what my testing tells me).

Can others please download and confirm it is working correctly (without needing to switch to a compatibility mode)

Sorry, I haven't added any features to this release, just trying to keep it in check.

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

I have answered the above question about split shipping in an email, calculating each item discreetly will grossly over inflate the postage cost... and figuring out which items go in which box.. will need a function I will need to sit down and write. I will likely add the pre-paid satchels as the next feature as I have had several people request this.

Unfortunately I have a lot of paying work on at the moment.. so this module isn't getting my full attention.
Hi mate,

the latest one is working fine without the need to set the site in safe mode (disabling token etc).

however, after setting up the shipping, and on the front-end when you go to checkout (after adding stuffs into your basket), I get this error:

Code: Select all

Fatal error: Call to undefined function curl_init() in \path_to_my_server\catalog\model\shipping\auspost.php on line 87
Not sure what happen there?

Hope you can help

Newbie

Posts

Joined
Fri Sep 03, 2010 9:26 am

Post by SuperJuice » Wed Oct 06, 2010 9:07 am

That error is because your php installation doesn't have curl installed.

Curl is used to do the communication between your host and the Australia Post API. You will need to get your host (or yourself) to install and configure curl for the PHP installation.

Curl is a standard PHP module, not a 3rd party library you will need to go and find.

Active Member

Posts

Joined
Thu Aug 13, 2009 12:06 pm

Post by rockuman_ex » Wed Oct 06, 2010 9:57 am

SuperJuice wrote:That error is because your php installation doesn't have curl installed.

Curl is used to do the communication between your host and the Australia Post API. You will need to get your host (or yourself) to install and configure curl for the PHP installation.

Curl is a standard PHP module, not a 3rd party library you will need to go and find.

Thank you for your quick reply!

Yes, that happened when i tried opencart on localhost (my pc), but when i uploaded it to my server, it's working ;D

Brilliant work mate!

Newbie

Posts

Joined
Fri Sep 03, 2010 9:26 am

Post by SuperJuice » Wed Oct 06, 2010 12:56 pm

I have released a new version of the Australia Post module, 1.4.9.1u1

This version introduces the volumetric shipping calculation for more accurate shipping (box) sizes. It no longer uses a fixed value passed to Australia Post.

If there is a single item in the cart it uses this item's dimensions
If there are multiple items the total volume is calculated and the cube root sent to the cart module W/H/L

I have tested with multiple scenarios but I am always looking for people to assist by posting any issues they have.

There are some undocumented limits in the Australia Post dimensions which I had to work around in the module, if you are wondering why your items lengths are being bumped up in length (30mm and 50mm minimum dimension size) this is why.

New module can be downloaded here:
http://www.pixeldrift.net/opencart/open ... ost.tar.gz

Active Member

Posts

Joined
Thu Aug 13, 2009 12:06 pm

Post by rockuman_ex » Thu Oct 07, 2010 8:31 am

hi superjuice,

on your 1.4.9.1u1, when you have a product with a set weight (eg. 12KG) and dimensions 80x60x40cm, the price on the checkout won't appear.

However, when you remove the dimensions, and just having the weight, it seems to work properly.

Please let me know if you need some screenshots

Newbie

Posts

Joined
Fri Sep 03, 2010 9:26 am

Post by rockuman_ex » Thu Oct 07, 2010 8:33 am

oh, also, when you try to purchase 2 products of the same kind with a weight of 12Kg, when you try to checkout, aus post will say "Your basket is too heavy to ship with Australia Post (20kg+)".

Is there a way to make it so that the postage will be calculated separately? (eg. 12Kg and 12Kg), instead of the total weight (eg. 24kg)?

Newbie

Posts

Joined
Fri Sep 03, 2010 9:26 am

Post by lotus » Thu Oct 07, 2010 8:42 am

rockuman_ex wrote:oh, also, when you try to purchase 2 products of the same kind with a weight of 12Kg, when you try to checkout, aus post will say "Your basket is too heavy to ship with Australia Post (20kg+)".

Is there a way to make it so that the postage will be calculated separately? (eg. 12Kg and 12Kg), instead of the total weight (eg. 24kg)?
rockuman,

In that situation if total product is over 20kg, Australia Post would not cater for that. However, if you using Aus Post they will charge you twice if you split into 2 orders.

Have you considered using another carrier like TNT, DHL or someone else where the weight to be delivered happens to be over 20kg and have that as an option for the user to select various other courier services if they wish to?

New member

Posts

Joined
Fri Jul 16, 2010 9:50 pm

Post by SuperJuice » Thu Oct 07, 2010 8:44 am

rockuman_ex wrote:oh, also, when you try to purchase 2 products of the same kind with a weight of 12Kg, when you try to checkout, aus post will say "Your basket is too heavy to ship with Australia Post (20kg+)".

Is there a way to make it so that the postage will be calculated separately? (eg. 12Kg and 12Kg), instead of the total weight (eg. 24kg)?
In answer to this, no. there is currently no way to do it. It has been requested.. but it will essentially involve looping through all the items and calculating their shipping separately.

The problem is.. it needs to be coded to calculate what items go in what box.. if you have a 12kg item a 7kg item and a 14kg item it needs to deduce that the result is 2 boxes not 3.. otherwise the person will get overcharged significantly (the greatest cost is in the initial parcel.. not the additional weight).

Split shipping isn't trivial to implement.. but it is something I may look at further down the line.
Last edited by SuperJuice on Thu Oct 07, 2010 8:48 am, edited 2 times in total.

Active Member

Posts

Joined
Thu Aug 13, 2009 12:06 pm

Post by SuperJuice » Thu Oct 07, 2010 8:47 am

rockuman_ex wrote:hi superjuice,

on your 1.4.9.1u1, when you have a product with a set weight (eg. 12KG) and dimensions 80x60x40cm, the price on the checkout won't appear.

However, when you remove the dimensions, and just having the weight, it seems to work properly.

Please let me know if you need some screenshots
That is because the parcel dimensions you are specifying are outside the maximum size that Australia Post allows.

The reason it works when you remove the dimensions is because the module falls back to 100mm length for any dimension value that is equal to 0.

I suppress the Australia Post error message from the user as they don't need to see it (what can they do about it?), if the API returns an error the shipping method is hidden because it isn't valid so the user can't use it.

I suggest you look at using another carrier if your items are as large and as heavy as you are suggesting.

Active Member

Posts

Joined
Thu Aug 13, 2009 12:06 pm

Post by rockuman_ex » Thu Oct 07, 2010 9:05 am

thanks for the prompt replies.

Aaah I see. Sorry, I should have done more research on Aus Post website :p
I thought they will send any parcel of any size and weight :p

Newbie

Posts

Joined
Fri Sep 03, 2010 9:26 am

Post by rockuman_ex » Thu Oct 07, 2010 9:07 am

SuperJuice wrote: Split shipping isn't trivial to implement.. but it is something I may look at further down the line.
it would be good to see this implemented ;D

for example, when you buy:
1 item with 15Kg,
2 Items with 2Kg,
2 items with 12Kg

Then you will calculate it as 3 boxes:
- 15Kg + 2Kg + 2Kg
- 12Kg
- 12Kg

That would be great O0

Newbie

Posts

Joined
Fri Sep 03, 2010 9:26 am

Post by lotus » Thu Oct 07, 2010 9:18 am

rockuman_ex wrote:
SuperJuice wrote: Split shipping isn't trivial to implement.. but it is something I may look at further down the line.
it would be good to see this implemented ;D

for example, when you buy:
1 item with 15Kg,
2 Items with 2Kg,
2 items with 12Kg

Then you will calculate it as 3 boxes:
- 15Kg + 2Kg + 2Kg
- 12Kg
- 12Kg

That would be great O0
rockuman,

I fail to see what your objective of splitting will be if its going to the same address? You are paying for 3 lots and that's what aus post would do.!! ???

A more feasible and cost effective approach would be to use a courier service and you might end up paying less for the entire shipment. In most cases sellers have a contract or arrange with courier services and you can negotiate with them for items over 20kg.

What I've seen on some sites is that at checkout, you are presented with option of using courier service A, B or C. If your items are more than 20kg and option A is Aus post, it just doesn't show up as an option and you see options B & C only.

What sort of business are you looking at for this online store and what's the issue in not using alternative couriers? I am assuming your business will have large boxes and weight, therefore aus post serive might not fit your business model.

New member

Posts

Joined
Fri Jul 16, 2010 9:50 pm

Post by SuperJuice » Thu Oct 07, 2010 9:18 am

rockuman_ex wrote:
SuperJuice wrote: Split shipping isn't trivial to implement.. but it is something I may look at further down the line.
it would be good to see this implemented ;D

for example, when you buy:
1 item with 15Kg,
2 Items with 2Kg,
2 items with 12Kg

Then you will calculate it as 3 boxes:
- 15Kg + 2Kg + 2Kg
- 12Kg
- 12Kg

That would be great O0
As I said above, it's easy to figure it out in front of you.. but coding a solution is more difficult.

I will need to sit down and work through it (think I have a solution just need to make the code), haven't really had a time to look at it.. my thoughts are if you regularly have items that will create a total cart greater than 20kg you offer alternative shipping methods, multiple Australia Post parcels will be expensive.

-edit-

lotus pretty much summed up my thoughts.

Active Member

Posts

Joined
Thu Aug 13, 2009 12:06 pm

Post by rockuman_ex » Thu Oct 07, 2010 9:33 am

again, thank you.

I don't have a business yet, but i thought it would be good to have this module to calculate the total cost to use Aus Post even when you try to order stuffs that are more than 20Kg.

This would be good to small businesses that don't have any arrangements made with other couriers, and have to rely solely on Aus Post (eg. AAE have a minimum monthly spending that you have to achieve if you wish to use their service).

I'm into wine, and every now and then I sell my wine to collectors, and I have to rely on Aus Post to send my wines, and sometimes, i have to split them into several boxes.

I don't want to sound pushy (sorry if I was), i was just trying to contribute or give idea as much as possible :-[

I appreciate your work, and will be using your module when I decide to set up my own website ;D

Newbie

Posts

Joined
Fri Sep 03, 2010 9:26 am

Post by imcdermid » Fri Oct 08, 2010 6:50 pm

Hi Superjuice,

Thank you for your update, I have tested on open cart 1.4.7 and it works OK. I have added a $2.95 to cover registered post. Do you have a plan to offer a registered post check box in the future.

Ian

Newbie

Posts

Joined
Tue May 04, 2010 1:08 pm

Post by SuperJuice » Wed Dec 08, 2010 9:57 am

The following module being sold on the OpenCart site from Kedge Group includes my work but no credit is given (that is all I ask for in my module notes).
http://www.opencart.com/index.php?route ... order=DESC

I will no longer be maintaining this module. Thanks to all involved in furthering it's development.

Active Member

Posts

Joined
Thu Aug 13, 2009 12:06 pm
Who is online

Users browsing this forum: No registered users and 3 guests