Zen Cart Logo
Forums / Addon Shipping Modules / ozpost shipping module

ozpost shipping module

Views: 403,028

Results 301 to 320 of 2,251
15 Oct 2009, 2:53 PM
#301
rodg avatar

rodg

Deceased

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

ozpost shipping module

nukebiz:

hmm, interesting quirk with the the SimpleXMLElement error (using v1.0.4).

If my store name is a single word, I get the error, but if I have a two word store name, I don't get the error
i.e. the space eliminates the problem :dontgetit

I don't get it either.. I'm not aware of any connection between the store name and the XML processor.

Just out of curiosity, do you have cURL enabled?

Cheers
Rod

15 Oct 2009, 11:46 PM
#302
nukebiz avatar

nukebiz

New Zenner

Join Date:
Sep 2008
Posts:
2
Plugin Contributions:
0

Re: ozpost shipping module

No, this is using fsockopen - I presume the problem lies with how http_client is handling the data. In either case (single or double name), the raw cvsweb link always provides the correct xml feed. The store name comes into it because that is what is used for $HOST.

I'm having issues with cURL which is why I was playing around.

16 Oct 2009, 2:23 AM
#303
rodg avatar

rodg

Deceased

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

Re: ozpost shipping module

nukebiz:

No, this is using fsockopen - I presume the problem lies with how http_client is handling the data. In either case (single or double name), the raw cvsweb link always provides the correct xml feed. The store name comes into it because that is what is used for $HOST.

I'm having issues with cURL which is why I was playing around.

What are the issues that you are having with cURL? (I'd rather concentrate on solving this rather than the fsockopen problem, because this is the direction things are heading.

As for the $HOST variable, this is only used for logging, debugging and statistical purposes. Other than the log files themselves this variable isn't even referenced by the server software, and nothing returned by the server contains any reference to this variable, (which is why I don't have an explanation for the results you are getting).

Anyway, to 'cure' your problem I guess the easy/best/safe thing to do would be to simply redefine the $HOST variable so that it only contains a single word.

It'll probably also be safe to simply delete all references to the this variable, but there are multiple instances of it, so such an action will be more prone to error.

In any case, as I previously mentioned, I'm much more interested in the problems you are experiencing wit cURL.

Cheers
Rod

16 Oct 2009, 3:05 AM
#304
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: ozpost shipping module

There is an issue on this shipping module that those of you who use more than this module with weight ...

$shipping_weight is a global variable used by all weight based shipping modules ...

If you change the weight, as in this line:

    $shipping_weight = $parcelweight ;  // global value for zencart

You have changed the weight for ALL other shipping modules ...

Look at how the other shipping modules such as UPS and USPS use the weight by setting their "own" variable from the $shipping_weight ...

This allows that they use can "use" the calculated weight, but they cannot "alter" the calculated weight so that any other weight based shipping module can access the correct weight ...

Example, in UPS, the weight is used with:

    // ups doesnt accept zero weight send 1 ounce (0.0625) minimum
    [B]$ups_shipping_weight[/B] = ($shipping_weight <= 0 ? 0.0625 : $shipping_weight);

NOTE: the value 0.0625 is new to the upcoming v1.3.9 to account for a more accurate 1 ounce than the current 0.10 that has been used in older Zen Cart versions ...

Just fun thoughts for you folks to think about in the updates to this, and other, shipping modules ... :cool:

16 Oct 2009, 4:25 AM
#305
rodg avatar

rodg

Deceased

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

Re: ozpost shipping module

Ajeh:

There is an issue on this shipping module that those of you who use more than this module with weight ...

$shipping_weight is a global variable used by all weight based shipping modules ...

If you change the weight, as in this line:

$shipping_weight = $parcelweight ;  // global value for zencart
> 
> <snip>
> 
> Just fun thoughts for you folks to think about in the updates to this, and other, shipping modules ... :cool:

Gulp. :oops: Nice catch.

For anyone needing an immediate fix, just comment out / delete the line in question.  It is/was an unintentional addition to the code somewhere along the line. It has no use for the ozpost module, and will only screw things up other modules. :blush:

Cheers
Rod
16 Oct 2009, 6:51 AM
#306
p1drobert avatar

p1drobert

New Zenner

Join Date:
May 2007
Location:
Melbourne, Australia
Posts:
88
Plugin Contributions:
0

