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..)
Last edited by Mike_Dean; 8 Jun 2010 at 11:55 AM.
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:
Result: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");
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
Last edited by GAM; 8 Jun 2010 at 01:19 PM.
Not wishing to dampen your enthusiasm, but this hack is going to look very messy for those that retrieve TNT quotes, because TNT don't provide an estimated transit time, they provide a pretty specific date and time, eg "by 9am 10th June" or "by 4pm 9th June", etc, etc... so the 'result' will appear something like:
"TNT (Overnight Express - by 9am 10th June day(s) est. transit)"
Also, while I'm nit picking, technically "est. transit" is incorrect anyway, because the actual number of days presented here is adjusted by the number of days delay that may have been specified, this affects the total delivery time, but the time in transit remains the same.
I can appreciate that neither of these things probably really matter to you, but if I implemented it into the code I'm sure I'll have no end of people telling me how wrong it is... I'm just getting in first
Cheers
Rod
Good point, and I've just signed up for TNTLOL, I started by simply inserting ...[days]..', which I will probably revert to now, or similar, given the TNT date/time thing. It's mainly for my admin purposes anyway and whether it states [3] or [by 9am 10th June] still works for me.
Was applicable in my case.
It is an example and something to consider. I had hoped you might be interested and code something better.
If recording the quoted transit period on the order record in the database is important to someone then this is a way to do it. At the moment, once the order is confirmed that info is gone.
In my case, I email dispatch advices out for each order and state the estimated delivery date for their information, which is useful for customers to check and coordinate if their presence is required to take receipt. The last few days I've been either guessing or looking up the Australia Post site.
Cheers
Greig
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
Assuming these were caused by the error we are looking for (and not some other error) let's disseminate the important bits...
The first character in an XML response should always be a "<" and we are being told that this wasn't found.
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