Page 1 of 1

Australia Post not calculating postage correctly.

Posted: Tue May 03, 2016 2:55 pm
by santura
I am selling books on my opencart site. The dimensions of my package are 24.1x33.8x0.2cm and it weighs 136g. According to the post office and the auspost calculator, this classifies as a large letter and should cost $3.00 to post. However when I estimate the shipping in opencart the package is treated as a parcel with a shipping cost of $7.45.

I don't know if the issue is with opencart or Australia post, but can anybody help with this?

Re: Australia Post not calculating postage correctly.

Posted: Fri May 06, 2016 9:25 am
by santura
Anyone?

Re: Australia Post not calculating postage correctly.

Posted: Fri May 06, 2016 11:23 am
by MarketInSG
According to what I see in OpenCart, they prefixed the size to the API, which is the cause of the issue:

Code: Select all

curl_setopt($curl, CURLOPT_URL, 'http://drc.edeliver.com.au/ratecalc.asp?pickup_postcode=' . urlencode($this->config->get('auspost_postcode')) . '&destination_postcode=' . urlencode($address['postcode']) . '&height=70&width=70&length=70&country=AU&service_type=standard&quantity=1&weight=' . urlencode($weight));

Re: Australia Post not calculating postage correctly.

Posted: Fri May 06, 2016 11:27 am
by santura
Does this mean I will have to contact Australia post and get them to fix the API

Re: Australia Post not calculating postage correctly.

Posted: Fri May 06, 2016 1:11 pm
by MarketInSG
The integration is maintained by OpenCart, you will probably have to hire an external vendor to fix it up for you

Re: Australia Post not calculating postage correctly.

Posted: Fri May 06, 2016 1:15 pm
by santura
Any suggestions?

Re: Australia Post not calculating postage correctly.

Posted: Fri May 06, 2016 4:43 pm
by MarketInSG
you need to change the parameters &height=70&width=70&length=70 to your product size accordingly.

Re: Australia Post not calculating postage correctly.

Posted: Fri May 06, 2016 4:51 pm
by santura
Shouldn't that code be picking up the values from my product? If I change the code manually it's not going to work for other products is it?

Re: Australia Post not calculating postage correctly.

Posted: Fri May 06, 2016 6:53 pm
by MarketInSG
You need to change it to pick it up from your products. Right now it is hardcoded...

Re: Australia Post not calculating postage correctly.

Posted: Fri May 06, 2016 7:02 pm
by santura
Ok how do I pick up the values from my product? I have no idea what the variables are.

Re: Australia Post not calculating postage correctly.

Posted: Sat May 07, 2016 8:31 am
by santura
I think the issue is that my package is actually classed as a letter by australia post, and it would appear that the australia post module in opencart 2 only caters for parcels.

Re: Australia Post not calculating postage correctly.

Posted: Sat May 07, 2016 8:33 am
by MarketInSG
that is why you need to customise the length, width fields in the API accordingly.

Re: Australia Post not calculating postage correctly.

Posted: Sat May 07, 2016 8:39 am
by santura
Ok, now I just need someone to help me figure out how to change the code so it picks up the dimensions from the product.