Zen Cart Logo
Forums / Addon Shipping Modules / AustPost for 1.3.8a ?

AustPost for 1.3.8a ?

Locked

Views: 4,573

Results 1 to 20 of 21
This thread is locked. New replies are disabled.
11 Jan 2008, 6:45 PM
#1
foneguy avatar

foneguy

New Zenner

Join Date:
Jan 2008
Location:
Sydney, Australia
Posts:
21
Plugin Contributions:
0

AustPost for 1.3.8a ?

Hi All.

I'm currently using ZC v1.3.7.1 and AustPost v2.0.1

Is there an upgrade of AustPost to suit ZC v1.3.8a ?

Thanks, Steve.

12 Jan 2008, 7:30 AM
#2
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: AustPost for 1.3.8a ?

Why? are you having a problem?

Cheers
Rod

12 Jan 2008, 7:50 PM
#3
foneguy avatar

foneguy

New Zenner

Join Date:
Jan 2008
Location:
Sydney, Australia
Posts:
21
Plugin Contributions:
0

Re: AustPost for 1.3.8a ?

No, but it looks like AustPost overwrites a couple of admin files.
If I upgrade to ZC1.3.8, those files will be overwritten and not include the AustPost code?

Thanks, Steve.

13 Jan 2008, 2:04 AM
#4
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: AustPost for 1.3.8a ?

Hi Steve,

No, but it looks like AustPost overwrites a couple of admin files.

If you take the time to read the various .TXT files that comes with the AP module you will note that the admin overwrites are purely optional.
If you DON'T overwrite them you'll not be able to take advantage of the dimensional aspects of your products or parcels, but you'll still get pretty accurate quotes based on weight alone.

If I upgrade to ZC1.3.8, those files will be overwritten and not
include the AustPost code?

Yes, they will. Which is why like any other module you'll need to re-install the AP module (or merge any changes) after any zen-cart upgrades.

The current version of the AP module has been checked and is fully compatible with zen-cart V1.3.7 and 1.3.8. I have no reason to believe any other changes are required for 1.3.8a.

Cheers
Rod

13 Jan 2008, 2:15 AM
#5
foneguy avatar

foneguy

New Zenner

Join Date:
Jan 2008
Location:
Sydney, Australia
Posts:
21
Plugin Contributions:
0

Re: AustPost for 1.3.8a ?

So, I need to find the relevant ZC 1.3.8a files and edit in the AustPost code, myself?

13 Jan 2008, 6:44 AM
#6
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: AustPost for 1.3.8a ?

Hi Steve,

So, I need to find the relevant ZC 1.3.8a files and edit in the
AustPost code, myself?

Only if you really want to. It'll probably be far easier to simply re-install though, and even that may not be necessary, it really depends on what files get replaced with your zencart update(s).

Rod

14 Jan 2008, 2:09 PM
#7
pascalgaut avatar

pascalgaut

New Zenner

Join Date:
Jan 2008
Posts:
3
Plugin Contributions:
0

Re: AustPost for 1.3.8a ?

Rod,

I've been struggling to find a way to make the latest version of AustPost work. Since it seems to work for everyone else it must be my specific server settings that don't work. I work on on a windows server with IIS 5, PHP 5 and the latest version of Zen Cart.

The symptom is that after installing austpost the shipping estimator window is empty (does not even show the other shipping methods installed such as flat rate) and that when trying to checkout it gives me the error: "ERROR:Unable to obtain a valid quote from the Australia Post Server.
Please try again later, or contact the store owner if problems persist.".

cURL seems to be loaded by PHP (it shows as enabled in the php info), so no clue as to what might be wrong.

If I deinstall AustPost then everything reverst to normal (without Australia Post rates of course).

Any idea?

15 Jan 2008, 12:36 AM
#8
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: AustPost for 1.3.8a ?

G'day pascalgaut,

I've been struggling to find a way to make the latest version of
AustPost work. Since it seems to work for everyone else it
must be my specific server settings that don't work.

I agree.

I work on on a windows server with IIS 5, PHP 5 and the latest
version of Zen Cart.

Windows eh. Obviously you aren't very concerned about reliability ;-)

when trying to checkout it gives me the error: "ERROR:Unable to
obtain a valid quote from the Australia Post Server.
Please try again later, or contact the store owner if problems
persist.".

cURL seems to be loaded by PHP (it shows as enabled in the php
info), so no clue as to what might be wrong.