Re: ozpost shipping module

nukebiz:

hmm, interesting quirk with the the SimpleXMLElement error (using v1.0.4).

If my store name is a single word, I get the error, but if I have a two word store name, I don't get the error
i.e. the space eliminates the problem :dontgetit

Hi nukebiz,

I tried a two word store name but it doesn't stop the problem.
I printed out the session path to see where its storing sessions and realized that its still trying to access the cache in my original directory.
as in
/blahblah/www/shopfront/cache

Originally my installation directory was called shopfront, but I renamed it to "old shopfront" when I decided to try a new zencart installation. I'm using the "old shopfront" as a test situation.
The newer operational site I then stored in the shopfront directory.
So I'm running the zencart from the "old shopfront" directory, but it tries to access the cache in the "shopfront" directory.
I suspect the cache path is being taken from the database which was created when the files were originally stored in the shopfront directory.
Ok, long winded.

The question is: If you rename your zencart folder to the name it originally had when you first installed it, does it fix the problem?

19 Oct 2009, 10:11 PM
#307
dw08gm avatar

dw08gm

Totally Zenned

Join Date:
Sep 2008
Location:
DownUnder, overlooking South Pole.
Posts:
1,016
Plugin Contributions:
2

Re: ozpost shipping module

Do ISO-3 country codes work with this module/Australia Post?

ie includes\modules\shipping\ozpost.php
Line 208

$dest_country=$order->delivery['country']['iso_code_2'];

Line 357-8
// Set destination code ( postcode if AU, else 2 char iso country code )
$dcode = ($dest_country == "AU") ? $topcode:$dest_country ;

Further discussion on changing from ISO-2:
http://www.zen-cart.com/forum/showthread.php?t=77350

20 Oct 2009, 1:44 AM
#308
rodg avatar

rodg

Deceased

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

Re: ozpost shipping module

dw08gm:

Do ISO-3 country codes work with this module/Australia Post?

They'll work, but only if you locate and change each instance of code where comparisons are made.

Note: The request to the server must be ISO-2.

Why are you asking anyway? Have you identified a problem with the ISO-2?

Cheers
Rod

20 Oct 2009, 10:55 AM
#309
poohbear avatar

poohbear

New Zenner

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

Re: ozpost shipping module

RodG:

Ooop. Wrong file was arrached. Use this one instead <sigh>

Tired and late/

Hi Rod,

Thank You very much for your efforts, it worked as soon as I have replaced the file. But I did reinstall it as you have suggested and everything is under control.

Thank you again for your help!

20 Oct 2009, 11:28 AM
#310
rodg avatar

rodg

Deceased

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

Re: ozpost shipping module

poohbear:

it worked as soon as I have replaced the file. But I did reinstall it as you have suggested and everything is under control.

Thank you again for your help!

Without doing the reinstall would have been fine for you, until you decided that you wanted to offer overseas letters :-)

Cheers
Rod

21 Oct 2009, 7:04 AM
#311
dw08gm avatar

dw08gm

Totally Zenned

Join Date:
Sep 2008
Location:
DownUnder, overlooking South Pole.
Posts:
1,016
Plugin Contributions:
2

Re: ozpost shipping module

RodG:

Why are you asking anyway? Have you identified a problem with the ISO-2?
Rod

No problem encountered as I have yet to go live. Just asking out of interest as I discover others, most probably from other countries, using this setting.

21 Oct 2009, 7:40 AM
#312
rodg avatar

rodg

Deceased

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

Re: ozpost shipping module

dw08gm:

No problem encountered as I have yet to go live. Just asking out of interest as I discover others, most probably from other countries, using this setting.

From the little I know on the subject, I am under the impression that the use of the iso-3 is mainly to help distinquish things like CA the state of California, and CA the country of Canada. From an ozzy point of view both are simply 'overseas'.
:cool:

If there does become a need for ozpost to use the 3 digit codes it'll be trivial to update. I had no specific reason for only using the 2 chars, other than being a lazy typist.

Cheers
Rod

21 Oct 2009, 8:03 AM
#313
dw08gm avatar

dw08gm

Totally Zenned

Join Date:
Sep 2008
Location:
DownUnder, overlooking South Pole.
Posts:
1,016
Plugin Contributions:
2

Re: ozpost shipping module

