
Originally Posted by
Mike_Dean
Currently using 2.09 and I am about to upgrade to 2.2.2.
That's quite a jump.

Originally Posted by
Mike_Dean
I know I only need to update the 2 ozpost files,
Except for the v2.2.2 update, which has the image/icon files relocated into the /images/ folder.

Originally Posted by
Mike_Dean
but wanted to check something first.
Not sure if you recall, but I have a heavily modded ozpost file (includes/modules/shipping) that takes the Fast track text and converts it to read Registered Courier Service, such as;
if ( $quote->description == "FastWay Labels (RED)") { $quote->description = "Registered Courier Service" ; $description = "Registered Courier Service" ; }
Yes, I remember those mods.. not the exact details though..

Originally Posted by
Mike_Dean
I did do a compare and added the lines after
$carrier=" ";
I can't locate this line in V2.2.2 .. there have been about 3 upgrades since V2.0.9 (not to mention writing similar code for 4 other shopping carts).

Originally Posted by
Mike_Dean
But it did nothing in regards to modifying the text on the website, eg it would still return (from the first example), "FastWay Labels (RED)"
Clearly the code has evolved to the point where it is no longer recognisable and simple comrparisons are next to useless.

Originally Posted by
Mike_Dean
Are you able to have a check and see where I would insert the changes for them to be effective ?
Look for the line(s) in /includes/modules/shipping/ozpost.php that contain the method(s) you wish to change: For example, the Fastway 5kg satchels are handled/processed in line#578 which currently reads:
Code:
if((in_array("A2 Satchel (5Kg)", $this->allowed_methods)) && (strstr($quote->description, "A2"))) $handlingFee = MODULE_SHIPPING_OZPOST_FWS_HANDLING ;
You'll need to split this into multiple lines like:
Code:
if((in_array("A2 Satchel (5Kg)", $this->allowed_methods)) && (strstr($quote->description, "A2"))) {
$handlingFee = MODULE_SHIPPING_OZPOST_FWS_HANDLING;
}
Note how I've added the braces {} when splitting!
Now you can define your own description text by adding a line like:
Code:
if((in_array("A2 Satchel (5Kg)", $this->allowed_methods)) && (strstr($quote->description, "A2"))) {
$handlingFee = MODULE_SHIPPING_OZPOST_FWS_HANDLING;
$quote->description = "Your new description goes here" ;
}
Save the file and you're home and hosed.
This process can be repeated for any method's description. In fact if you take a look at lines #584 and #590 you'll note that this method is already used to modify the Ego and Transdirect descriptions. I *should* have emphasised the fact that these were included to serve as an example 'cos I did have it in the back of my mind when I recoded it that there was at least one person (you) that needed this 'easily' modifiable.
Let me know if you have any problems.
Cheers
Rod
Bookmarks