Zen Cart Logo
Forums / Built-in Shipping and Payment Modules / Quick question: Does Aust Post Mod calculate OS deliveries?

Quick question: Does Aust Post Mod calculate OS deliveries?

Locked

Views: 4,583

Results 21 to 39 of 39
This thread is locked. New replies are disabled.
13 Aug 2007, 12:06
#21
rodg avatar

rodg

Deceased

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

Quick question: Does Aust Post Mod calculate OS deliveries?

G'day Blind1,

DrByte is a little behind in this particular thread.

I don’t understand php enough to know how to execute any of
those options. Maybe I will contact the host again. I asked
them to look at it three days ago and nothing has been done

Don't do anything (other than what I've told you) <g>
DON'T contact your host again, you will only annoy them. The fact is, they DID already take care of the file($url) problem that you initially had.

You and I are now working on another problem that DrByte isn't familiar enough to help you with (no offense intended to DrByte)

Cheers
Rod

13 Aug 2007, 12:08
#22
blind1 avatar

blind1

Zen Follower

Join Date:
Dec 2006
Location:
Victoria, Australia
Posts:
351
Plugin Contributions:
0

Re: Quick question: Does Aust Post Mod calculate OS deliveries?

Thanks Rod
So if i download that module again and upload the tpl_shipping_estimator.php file leaving as is should that fix it?

13 Aug 2007, 12:17
#23
rodg avatar

rodg

Deceased

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

Re: Quick question: Does Aust Post Mod calculate OS deliveries?

G'day DrByte

  • rewrite the auspost module to use CURL instead of fopen()