IIRC The others were more concerned with admin functions, such as invoicing and reports, rather than shipping, but I thought change for one change for all.

The Canada/California (CAN/CA => Country/State) example is not so much an issue as distinguishing between similar Country/Country codes:
Austria/Australia
North/South Korea

22 Oct 2009, 2:03 AM
#314
burko avatar

burko

New Zenner

Join Date:
May 2008
Location:
Sydney
Posts:
17
Plugin Contributions:
0

Re: ozpost shipping module

I have recently installed this module, I used to use the Australia Post Shipping module that this module replaced with no problems.

This module seems to be under-quoting for some reason.

Am I doing something wrong?

22 Oct 2009, 12:45 PM
#315
rodg avatar

rodg

Deceased

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

Re: ozpost shipping module

burko:

I have recently installed this module, I used to use the Australia Post Shipping module that this module replaced with no problems.

This module seems to be under-quoting for some reason.

Am I doing something wrong?

Probably.

26 Oct 2009, 2:24 AM
#316
tim_ware avatar

tim_ware

New Zenner

Join Date:
Dec 2007
Posts:
25
Plugin Contributions:
0

Re: ozpost shipping module

Hi Rod, Thanks for the ozpost module, my customers are really liking all the extra options..

I am having a small issue with the ozpost module working with the super orders module.

The original orders.php works fine in that is displays the postage option selected on the invoice like this:
**Aussie Post ( Express Parcel ): **

However in super_orders.php it only displays this on the order invoice:
**Aussie Post : **

It misses the** ( Express Parcel ) **bit.. :blink:

Makes it a bit of a pain having to go back and fourth between the 2, to find out how the order is to be posted.

Any help or ideas would be greatly appreciated :smile:

26 Oct 2009, 3:47 AM
#317
tim_ware avatar

tim_ware

New Zenner

Join Date:
Dec 2007
Posts:
25
Plugin Contributions:
0

Re: ozpost shipping module

I have found a solution for my problem above, not sure if it will cause any other problems..

Here is the line of code I changed in the super_orders.php to make it display the shipping properly...

Replaced Line 776:

           '                <td align="right" class="'. str_replace('_', '-', $order->totals[$i]['class']) . '-Text">' . $display_title . '</td>' . "\n" .

With this:

           '                <td align="right" class="'. str_replace('_', '-', $order->totals[$i]['class']) . '-Text">' . $order->totals[$i]['title'] . '</td>' . "\n" .

Hope this can help anybody else with super order module installed...

Thanks again for the great mod!

27 Oct 2009, 1:44 PM
#318
stumpy74 avatar

stumpy74

New Zenner

Join Date:
Oct 2009
Posts:
26
Plugin Contributions:
0

Re: ozpost shipping module

Hi Rod

I'm pulling my hair out !!! I have now installed ozpost (am a newbie) but it won't come up in my Shipping Methods. Tried looking through the last 32 pages of this thread without much luck. Have copied the files tot he server (again); uninstalled/reinstalled have the green light so its enabled. I just don't understand why ozpost won't come up for me in the shipping methods but the other shipping methods seem to.

Thanks

27 Oct 2009, 2:44 PM
#319
rodg avatar

rodg

Deceased

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

Re: ozpost shipping module

Stumpy74:

Hi Rod

I'm pulling my hair out !!! I have now installed ozpost (am a newbie) but it won't come up in my Shipping Methods. Tried looking through the last 32 pages of this thread without much luck. Have copied the files tot he server (again); uninstalled/reinstalled have the green light so its enabled. I just don't understand why ozpost won't come up for me in the shipping methods but the other shipping methods seem to.

Thanks

Have you tried enabling cURL?

Have you tried enabling debug?

Have you considered giving me a little more information to work with? :wink2:

Cheers
Rod

27 Oct 2009, 8:38 PM
#320
stumpy74 avatar

stumpy74

New Zenner

Join Date:
Oct 2009
Posts:
26
Plugin Contributions:
0

Re: ozpost shipping module

slap hahaha

and here I thought you could simply read minds Rods.

Sorry I thought you may have an answer "you didn't do this dumba**"

Yes I have turned on debug and yes I have turned on cURL but I don't have the cURL info from my web provider yet. Is that needed for it to display as an option at the shipping method option ? (this might be a simple answer at this point)

Anyway this is what I am seeing

The fact I get a server response time - is that a good thing ?