Re: ozpost shipping module - V1.0.2 problems
Quote:
Originally Posted by
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
Re: ozpost shipping module - V1.0.2 problems
Quote:
Originally Posted by
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...
Re: ozpost shipping module - V1.0.2 problems
Quote:
Originally Posted by
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)
Re: ozpost shipping module - V1.0.2 problems
Quote:
Originally Posted by
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..)
Re: ozpost shipping module - V1.0.2 problems
Quote:
Originally Posted by
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
Re: ozpost shipping module - Estimated Delivery Days
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:
Code:
// 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
Re: ozpost shipping module - V1.0.2 problems
Quote:
Originally Posted by
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
Re: ozpost shipping module - V1.0.2 problems
Quote:
Originally Posted by
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
Re: ozpost shipping module - V1.0.2 problems
Quote:
Originally Posted by
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
Re: ozpost shipping module - V1.0.2 problems
Quote:
Originally Posted by
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...
Quote:
Originally Posted by
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.
Quote:
Originally Posted by
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