Just as a FYI (and I honestly don't expect you to know or remember this, nor do have have need or reason to), but the austpost module already has the CURL method already coded.

The problem is (and you may be able to help with this) in order to use CURL rather than file() a line of code needs to be commented out. (no one involved has had a problem with that yet). Do you know of any quick/dirty methods (or perhaps even nice methods) of detecting whether the file() method is available or not before it produces an error?

I've tried something like (psuedocode)

result = result_of_file_method
if no result
result = result_of_curl_method
endif

But when the result_of_file_method fails because of the oversecure permissions, the module exits rather than processing the if statement.

Can you offer any advice?

Cheers
Rod

13 Aug 2007, 12:18
#24
blind1 avatar

blind1

Zen Follower

Join Date:
Dec 2006
Location:
Victoria, Australia
Posts:
351
Plugin Contributions:
0

Re: Quick question: Does Aust Post Mod calculate OS deliveries?

Which i just did with no change. Doh!:frusty:

13 Aug 2007, 12:22
#25
rodg avatar

rodg

Deceased

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

Re: Quick question: Does Aust Post Mod calculate OS deliveries?

G'day blind1,

So if i download that module again and upload the
tpl_shipping_estimator.php file leaving as is should that fix it?

It should do.

I do advise that you place it into your /custom/ directory rather than overwriting the original though.

Was you able to confirm that it is now giving valid estimates?

Cheers
Rod

13 Aug 2007, 12:30
#26
blind1 avatar

blind1

Zen Follower

Join Date:
Dec 2006
Location:
Victoria, Australia
Posts:
351
Plugin Contributions:
0

Re: Quick question: Does Aust Post Mod calculate OS deliveries?

It is still giving that error. I loaded it into the custom folder.

13 Aug 2007, 12:38
#28
rodg avatar

rodg

Deceased

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

Re: Quick question: Does Aust Post Mod calculate OS deliveries?

G'day Blind1,

I'm actually starting to run out of ideas. I think we've now confirmed that your problem is related to the tpl_shipping_estimator, and in particular the one that you are trying to install from the austpost module, but I've really got no explanation as to WHY it is happening.

For the time being I suggest you use the original code.. it may not look pretty the 1st time in, but at least it is functional.

I'm really not sure how to go about solving the problem though. Perhaps you could zip up a copy of both of your tpl_shipping_estimator.php files and email them to me ([email protected]) and I'll be able to compare them against each other and my own copies ro see if I can spot anything amiss.

I don't know if it will make a difference or not, but are you running you shop on a windows server or a linux server?

Cheers
Rod

13 Aug 2007, 12:41
#29
blind1 avatar

blind1

Zen Follower

Join Date:
Dec 2006
Location:
Victoria, Australia
Posts:
351
Plugin Contributions:
0

Re: Quick question: Does Aust Post Mod calculate OS deliveries?

I am running on Linux. I will email the new file i just uploaded as it is doing what the other did before. The client said that the calculations are coming through correct on the end order but we still get that ugly error if someone clicks calculate button.

13 Aug 2007, 12:53
#30
rodg avatar

rodg

Deceased

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

Re: Quick question: Does Aust Post Mod calculate OS deliveries?

Hi Blind1

but we still get that ugly error if someone clicks calculate button.

Until we solve the problem you can minimise the effect of this error by having the shipping estimator display as a popup rather than inline.
configuration/packing and shipping/
Shipping Estimator Display Settings for Shopping Cart = 1

Cheers
Rod

13 Aug 2007, 13:05
#31
blind1 avatar

blind1

Zen Follower

Join Date:
Dec 2006
Location:
Victoria, Australia
Posts:
351
Plugin Contributions:
0

Re: Quick question: Does Aust Post Mod calculate OS deliveries?

ok I just tried uploading those two files again and i am back to getting this error.

Warning:  file() [function.file on line ]: URL file-access is disabled in the server configuration in /home2/creativ/public_html/aussiedog/includes/modules/shipping/austpost.php624

Warning: file(http://drc.edeliver.com.au/ratecalc.asp?Pickup_Postcode=3156&Destination_Postcode=3795&Country=AU&Weight=1810&Service_Type=STANDARD&Height=250&Width=250&Length=290&Quantity=1) [function.file on line ]: failed to open stream: no suitable wrapper could be found in /home2/creativ/public_html/aussiedog/includes/modules/shipping/austpost.php624

Warning:  file() [function.file on line ]: URL file-access is disabled in the server configuration in /home2/creativ/public_html/aussiedog/includes/modules/shipping/austpost.php624

Warning: file(http://drc.edeliver.com.au/ratecalc.asp?Pickup_Postcode=3156&Destination_Postcode=3795&Country=AU&Weight=1810&Service_Type=EXPRESS&Height=250&Width=250&Length=290&Quantity=1) [function.file on line ]: failed to open stream: no suitable wrapper could be found in /home2/creativ/public_html/aussiedog/includes/modules/shipping/austpost.php624

Apart from that the shipping does calculate though.
It seems to be more cosmetic now

i will change that setting to make a popup as you sugested thanks

13 Aug 2007, 13:24
#32
rodg avatar

rodg

Deceased

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

Re: Quick question: Does Aust Post Mod calculate OS deliveries?

Hi Blind1

ok I just tried uploading those two files again and i am
back to getting this error.
PHP Code:
Warning: file() [function.file on line ]: URL file-access is disabled

WTF!!!!!! That WAS working.

OK, load /include/modules/shipping/austpost.php into a text editor, locate line#624 and comment it out //

Resave.

Also, until we get this mess sorted out, I really do suggest you stay with the original tpl_shipping_estimater.php and not use the one that came with your austpost module.

Cheers
Rod

13 Aug 2007, 15:09
#33
blind1 avatar

blind1

Zen Follower

Join Date:
Dec 2006
Location:
Victoria, Australia
Posts:
351
Plugin Contributions:
0

Re: Quick question: Does Aust Post Mod calculate OS deliveries?

ok will do:wink:

But dont you mean delete: $myfile = file($url); ???

13 Aug 2007, 15:15
#34
blind1 avatar

blind1

Zen Follower

Join Date:
Dec 2006
Location:
Victoria, Australia
Posts:
351
Plugin Contributions:
0

Re: Quick question: Does Aust Post Mod calculate OS deliveries?

That is a bit better. Sorry for fiddling. i will wait for you:blush:

14 Aug 2007, 08:08
#35
rodg avatar

rodg

Deceased

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

Re: Quick question: Does Aust Post Mod calculate OS deliveries?

Hi Blind1,

A new day :-)

ok will do
But dont you mean delete: $myfile = file($url); ???

Deleting it will have the same effect, but if you comment it out it will give you a guide as to what to do if you need to do the same again after an update.

Anyway, from the looks of things the module is now at least attempting to get a quote.
The tpl_shipping_estimator.php file that you currently have in place is the one from the AustPost module (which assuming is the same code you emailed me, is 100% identical to my original, ergo, its not a corrupted file). If you remove this file from your /custom/ directory the original file will be used instead, and that should get the thing working for you.
Important: Only remove the tpl_shipping_estimator.php from your custom folder. DON'T DO ANYTHING ELSE UNTIL I SEE THE RESULTS no matter what they are. Thanks

Rod.

Cheers
Rod

14 Aug 2007, 08:19
#36
blind1 avatar

blind1

Zen Follower

Join Date:
Dec 2006
Location:
Victoria, Australia
Posts:
351
Plugin Contributions:
0

Re: Quick question: Does Aust Post Mod calculate OS deliveries?

ok I uploaded the file from my original 1.3.6 version. It is still showing these sort of errors:

Australia Post (ERROR:Unable to obtain a valid quote from the Australia Post Server.
Please try again later, or contact the store owner if problems persist. Invalid Destination Postcode supplied, must be numeric )
14 Aug 2007, 08:31
#37
rodg avatar

rodg

Deceased

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

Re: Quick question: Does Aust Post Mod calculate OS deliveries?

Hi Blind1,

ok I uploaded the file from my original 1.3.6 version. It is still
showing these sort of errors:
PHP Code:
Australia Post (ERROR:Unable to obtain a valid quote from the Australia > Post Server.
Please try again later, or contact the store owner if problems persist. >Invalid Destination Postcode supplied, must be numeric )

Believe it or that is GOOD!!

OK, next steps.

  1. Ignore the error - enter a valid postcode (or country), and you'll see that it is now giving a valid result (this is where we got too last night before it all fell apart).

Step2. Please email me a copy of the tpl_shipping_estimator.php code that is currently in place. (This may seem pointless, but please humour me).

Cheers
Rod

14 Aug 2007, 12:56
#38
rodg avatar

rodg

Deceased

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

Re: Quick question: Does Aust Post Mod calculate OS deliveries?

Hi Blind1,
How was your night on the town? <grin>

I've found your problem. It seems that you are running zen-cart V1.3.6

The Austpost module was written for V1.3.7 and is apparenlty not 100% backwards compatible with your version.

You now have two options... leave you setup as it is, the Austpost module is working, it just looks bad for first time non-logged in users.
The other option, upgrade your installation to V1.3.7

Cheers
Rod.

14 Aug 2007, 13:58
#39
blind1 avatar

blind1

Zen Follower

Join Date:
Dec 2006
Location:
Victoria, Australia
Posts:
351
Plugin Contributions:
0

Re: Quick question: Does Aust Post Mod calculate OS deliveries?

Gee I have had so much trouble with this site I dont think upgrading is something I want to tackle. I might leave as is at the moment seeing it is operational.
:blush: