Re: ozpost shipping module
Quote:
Originally Posted by
RodG
ozpost.php line#659
You'll need to alter both variables on this line (the $description and the $quote->description).
Take special note of the quotes and periods when editing this line. If you don't disturb the exsisting periods, and ensure you keep the quotes balanced you shouldn't have too much trouble with this edit.
Cheers
Rod
ps. Be careful, this was added to let the store admin know how parcels were calculated for. By removing this data you could be losing important information.
Thanks Rod,
This is what I ended up with, ??
Not sure if its what you intended, but it seems to be working and I end up with a description eg,
Registered Parcel (Bulk Service) or Registered Courier (Bulk Service)
I understand your point re Admin, and I may reconsider above, so thanks for the heads up..
Thanks,
Mike
Re: ozpost shipping module
Quote:
Originally Posted by
Mike_Dean
Thanks Rod,
This is what I ended up with, ??
Not sure if its what you intended, but it seems to be working and I end up with a description eg,
Registered Parcel (Bulk Service) or Registered Courier (Bulk Service)
I understand your point re Admin, and I may reconsider above, so thanks for the heads up..
Thanks,
Mike
Would help if I showed you what I edited it too !!
if ( $description == "Registered Parcel Service(x2)") { $quote->description = "Registered Parcel (Bulk Service)" ; $description = "Registered Parcel (Bulk Service)" ; }
if ( $description == "Registered Courier Service(x2)") { $quote->description = "Registered Courier (Bulk Service)" ; $description = "Registered Courier (Bulk Service)" ; }
Re: ozpost shipping module
Quote:
Originally Posted by
Mike_Dean
Would help if I showed you what I edited it too !!
if ( $description == "Registered Parcel Service(x2)") { $quote->description = "Registered Parcel (Bulk Service)" ; $description = "Registered Parcel (Bulk Service)" ; }
if ( $description == "Registered Courier Service(x2)") { $quote->description = "Registered Courier (Bulk Service)" ; $description = "Registered Courier (Bulk Service)" ; }
Line 659 currently/originally reads:
Code:
if ( MODULE_SHIPPING_OZPOST_CORE_WEIGHT == "Yes" && $shipping_num_boxes > 1 ) { $description .= "(x".$shipping_num_boxes.")"; $quote->description = $quote->description." (x".$shipping_num_boxes.")" ;}
Change like this:
Code:
if ( MODULE_SHIPPING_OZPOST_CORE_WEIGHT == "Yes" && $shipping_num_boxes > 1 ) {
$description .= "(Bulk Service)";
$quote->description = $quote->description." (Bulk Service)" ;
}
If you are lucky you should even be able to cut/paste this code snippet (I haven't tested it though).
What this code is doing is first checking that the quote consists of multiple parcels, doing nothing if not, but *appending* the '(Bulk Service)" to the existing description(s) if the conditions match.
The modified code is simpler than the original because it doesn't use any variables in the text strings (the variable being the $shipping_num_boxes.
The code that you used could never work in place of the original line because
Code:
if ( $description == "Registered Parcel Service(x2)")
would never evaluate as TRUE since the "(x2)" hasn't been set at this point.
I can see how you may have opted to add this code *after* the line I suggested be modified, and it would work, but only under the specific condition that the quote is/was for 2 parcels, no more, no less.
In order to allow for a variable number of parcels using this method will require the code to read something like
Code:
if ( $description == "Registered Parcel Service(x".$shipping_num_boxes.")")
etc, etc
This way the text to be matched is constantly kept updated with the same data that was used to create the original text string, in which case why not use and change where the text is/was created in the first place and avoid this additional check? (Rhetorical question)
Cheers
Rod
Re: ozpost shipping module
Quote:
Originally Posted by
RodG
Line 659 currently/originally reads:
Code:
if ( MODULE_SHIPPING_OZPOST_CORE_WEIGHT == "Yes" && $shipping_num_boxes > 1 ) { $description .= "(x".$shipping_num_boxes.")"; $quote->description = $quote->description." (x".$shipping_num_boxes.")" ;}
Change like this:
Code:
if ( MODULE_SHIPPING_OZPOST_CORE_WEIGHT == "Yes" && $shipping_num_boxes > 1 ) {
$description .= "(Bulk Service)";
$quote->description = $quote->description." (Bulk Service)" ;
}
If you are lucky you should even be able to cut/paste this code snippet (I haven't tested it though).
Cheers
Rod
Thanks Rod,
Modded as per your suggestion and all good.
Will keep testing on my local site before putting live.
Thanks again,
Mike
Re: ozpost shipping module
Hi, after being unable to find a suitable module or modify one to suit I am prepared to give this module a go.
I am just wondering is the server which the module relies on for the quotes ect. located in Australia?
Re: ozpost shipping module
Quote:
Originally Posted by
Ch4iS
I am just wondering is the server which the module relies on for the quotes ect. located in Australia?
I know why you are asking, but your arguments are invalid.
The primary servers are both located in the USA. The backup server is located in Adelaide.
Rod
Re: ozpost shipping module
Hi Rod
Getting 'flat rate' shipping in the last 30mins or so. Can you check please.
No changes on my end that I am aware of.
Cheers
Greig
Re: ozpost shipping module
Quote:
Originally Posted by
GAM
Hi Rod
Getting 'flat rate' shipping in the last 30mins or so. Can you check please.
No changes on my end that I am aware of.
Cheers
Greig
Further to above... Getting the following messages in OzPost Admin:
cURL communication ERROR: couldn't connect to host
Unable to connect to Ozpost server
I haven't changed anything but not sure whether this could stem from my host side?
Re: ozpost shipping module
Quote:
Originally Posted by
GAM
Further to above... Getting the following messages in OzPost Admin:
cURL communication ERROR: couldn't connect to host
Unable to connect to Ozpost server
I haven't changed anything but not sure whether this could stem from my host side?
Same has just started happening to me.. :(
Re: ozpost shipping module
Quote:
Originally Posted by
Tim Ware
Same has just started happening to me.. :(
The main server has suddenly stopped responding (reasons unknown), and for reasons also to be determined the automatic switchover to the backup server didn't take place. :censored:
I've just manually switched to the tertiary backup server and things should start working any minute now :-)
Cheers
Rod