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

ozpost shipping module

Views: 403,104

Results 801 to 820 of 2,251
8 Jun 2010, 6:05 AM
#801
mike_dean avatar

mike_dean

Totally Zenned

Join Date:
Feb 2006
Location:
Central Coast, NSW, Australia
Posts:
531
Plugin Contributions:
0

ozpost shipping module

RodG:

Not sure what to say. I eventually managed to gain access to a site that was exhibiting this issue. and the changes I suggested/recommended cured the problem stone dead.

I can't think of any reason whatsoever why the fix wouldn't work for you.

Perhaps you edited the wrong file? (I probably shouldn't admit this, but I wasted the best part of an hour yesterday because I was editing the file from a backup folder rather than the live site. Doh! )

Cheers
Rod

Hi Rod,

I'm 99.9999999% sure it was the right file as I simply FTP'd it off the server,. edited it and dumped it back... But I'll double check anyway..

Thanks,
Mike

8 Jun 2010, 6:21 AM
#802
jojo11 avatar

jojo11

Inactive

Join Date:
May 2007
Location:
Australia
Posts:
5
Plugin Contributions:
0

Re: ozpost shipping module

I think I may be also having the same issue. I noticed over the weekend that sales stopped and only yesterday (after a customer query) discovered that the postal rates are displaying the Aust Post error 'Unexpected error (no valid methods). Using AP Flat Rate.' I have not added or made any changes to the site recently. I then installed the latest Ozpost module - although my zen cart version is only 1.3.8a so it may not be compatible? On top of that I have made the changes to the module ozpost.php as Rod outlined - but there is no change.

Perhaps I should revert back to the earlier Ozpost module suited to 1.3.8 and then make the changes to the ozpost.php module as outlined?

Any thoughts would be appreciated and Rod, if you wish to see the site I will pm you with the details.

8 Jun 2010, 6:41 AM
#803
rodg avatar

rodg

Deceased

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

Re: ozpost shipping module

somedood:

Hi Rod,
I'll send you my site and login details in a PM.

Please, everyone. DON'T do this unless I specifically ask. Generally speaking, if I need login details then whatever it is you want/expect from me is going to be a chargeable job.

somedood:

Currently suburban VIC shipments are charged at $7.45 + $1 handling = $8.45 total which is correct, however country VIC is charged at $16.25 + $1 = $17.25,

When I said I needed 'specific examples', I meant to imply that they need to be something that I can verify for myself.
I acknowledge that there are probably products in your store that will provide these shipping quotes, but I'm not going to spend the time adding random quantities of random products to a shopping cart and picking destination postcodes semi-randomly just to replicate the figures you have provided.

somedood:

where previously was $16.15 total.

Previous to what? The Ice Age? The last price increase? The last incorrect quote provided to you by the obsolete AustPost module?

somedood:

I've used the same handling fee config.

I will repeat... The same as what? ozpost V1? That'll cause you a problem straight up.. As per previous reply "Not an easy task considering V2 has a lot more settings than V1 :-) "

somedood:

I'll keep playing around with the handling fees and see if it's different,

This comment worries me for two reasons.

  1. It tells me that in spite of handling fees being shown, you haven't yet managed to decide whether it is the shipping quotes that are incorrect/different or whether it is the handling fees.

  2. You should not need to "play" with the handling fees to see what they do. I believe they are all clearly marked, labeled, and otherwise pretty obvious what each of them do. I acknowledge that as clear as I attempt to make it, someone, somewhere, is going to be confused about one, perhaps two of the settings, in which case a little bit of experimenting soon resolves any confusion. What I'm getting from you as that that you are confused about ALL of them, therefore you feel a need to 'play'.

Playtime is over, and I'm not going to do your work for you.

somedood:

but currently it looks like the fees are at least applied differently.

Wow, what an amazing bit of insight... not only did I tell you that already, you also re quoted it back to me before presenting it as your own conclusion.

"Also, take careful note of the way the handling charges are defined, as some of them are applied differently between the versions."

somedood:

With regards to the satchels, your test was for aussiemaille's site, not mine.

Would/Should that make a difference? Same apparent problem (I guess/think), so I would assume the same conclusions (if any) could/should be applied. I shouldn't need to give every site/user personal attention.

somedood:

It's strange because i've enabled auspost satchels and auspost express satchels but only auspost satchels come up.

That was aussiemaille 's complaint too. Have you tried the same fix that worked for there?

somedood:

Also, trying to get TNT up which is a great feature. Unfortunately it's also not showing up. I'm not exactly sure which of my logins to use, though. TNT website has a few. I've used my username and password and it doesn't show up. I've also used my email and password. My account number should be OK.
Anyway, if you could give me some clues it would be much appreciated.

Temporarily enable DEBUG mode to capture the error message provided by TNT (if any). Then Contact TNT for further help.

Cheers
Rod

8 Jun 2010, 6:52 AM
#804
mike_dean avatar

mike_dean

Totally Zenned

Join Date:
Feb 2006
Location:
Central Coast, NSW, Australia
Posts:
531
Plugin Contributions:
0

Re: ozpost shipping module

Mike_Dean:

Hi Rod,

I'm 99.9999999% sure it was the right file as I simply FTP'd it off the server,. edited it and dumped it back... But I'll double check anyway..

Thanks,
Mike

Hi Rod,

I can now say with 100% confidence, I am editing the right file

/public_html/includes/modules/shipping/ozpost.php

And the edited version now shows (at line 338)

// Server query string //

$HOST= str_replace(" ", "+", $HOST) ;

$qu = $this->_getAPdata($SERVER, "/postage.php?fromcode=" . MODULE_SHIPPING_OZPOST_SPCODE ."&destcode=$dcode&weight=$parcelweight&height=$parcelheight&width=$parcelwidth&length=$parcellength&value=$ordervalue&flags=$flags &host=$HOST&version=$VERSION") ;

If this all looks in order, as you suggest it is, then I will set to and update to the current version, as it seems I am the odd one out for whom the fix wont work..

Thanks for all your efforts thus far..

Mike

8 Jun 2010, 7:01 AM
#805
rodg avatar

rodg

Deceased

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

Re: ozpost shipping module

jojo11:

I think I may be also having the same issue.

These are the words I dread most.
Yes, you MIGHT be having the same issue as one or more people in this thread, but this thread contains reports and fixes of many different problems going back several years, statistically everyone is going to have the same problems as everyone else, all else being equal. :-)

jojo11:

I then installed the latest Ozpost module -

And the latest ozpost module is version ???? (for all you know, I may have released another version just today... I haven't but you don't know that, just as I have no idea what you think is the latest version (which is currently V2.0.6)

jojo11:

although my zen cart version is only 1.3.8a so it may not be compatible?

All versions of ozpost are compatible all versions of zencart from 1.3.7 upwards (and possibly even earlier versions).

jojo11:

On top of that I have made the changes to the module ozpost.php as Rod outlined - but there is no change.

Rod outlined changes to ozpost v1.0.2 only!! Surely that was clear?
Did you make this change before or after you " installed the latest Ozpost module"

jojo11:

Perhaps I should revert back to the earlier Ozpost module suited to 1.3.8 and then make the changes to the ozpost.php module as outlined?

So what bloody version did you change? V2?

jojo11:

Any thoughts would be appreciated

I think you should just install the latest version of ozpost (v2.0.6) and worry about any problems afterwards, assuming there ARE any problems afterwards, in which case you'll be able to report the issues back here as a 'new' complaint, because whatever issue you find isn't going to 'be 'the same issue' that may or may not have brought you here in the first place.

Cheers
Rod

8 Jun 2010, 7:07 AM
#806
rodg avatar

rodg

Deceased

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

Re: ozpost shipping module

Mike_Dean:

$qu = $this->_getAPdata($SERVER, "/postage.php?fromcode=" . MODULE_SHIPPING_OZPOST_SPCODE ."&destcode=$dcode&weight=$parcelweight&height=$parcelheight&width=$parcelwidth&length=$parcellength&value=$ordervalue&flags=$flags &host=$HOST&version=$VERSION") ;

If this all looks in order, as you suggest it is, then I will set to and update to the current version, as it seems I am the odd one out for whom the fix wont work..

This may just be a formatting issue as a result of reposting, but I see that there is a space character between "$flags &host" - If this is a 'real' space (IOW, if it is in the code itself) please try closing it "$flags&host" and trying again.

Thanks
Rod

ps. It looks like this space exists in my original post. It is NOT supposed to be there and I'm pretty confident that this is going to pose the same problem we are trying to fix <sigh>

8 Jun 2010, 7:36 AM
#807
giftpackaging avatar

giftpackaging

New Zenner

Join Date:
May 2009
Posts:
22
Plugin Contributions:
0

Re: ozpost shipping module

Hey everyone,

I had similiar issue with ozpost suddenly not providing any rates and then only giving the AP Flat rate. I was using a slightly old ozpost.

I opted to upgrade to the latest Ozpost module. (I'm still using 1.38a zencart). Everything worked perfectly. Just needed to disable and then re-enable the ozpost shipping module. Everything is working a treat! Thanks Rod!

8 Jun 2010, 8:43 AM
#808
mike_dean avatar

mike_dean

Totally Zenned

Join Date:
Feb 2006
Location:
Central Coast, NSW, Australia
Posts:
531
Plugin Contributions:
0

Re: ozpost shipping module

RodG:

This may just be a formatting issue as a result of reposting, but I see that there is a space character between "$flags &host" - If this is a 'real' space (IOW, if it is in the code itself) please try closing it "$flags&host" and trying again.

Thanks
Rod

ps. It looks like this space exists in my original post. It is NOT supposed to be there and I'm pretty confident that this is going to pose the same problem we are trying to fix <sigh>

Hey Rod,

There was space as thought..

I have since removed the module and re-installed (via admin)

Its back up again (kind of).

Sometimes it's ok, and then if I adjust the qty on the cart, or change the destination, it will disappear until I click the update again...

Would I be imposing if I asked you.. (or anyone else that happens to read this) to try it and see if you can replicate it..

Use this product, (thought it wouldn't matter which)

http://w w w.nortsandones.com.au/index.php?main_page=product_info&products_id=1459

Thanks
Mike

8 Jun 2010, 9:20 AM
#809
rodg avatar

rodg

Deceased

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

Re: ozpost shipping module

Mike_Dean:

Sometimes it's ok, and then if I adjust the qty on the cart, or change the destination, it will disappear until I click the update again...

OK, this is a new problem.

Mike_Dean:

Would I be imposing if I asked you.. (or anyone else that happens to read this) to try it and see if you can replicate it..

Yes, I can replicate it (on your site) consistently.

Mike_Dean:

Use this product, (thought it wouldn't matter which)

It matters to me, because even if there is only one exception to the rule in any given store you can be sure that that will be the one I'd select randomly.

As for the problem... I'm not really sure what to make of it. It consistency requires a refresh for the quotes to show (It doesn't seem to matter if it is refreshed via the update buttons, or the F5 keyboard shortcut), so it isn't caused/fixed by a change or reset of any of the input data, therefore it simply isn't being output on the first request for some reason... or maybe it just isn't getting data on the fisrt request? ... hmm, no, if it wasn't getting any data it should still output the tables and info... (Sorry, I thinking/typing aloud here).... So, it is a display problem.... hmmm, how to prove/disprove?

Please enable DEBUG, it may or may not provide a clue.

You could also try reverting the tpl_modules_shipping_estimator.php back to the zencart original

Sorry, not much else comes to mind at the moment...

Cheers
Rod

8 Jun 2010, 9:45 AM
#810
mike_dean avatar

mike_dean

Totally Zenned

Join Date:
Feb 2006
Location:
Central Coast, NSW, Australia
Posts:
531
Plugin Contributions:
0

Re: ozpost shipping module

RodG:

OK, this is a new problem.

Bet there the last words you wanted to type.!

RodG:

Please enable DEBUG, it may or may not provide a clue.

You could also try reverting the tpl_modules_shipping_estimator.php back to the zencart original

Sorry, not much else comes to mind at the moment...

Cheers
Rod

Hi Rod..

I FTP'd the original file as suggested, and enabled DEBUG..

Mike...

8 Jun 2010, 10:18 AM
#811
rodg avatar

rodg

Deceased

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

Re: ozpost shipping module

Mike_Dean:

I FTP'd the original file as suggested, and enabled DEBUG..

Still has me baffled.

It does however still appear to be something 'local' rather than server related as the logs suggest it is getting (and returning) valid data even when the quotes don't appear.

The debug backs this up. The 'first' request (the one that doesn't show) is where it is getting the data from the server ... the refresh is getting the data from the cache (which wouldn't even be in the cache if the first request failed).

Other than this there isn't much more I can determine from the debug output ... but that is enough to convince me client/server communications are OK...

More thinking aloud..... It is as though the module is prematurely exiting on 1st quote..... Why would it do that? A bad edit? Bad code? Surely either of these will trigger an error message somewhere?

Do your Apache/PHP logs provide any clues?

Hmm, I wonder what would happen with the display under the same condition if you have another shipping module enabled at the same time? (eg, local pickup?)... just wondering....

Cheers
Rod

8 Jun 2010, 10:31 AM
#812
mike_dean avatar

mike_dean

Totally Zenned

Join Date:
Feb 2006
Location:
Central Coast, NSW, Australia
Posts:
531
Plugin Contributions:
0

Re: ozpost shipping module

RodG:

Still has me baffled.

It does however still appear to be something 'local' rather than server related as the logs suggest it is getting (and returning) valid data even when the quotes don't appear.

The debug backs this up. The 'first' request (the one that doesn't show) is where it is getting the data from the server ... the refresh is getting the data from the cache (which wouldn't even be in the cache if the first request failed).

Other than this there isn't much more I can determine from the debug output ... but that is enough to convince me client/server communications are OK...

More thinking aloud..... It is as though the module is prematurely exiting on 1st quote..... Why would it do that? A bad edit? Bad code? Surely either of these will trigger an error message somewhere?

Do your Apache/PHP logs provide any clues?

Hmm, I wonder what would happen with the display under the same condition if you have another shipping module enabled at the same time? (eg, local pickup?)... just wondering....

Cheers
Rod

I've turned on store pickup .. do you want me to leave the DEBUG on ...

Meanwhile I'll log into cpanel at my host and see if I can find some php or apache logs...

8 Jun 2010, 10:40 AM
#813
mike_dean avatar

mike_dean

Totally Zenned

Join Date:
Feb 2006
Location:
Central Coast, NSW, Australia
Posts:
531
Plugin Contributions:
0

Re: ozpost shipping module

Mike_Dean:

I've turned on store pickup .. do you want me to leave the DEBUG on ...

Meanwhile I'll log into cpanel at my host and see if I can find some php or apache logs...

(I'll have to install the PHP debug tool on my cart)

8 Jun 2010, 10:52 AM
#814
mike_dean avatar

mike_dean

Totally Zenned

Join Date:
Feb 2006
Location:
Central Coast, NSW, Australia
Posts:
531
Plugin Contributions:
0

Re: ozpost shipping module

Mike_Dean:

(I'll have to install the PHP debug tool on my cart)

Hi Rod,

This is from my FF Error console

COT("https:// w w w . nortsandones.com.au/includes/templates/norts/images/secure_site.gif", "SC2", "none");

(Forgot about this feature in FF...)

Looking at this error had me just check for something....

Hmmmmm....

My Comodo SSL logo is not showing on my site anymore..

Would that be causing an issue ???

(no.. not that the logo is missing.. just the SSL part of it..)

8 Jun 2010, 12:09 PM
#815
mike_dean avatar

mike_dean

Totally Zenned

Join Date:
Feb 2006
Location:
Central Coast, NSW, Australia
Posts:
531
Plugin Contributions:
0

Re: ozpost shipping module

Mike_Dean:

(I'll have to install the PHP debug tool on my cart)

Here is a log from when (I assume) nothing was returned, as opposed to retuning a cached page..

[08-Jun-2010 12:03:28] PHP Warning: SimpleXMLElement::__construct() [<a href='simplexmlelement.--construct'>simplexmlelement.--construct</a>]: Entity: line 1: parser error : Start tag expected, '<' not found in /home3/mikedean/public_html/includes/modules/shipping/ozpost.php on line 347

[08-Jun-2010 12:03:28] PHP Warning: SimpleXMLElement::__construct() [<a href='simplexmlelement.--construct'>simplexmlelement.--construct</a>]: 3b in /home3/mikedean/public_html/includes/modules/shipping/ozpost.php on line 347

[08-Jun-2010 12:03:28] PHP Warning: SimpleXMLElement::__construct() [<a href='simplexmlelement.--construct'>simplexmlelement.--construct</a>]: ^ in /home3/mikedean/public_html/includes/modules/shipping/ozpost.php on line 347

[08-Jun-2010 12:03:28] PHP Fatal error: Uncaught exception 'Exception' with message 'String could not be parsed as XML' in /home3/mikedean/public_html/includes/modules/shipping/ozpost.php:347

Stack trace:
#0 /home3/mikedean/public_html/includes/modules/shipping/ozpost.php(347): SimpleXMLElement->__construct('3b??<?xml versi...')

#1 /home3/mikedean/public_html/includes/classes/shipping.php(129): ozpost->quote('')

#2 /home3/mikedean/public_html/includes/modules/shipping_estimator.php(134): shipping->quote()

#3 /home3/mikedean/public_html/includes/templates/norts/templates/tpl_shopping_cart_default.php(173): require('/home3/mikedean...')

#4 /home3/mikedean/public_html/includes/templates/norts/common/tpl_main_page.php(128): require('/home3/mikedean...')

#5 /home3/mikedean/public_html/index.php(97): require('/home3/mikedean...')

#6 {main}
thrown in /home3/mikedean/public_html/includes/modules/shipping/ozpost.php on line 347

8 Jun 2010, 12:15 PM
#816
gam avatar

gam

Zen Follower

Join Date:
Aug 2007
Posts:
116
Plugin Contributions:
0

Re: ozpost shipping module

Hi Rod

An FYI for you and others. I've finally narrowed it down and have transit days displayed beyond 'quoting' shipping' i.e., displayed in subsequent checkout pages, order history and order confirmation emails.

Example - BEFORE:

Your Total
Sub-Total: $xx.xx
Australia Post (500gm Prepaid Satchel Express): $xx.xx
Goods & Services Tax: $xx.xx
Total: $xx.xx

Example - AFTER:

Your Total
Sub-Total: $xx.xx
Australia Post (500gm Prepaid Satchel Express* - 1 day(s) est. transit*): $xx.xx
Goods & Services Tax: $xx.xx
Total: $xx.xx

Changed code as follows:

          // store it //
// GAM hack - 8/6/2010 - include estimated delivery days in shipping_method (of DB) for email, order history, etc)
//      $methods[] = array('id' => "$quote->id",  'title' => "$carrier $description $estimateddays $details", 'cost' => ($cost / $aus_rate),'txtCarrier' => $txtCarrier,'txtMethod' => "$quote->description");
      $methods[] = array('id' => "$quote->id",  'title' => "$carrier $description $estimateddays $details", 'cost' => ($cost / $aus_rate),'txtCarrier' => $txtCarrier,'txtMethod' => "$quote->description"." - ".$quote->days." day(s) est. transit");

Result:
Australia Post (500gm Prepaid Satchel Express - 1 day(s) est. transit)

Result is stored in shipping_method of zen_orders which is what is used to populate the post-checkout order information.

Blunt hack that's working for me. :) There are more elegant ways but I don't have the PHP skills to do any better at the moment.

Cheers
Greig

8 Jun 2010, 12:51 PM
#817
rodg avatar

rodg

Deceased

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

Re: ozpost shipping module

Mike_Dean:

I've turned on store pickup .. do you want me to leave the DEBUG on ...

I guess not now that you've turned it off (Sorry about the delay, took a tea break).

Anyway, with store pickup turned on I'm now not getting any ozpost quotes. Furthermore, the client is no longer sending the version information.. in other words, it appears to have gone backwards a step, and I can't see how enabling another module would cause that. Is this also repeatable? (ie, disable local pickup and ozpost will work again, albeing not correctly). Could be another clue if it is.

Cheers
Rod

8 Jun 2010, 12:54 PM
#818
rodg avatar

rodg

Deceased

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

Re: ozpost shipping module

Mike_Dean:

Hmmmmm....

My Comodo SSL logo is not showing on my site anymore..

Would that be causing an issue ???

(no.. not that the logo is missing.. just the SSL part of it..)

Maybe. Your guesses are probably better than mine at this stage..

Cheers
Rod

8 Jun 2010, 12:57 PM
#819
mike_dean avatar

mike_dean

Totally Zenned

Join Date:
Feb 2006
Location:
Central Coast, NSW, Australia
Posts:
531
Plugin Contributions:
0

Re: ozpost shipping module

RodG:

I guess not now that you've turned it off (Sorry about the delay, took a tea break).

Anyway, with store pickup turned on I'm now not getting any ozpost quotes. Furthermore, the client is no longer sending the version information.. in other words, it appears to have gone backwards a step, and I can't see how enabling another module would cause that. Is this also repeatable? (ie, disable local pickup and ozpost will work again, albeing not correctly). Could be another clue if it is.

Cheers
Rod

Sorry Rod..

I could tell from my admin that I was getting other visitors trying to checkout (who have since abandoned) so I reverted back to a previously saved ozpost file (prior to the changes you suggested) so that at least it throws up the default error rate (Flat Rate)

Do you need my to put the modded file back in place and debug on again ??

Thanks,
Mike

8 Jun 2010, 1:13 PM
#820
rodg avatar

rodg

Deceased

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

Re: ozpost shipping module

Mike_Dean:

Here is a log from when (I assume) nothing was returned, as opposed to retuning a cached page..

Assuming these were caused by the error we are looking for (and not some other error) let's disseminate the important bits...

Mike_Dean:

[Entity: line 1: parser error : Start tag expected, '<' not found

The first character in an XML response should always be a "<" and we are being told that this wasn't found.

Mike_Dean:

Stack trace:
#0 /home3/mikedean/public_html/includes/modules/shipping/ozpost.php(347): SimpleXMLElement->__construct('3b??<?xml versi...')

This is a 'dump' of what the XML response apparently contained... Note the "3b??" that comes immediately before the "<" ? These characters (or this representation of) do not belong, and as such the 'parser' is failing with an error.

So, the question now is where the fluck is this coming from. It isn't being sent by the server (well, not by anything that I'm aware of, and if it were the server sending, then why to your client and no one elses? (At least not identified).

.... Aha!! I've seen something like this before .... V1.0.2 ... ENABLE cURL !!!!

Cheers
Rod