OK, the first place to start is by elimitating cURL as the possible (and most likely) cause of the problem.
It has come to my attention that there doesn't seem to be a reliable way of testing cURL functionality without producing an error that can't be trapped by the AP module (at least none that I've found yet), so this means that in some instances we need to force cURL to fail in order to use the FILE method of access.
Keep in mind that there is no assurance that the FILE access is allowed on your server either, so even after disabling cURL you MAY still have a problem - but we'll worry about how to deal with that if/when the time comes.

Anyway, to disable the cURL code in the AP module, simply load
/includes/modules/shipping/austpost.php into a text editor.

locate the line that reads:
if (function_exists('curl_init')) {

(it should be line 758)
Change it to read:
if (function_exists('XXXcurl_init')) {

Resave the file, and let me know of your results.

Cheers
Rod

27 Jan 2008, 10:00 PM
#9
pascalgaut avatar

pascalgaut

New Zenner

Join Date:
Jan 2008
Posts:
3
Plugin Contributions:
0

Re: AustPost for 1.3.8a ?

Thanks Rod,

I figured out that the issue came from the fact that I was packaging a document (0 weight) with an item to be delivered. Managed to fix this through the admin side of things.

My only remaining problem is that the estimator still does not work. When I checkout and go to the shipping page all is fine but if I click on the get and estimate button on the shopping cart page then I just get a blank window.

Any idea of how to debug this?

28 Jan 2008, 4:20 AM
#10
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: AustPost for 1.3.8a ?

G'day pascalgaut,

I figured out that the issue came from the fact that I was packaging a document
(0 weight) with an item to be delivered.
Managed to fix this through the admin side of things.

As long as the total weight of the items being quoted for is greater than zero you should get a valid quote.

My only remaining problem is that the estimator still does not work.
When I checkout and go to the shipping page all is fine but if I click
on the get and estimate button on the shopping cart page then I just
get a blank window.

Any idea of how to debug this?

Yes. The first question you need to ask yourself is what else did you change between the time you was getting this:

when trying to checkout it gives me the error: "ERROR:Unable to
obtain a valid quote from the Australia Post Server.
Please try again later, or contact the store owner if problems
persist.".

and your current problem of getting a blank page?
Simply "fixing the (0 weight) through the admin side of things" will not cause this kind of change in the symptoms you are reporting, so you must have done something else as well. Whatever it was, you need to undo it.

If you can't remember what you did, the easiest way to debug would be to start working backwards. Firstly disable the AP module. Next, enbale another shipping module, eg, the local pickup module. If you still only get a blank window (as I suspect will be the case) then you have something more seriously amiss than just the AP module. In which case I'd suggest you revert to a reinstall of the system files have been changed.

If it does turn out to be an AP module problem (ie, if the local pickup works ok) then do an uninstall and reinstall of the AP module. If this happens to be the case you may end up with your original error again.

Either way, I'll await your findings before going any further.

Cheers
Rod

30 Jan 2008, 2:52 PM
#11
pascalgaut avatar

pascalgaut

New Zenner

Join Date:
Jan 2008
Posts:
3
Plugin Contributions:
0

Re: AustPost for 1.3.8a ?

Rod,

Other shipping modules (when austpost is disabled) seem to work fine. It seems to only happen when austpost is enabled. Do you know how I can turn PHP or Zen Cart debug/logging on so that I can see which part of the code is having a problem?

30 Jan 2008, 11:04 PM
#12
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: AustPost for 1.3.8a ?

G'day pascalgaut,

Other shipping modules (when austpost is disabled) seem to work > fine. It seems to only happen when austpost is enabled.

I suggest (again) you uninstall and reinstall the AP module (from the .zip archive).

The AP module does have a little bit of debugging code inbuilt, but it will be pointless activating it when the symptoms are 'blank screen', 'cos you'll still have nothing but a blank screen!

Cheers
Rod

1 Feb 2008, 7:06 AM
#13
max44 avatar

max44

New Zenner

Join Date:
May 2007
Posts:
53
Plugin Contributions:
0

Re: AustPost for 1.3.8a ?

I love the module :)
Is there any way to add the express post Yellow bags. The cost is higher but i use these all the time for my commercial customers.
The weight selection works fine, IE a 1Kg item only allows the 3Kg bag and removes the 500g satchel.
Express post is $10.50 per bag. Austpost module shows the (Red) bag price.
Thanks

1 Feb 2008, 1:27 PM
#14
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: AustPost for 1.3.8a ?

G'day max44,

Is there any way to add the express post Yellow bags.

I'm hoping to have another release out before 11/2/08 ('cos that's when my classes resume) that will cater for these bags (in addition to the red bags).

Meanwhile, if you don't wish to wait (or if I don't get it finished in time) you might want to consider increasing the price of the current bags. To do this, load /modules/shipping/austpost.php into a text editor, locate the block of code for the fixed price overrides (lines 88 to 99). Copy the two lines:
costPrePaid500g=5.30
costPrePaid3k=9.30
to somewhere just outside the commented block. Set your prices to suit.

Cheers
Rod

1 Feb 2008, 1:34 PM
#15
max44 avatar

max44

New Zenner

Join Date:
May 2007
Posts:
53
Plugin Contributions:
0

Re: AustPost for 1.3.8a ?

Thanks for that.
I will wait for the update, then i wont mess it up.
By the way, I mainly use yellow bags so i can post after hours. I am told i cant do that with the red bags at a normal post box.
Thanks again for a great module

1 Feb 2008, 1:43 PM
#16
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: AustPost for 1.3.8a ?

G'day max44,

I mainly use yellow bags so i can post after hours.
I am told i cant do that with the red bags at a normal post box.

Who told you that? We've been using the red bags in the normal post boxes for years. I think the only time there was a problem was one time when we managed to squeeze almost 1kg into the 500gm bag. The recipient was required to pay the difference in cost.
We occasionally go a 'little' over the limits with no problem, I guess almost double the allowed weight was a little too much. <g>

Cheers
Rod

1 Feb 2008, 1:44 PM
#17
max44 avatar

max44

New Zenner

Join Date:
May 2007
Posts:
53
Plugin Contributions:
0

Re: AustPost for 1.3.8a ?

I tried to edit the above message but we only have 7 minutes to do that. Missed the boat.
I changed the files. Was easy.
Do we need to use your server or is there another way rather than using your bandwidth etc?
I was under the impression we used the australia post server..
Cheers

Australia post told me I had to use the yellow bags to post in the boxes after hours.. red boxes were for normal mail

1 Feb 2008, 2:13 PM
#18
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: AustPost for 1.3.8a ?

G'day again,

I changed the files. Was easy.

That's only because you had a good instructor ;-)

Do we need to use your server or is there another way
rather than using your bandwidth etc?

No, you don't need to use our server, but the bandwidth is minimal, less than a few hundred bytes per user session.

I was under the impression we used the australia post server..

The version 1.x.x used the australia post (drc.edeliver.com.au) server exclusively. However, this server doesn't supply the prices for things like letters, the prepaid satchels, insurance rates and so forth, which meant that either the end user needed to keep these prices up to date, or I'd need to make a new release anytime the prices changed (and the end user would need to upgrade).
So, to mitigate these problems I set up our own server to provide these prices. Sure it means I'll need to update our server whenever austpost change their prices, but that is going to be far easier and more reliable than the alternatives.

As for the parcel calculations, I saw no reason to duplicate the drc.edeliver.com.au service, so I've configured our server to redirect those particular requests back over to their servers.

In other words, it is now using two different servers to obtain its quotes.

So, back to your question as to whether you need to use our server, the answer is still 'no', BUT, if you don't use our server you will need to add those 'overrides' to all of the variables listed (as well as change the server definition in line 73 or therebouts.

Australia post told me I had to use the yellow bags to post in the
boxes after hours.. red boxes were for normal mail

Yellow bags go in the yellow boxes. Red bags (and other letters) go in the Red boxes. Red bags ARE 'normal mail'.
If you place a Yellow bag in a Red box it will also go as normal mail.

What is the point of buying prepaid red bags if you still need to go into the post office to post them?

Cheers
Rod

1 Feb 2008, 2:38 PM
#19
max44 avatar

max44

New Zenner

Join Date:
May 2007
Posts:
53
Plugin Contributions:
0

Re: AustPost for 1.3.8a ?

Hi Rod
,
i did the mod okay :)
I copied the pre-paid lines (2) and pasted them just after the commented out section.
I changed the 3Kg to $10.50 and the other to 8.50.
If i click on the estimate postage box, i get a blankscren(almost) saying "Close window"

If i remove the new lines it works again
Regards

2 Feb 2008, 12:56 AM
#20
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: AustPost for 1.3.8a ?

G'day max44

I copied the pre-paid lines (2) and pasted them just after the
commented out section.
If i click on the estimate postage box, i get a blankscreen.

Easy fixed. On the two lines you moved/copied, make sure they each end with a semi-colon.

eg;
costPrepaid3k=10.30 ;
costPrepaid500g=6.30 ;

Cheers
Rod