Forums / Addon Shipping Modules / ozpost shipping module

ozpost shipping module

Views: 403,766

Results 2,181 to 2,200 of 2,251
16 Apr 2016, 6:54 AM
#2181
rodg avatar

rodg

Deceased

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

ozpost shipping module

Bruce1952:

Hi all,

I am running zencart 1.54 and would like to know if the ozpost module makes any changes to the orders.php file at all.

Any help is appreciated.

No. It doesn't.

Cheers
RodG

NOTE: We are sorry that Rod is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

Ozpost - The Ultimate Shipping module for Australian Merchants. Click these links for its Homepage, or Download from Zen-Cart.com.

28 Apr 2016, 11:35 PM
#2182
bruce1952 avatar

bruce1952

Totally Zenned

Join Date:
Aug 2008
Location:
Sydney Australia
Posts:
828
Plugin Contributions:
0

Re: ozpost shipping module

Hi Rod,

I am running zencart 1.54 with ozpost version 4.05 and having issues with the weight showing incorrect post satchels etc. Here is an example below.

Item number: 522160201 and weight is 0.02 and quantity by 4 which adds to 0.08

The table rate shows as 0.08 Kilo for the amount of $8.50 (which is for postcode 4000) but with the ozpost module it shows the weight as 0.088kg and the pricing for the satchels appears to be incorrect. I have attached a word file so you can look at what shows on screen to the customer.

I have set in admin panel the 5% discount option for the satchels and for the handling fee it is set at $2.50 but the amounts do not appear to be changing when adjustments are made.

Any help on what to look for would be appreciated.

Outdoorking
Live Site https://www.outdoorking.com.au

29 Apr 2016, 12:43 AM
#2183
rodg avatar

rodg

Deceased

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

Re: ozpost shipping module

Bruce1952:

Hi Rod,
I am running zencart 1.54 with ozpost version 4.05 and having issues with the weight showing incorrect post satchels etc. Here is an example below.
Any help on what to look for would be appreciated.

Check your currency / exchange rate / tax settings. I've just verified that the ozpost servers are providing correct prices for the satchels, so that means that the results you are seeing have be subjected to modification after the fact, and it is only the currency and/or tax settings that will do that

As for changes having no apparent effect, this is generally a caching issue.

Cheers
RodG

NOTE: We are sorry that Rod is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

Ozpost - The Ultimate Shipping module for Australian Merchants. Click these links for its Homepage, or Download from Zen-Cart.com.

29 Apr 2016, 1:51 AM
#2184
rodg avatar

rodg

Deceased

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

Re: ozpost shipping module

Bruce1952:

I have set in admin panel the 5% discount option for the satchels and for the handling fee it is set at $2.50 but the amounts do not appear to be changing when adjustments are made.

With these settings, a 3kg Satchel will be quoted as
Original price $13.40
5% Discounted price $12.73
+handling $2.50
Quoted price = $15.23

This is exactly what your site is quoting for Item number: 522160201

Your .pdf is unreadable so I don't know if this is the same figure that you were seeing or not.

Cheers
RodG

NOTE: We are sorry that Rod is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

Ozpost - The Ultimate Shipping module for Australian Merchants. Click these links for its Homepage, or Download from Zen-Cart.com.

29 Apr 2016, 5:04 AM
#2185
bruce1952 avatar

bruce1952

Totally Zenned

Join Date:
Aug 2008
Location:
Sydney Australia
Posts:
828
Plugin Contributions:
0

Re: ozpost shipping module

Rod,

What happens with the 500gram satchel which it should be quoting. I have checked the currency settings which are Australian Dollar by default and the Tax settings are set fort GST at 10%.

Note that the parcel is only 0.08 kilo and a 500gr satchel is not shown on the price quotation. I have every option ticked in the Australia Post except for Letters (and small parcels@letter rates).

Can you advise why the 500gr satchel does not show on the options or am I not seeing it correctly in the list.

Outdoorking
Live Site https://www.outdoorking.com.au

29 Apr 2016, 6:29 AM
#2186
rodg avatar

rodg

Deceased

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

Re: ozpost shipping module

Bruce1952:

Rod,

What happens with the 500gram satchel which it should be quoting.

The dimensions assigned to the product indicate that it won't fit into the 500g satchel, so it isn't being shown as a valid method.

Cheers
Rod

ps. When checking product dimensions against the specified satchel dimensions please keep in mind that you are comparing 3D with 2D, the effective length and width of the satchel gets reduced as the product height increases.
In your example, the product width is (apparently) 250mm, and the 500gm satchel is only 220mm

NOTE: We are sorry that Rod is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

Ozpost - The Ultimate Shipping module for Australian Merchants. Click these links for its Homepage, or Download from Zen-Cart.com.

10 Dec 2016, 7:15 AM
#2187
ontoit avatar

ontoit

New Zenner

Join Date:
Jun 2016
Location:
Australia
Posts:
11
Plugin Contributions:
0

Re: ozpost shipping module

This looks like am impressive module. Install was a breeze, however no quotes are being returned due to "Missing Store Postcode." This is set in the module itself correctly and Admin -> Shipping / Packaging - Amy ideas what's happening?

SimpleXMLElement Object
(
[quote] => SimpleXMLElement Object
(
[id] => Error
[carrier] => OzPost
[description] => Invalid input Data [: Missing Store Postcode: ]
[cost] => 0.00
[days] => -1
)

[information] => SimpleXMLElement Object
    (
        [servername] => svr1.ozpost.net
        [serverIP] => 192.254.73.171
        [serververs] => 06-DEC-2016
        [timestamp] => Sat Dec 10, 2016 17:40 (SA Server Time)
        [requesttime] => 17:10 (QLD Store Time)
        [postdate] => N/A
        [frompostcode] => 4570
        [fromsuburb] => GYMPIE
        [destpostcode] => 4570
        [destsuburb] => WIDGEE
        [origstate] => QLD
        [calculated_parcel_weight_info] => 0kg (1.495kg cubic weight)
        [calculated_parcel_weight_kg] => 0
        [calculated_parcel_dims_cm] => 25.2 x 23.2 x 11.2 cm 
        [insuredvalue] => 999.00
        [expires] => 0
    )
10 Dec 2016, 8:42 AM
#2188
rodg avatar

rodg

Deceased

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

Re: ozpost shipping module

ontoit:

This looks like am impressive module. Install was a breeze, however no quotes are being returned due to "Missing Store Postcode." This is set in the module itself correctly and Admin -> Shipping / Packaging - Amy ideas what's happening?
[description] => Invalid input Data [: Missing Store Postcode: ]

There are two postcode settings. One for the Store postcode (postal code), the other for the 'Shipping From' postcode.

You have (apparently) set one, but not the other.

The 'Shipping from' postcode can also be set in the ozpost module itself. The store postcode can only be set under the shipping/packaging options.

For many people the same postcode will be used. For others, their store may be in one location, but they ship from a different location, which is why the apparent duplication.

Cheers
RodG

NOTE: We are sorry that Rod is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

Ozpost - The Ultimate Shipping module for Australian Merchants. Click these links for its Homepage, or Download from Zen-Cart.com.

10 Dec 2016, 10:14 PM
#2189
ontoit avatar

ontoit

New Zenner

Join Date:
Jun 2016
Location:
Australia
Posts:
11
Plugin Contributions:
0

Re: ozpost shipping module

Hi Rod, thanks for the reply. I have made sure the settings are applied in the Ozpost module, and in Admin -> Configuration -> Shipping / Packaging however the error still persists:

[id] => Error
[carrier] => OzPost
[description] => Invalid input Data [: Missing Store Postcode: ]

Anywhere else to look for this setting? Or is it possible to hard code it?

Thanks

K

11 Dec 2016, 12:39 AM
#2190
rodg avatar

rodg

Deceased

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

Re: ozpost shipping module

ontoit:

Hi Rod, thanks for the reply. I have made sure the settings are applied in the Ozpost module, and in Admin -> Configuration -> Shipping / Packaging however the error still persists:

[id] => Error
[carrier] => OzPost
[description] => Invalid input Data [: Missing Store Postcode: ]

Anywhere else to look for this setting? Or is it possible to hard code it?

Thanks

K

This has me beat. Well, I know what the problem is, but I've no idea why.

This 1st screenshot is what you should be seeing.

Attachment 16832

This second screenshot is a copy of what you sent me in email
Attachment 16833

Note how yours is missing the entry for "Postal Code"? This entry is one of Zencarts own data fields.

The Shipping from Postcode and Shipping From Suburb are added by the Ozpost installer (and are actually the same fields that are found in the ozpost settings. IOW, if you change these on this (shipping/packaging) screen you will find they will have also changed in the ozpost settings screen, and vice verci.

So, the question is, how/why are you missing the ZENCART Postal Code setting? I've just checked the zencart sql install files for V1.5.5 and noted that this hasn't changed from any of the previous versions (included the v1.5.1 which you stated you were using), so there are only two possibility that I can think of. You either had a bad install of Zencart - which is quite unlikely, or you, or someone else has gone into the database itself and deleted the entry.

Although I can't explain how/why you are missing the entry, you can re-add it by running the following SQL command (which I've copied from the zencart install .sql)

INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Postal Code', 'SHIPPING_ORIGIN_ZIP', 'NONE', 'Enter the Postal Code (ZIP) of the Store to be used in shipping quotes. NOTE: For USA zip codes, only use your 5 digit zip code.', '7', '2', now());

Note the 'key' value here is 'SHIPPING_ORIGIN_ZIP'. The ozpost entry has a key value of 'MODULE_SHIPPING_OZPOST_ORIGIN_ZIP'

If you have an explanation for this missing entry, I'd love to know what it is.

Cheers
RodG

NOTE: We are sorry that Rod is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

Ozpost - The Ultimate Shipping module for Australian Merchants. Click these links for its Homepage, or Download from Zen-Cart.com.

23 Feb 2017, 12:47 PM
#2191
vandiermen avatar

vandiermen

Totally Zenned

Join Date:
Feb 2007
Posts:
518
Plugin Contributions:
1

Re: ozpost shipping module

Solar camping australia would like you to know that:

Using iPhone 7 plus Safari

Suburb list does not load at all. Defaults to first suburb for that post code alphabetically.

You can manually type in the suburb but you can literally type in anything and the quote will not change. See attachment I have typed in 'xyz' as suburb.

http://www.solarcampingaustralia.com.au/myfiles/1.jpg
http://www.solarcampingaustralia.com.au/myfiles/2.jpg

During checkout the correct suburb is used, just occurring on shipping calculator.

24 Feb 2017, 6:13 AM
#2192
rodg avatar

rodg

Deceased

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

Re: ozpost shipping module

vandiermen:

Solar camping australia would like you to know that:

Using iPhone 7 plus Safari

Suburb list does not load at all.

I have no way of testing this, but I suspect that it is possibly security related (The module uses javascript and data from an external server).

vandiermen:

Defaults to first suburb for that post code alphabetically. .

This generally isn't a problem. The suburb names are only used by the courier companies (not Australia Post), and the quotes are generally the same, or at least very close) to any other suburb within the same postcode.

ZenCart is actually the only eCommerce system that has the suburb selection function - All of the other supported eCommerce systems only get a State/Postcode option (IOW, if the list is missing, then you are getting the same as all ozpost users for all other supported systems. It generally isn't a big deal.

Furthermore, not all Zenners even get the suburb selection option regardless of device or browser - It depends a lot on what template/theme they are using and how much the tpl_modules_shipping.php file differs from the zencart default (if they differ too much, the ozpost installer can't 'patch' the file to change the 'State' selector to the 'Suburb' selector.

vandiermen:

You can manually type in the suburb but you can literally type in anything and the quote will not change. See attachment I have typed in 'xyz' as suburb.

The 'changing to anything' is the problem - What you change it to will only stick/work if you change it to a valid suburb name for the given postcode.

Example:

Postcode 4350 will default to 'Athol' (being the 1st in the list of possible suburb names).

Changing 'Athol' to 'xyz' won't 'take' because there isn't a suburb called 'xyz' and if the ozpost servers attempt to quote for this non existent suburb the couriers API's will generate an error response, so a pre-check is made to avoid the errors, and the quote is again made using the 1st name in the list of possibilities.

Changing it to 'Glenvale' or 'Mount Lofty' will work, because they are both valid suburb names for the 4350 postcode (however changing to "Mnt Lofty" won't work, because "mnt" isn't in the list. (In fact it is this kind of variant Mnt vs Mt vs Mount) that prompted me to create the code to produce a list of suburbs to select from in the 1st place).
FYI, the names are not case sensitive, Glenvale, GLENVALE & glenvale will all work fine.

vandiermen:

During checkout the correct suburb is used, just occurring on shipping calculator.

During checkout, the customers account defined suburb name is used (it is also used in the shipping calculator if the customer is logged into the store). The only time the '1st in the list' is used is where no suburb name is provided - namely, with guest user.

Cheers
Rod.

ps. I replied to Kirsty's email about this yesterday - along with some additional information as to what I can do if the '1st in the list' suburb name actually does cause an issue (Basically, I can create a server-side override so that an alternative suburb name is used instead).

NOTE: We are sorry that Rod is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

Ozpost - The Ultimate Shipping module for Australian Merchants. Click these links for its Homepage, or Download from Zen-Cart.com.

24 Apr 2017, 4:04 AM
#2193
stecrox avatar

stecrox

New Zenner

Join Date:
Jan 2008
Location:
Perth. Australia
Posts:
64
Plugin Contributions:
0

Re: ozpost shipping module

I trust this makes sense.
When trying to get a shipping rate for multiple packs I get the following. (These are correct measurments)
Parcel Created by svr1+ On Mon Apr 24, 2017 13:52 (Server Time)
Number Parcels : 5
Dimensions: 44 x 32 x 30 cm
Weight :90kg = 5 * 18kg
Parcel Value : $480

====== Parcel Build (NoPack) ======
Item 1, Qty 1
Item Value $96
Item Weight 18kg
Item Dimensions 44 x 32 x 30 (cm)
----------------------------------
Items in Parcel :5
Parcel Weight 18kg
Parcel Dimensions:44 x 32 x 30 (cm)
Parcel Contents Value $480

with the following prices offered.

Transdirect 5x Couriers Please $108.25
Smart Send 5x Fastway : National Road $147.75
Transdirect 5x Fastway $155.25
Transdirect 5x TNT Road Express $195.00
Transdirect 5x Allied Express $254.25

If I goto these websites and enter the prices directly I get a much cheaper rate on them all.
Are you able to advise?
The website is https://www.jarsbottlesdirect.com.au
Thanks

Stephen

Stephen
Jars Bottles Direct Trading as SS Croxson Enterprises Pty Ltd
http://www.jarsbottlesdirect.com.au

24 Apr 2017, 5:53 AM
#2194
rodg avatar

rodg

Deceased

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

Re: ozpost shipping module

stecrox:

I trust this makes sense.
When trying to get a shipping rate for multiple packs I get the following. (These are correct measurments)
Parcel Created by svr1+ On Mon Apr 24, 2017 13:52 (Server Time)
Number Parcels : 5
Dimensions: 44 x 32 x 30 cm
Weight :90kg = 5 * 18kg
Parcel Value : $480

====== Parcel Build (NoPack) ======
Item 1, Qty 1
Item Value $96
Item Weight 18kg
Item Dimensions 44 x 32 x 30 (cm)
----------------------------------
Items in Parcel :5
Parcel Weight 18kg
Parcel Dimensions:44 x 32 x 30 (cm)
Parcel Contents Value $480

with the following prices offered.

Transdirect 5x Couriers Please $108.25
Smart Send 5x Fastway : National Road $147.75
Transdirect 5x Fastway $155.25
Transdirect 5x TNT Road Express $195.00
Transdirect 5x Allied Express $254.25

If I goto these websites and enter the prices directly I get a much cheaper rate on them all.
Are you able to advise?
The website is www.jarsbottlesdirect.com.au
Thanks

Stephen

What you have done here is to set up your own 'packing' rules (very few people ever need to do that) and I have no way of knowing if these are actually correct to suit your products, your needs, or even whether the calculations create parcels that are physically possible (or not).

As for the price discrepancy it probably would have helped if you could have provided those figures and the destination postcode(s) too.

So to help solve the mystery, lets concentrate on just one courier and method. TransDirect/CouriersPlease is as good as any.

On their website, I opted to use
pickup = 5000,Adelaide/commercial
destination = 2000,Sydney/residential
1 carton 18kg 44x32x30cm

Quote was $14.61

5 (same data) cartons was quoted @63.96

This itself is going to cause a discrepancy with the ozpost results, because 5 x 14.61 = 73.05. Perhaps this is the problem you are experiencing? If so, then sorry there is nothing I can do about that, ozpost isn't/wasn't designed for multiple parcels in the manner that you are using it (there are too many potential problems)

You should be getting (near) identical prices from both ozpost and the carriers website for single item prices though (with all else being equal) simply due to that fact that ultimately, the same servers are being used. I have just confirmed that ozpost is quoting $14.65 this same product/destination (ozpost rounds up to nearest 5cents)

I'm guessing that my figures are lower than yours (by a lot) because of the origin/destination suburbs, but I'm not a very good guesser, so perhaps something else it at play here.

Over to you....

Cheers
RodG

NOTE: We are sorry that Rod is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

Ozpost - The Ultimate Shipping module for Australian Merchants. Click these links for its Homepage, or Download from Zen-Cart.com.

6 Jun 2017, 10:39 AM
#2195
frank18 avatar

frank18

Deceased

Join Date:
Nov 2007
Location:
Sunny Coast, Australia
Posts:
3,427
Plugin Contributions:
2

Re: ozpost shipping module

For anyone interested, the Ozpost shipping module works fine with lat9's One-Page Checkout.

See https://www.zen-cart.com/showthread.php?220781-One-Page-Checkout-Support-Thread&p=1330634#post1330634

NOTE: We are sorry that Frank is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

29 Aug 2017, 10:45 PM
#2196
foster660 avatar

foster660

New Zenner

Join Date:
Aug 2017
Location:
Wandong
Posts:
19
Plugin Contributions:
0

Re: ozpost shipping module

G'day all,
I'm setting up a new zencart store (ver 1.5.5) after my webstore being down for a long time, and I have gone straight back to the OzPost shipping module (ver 4.2.4) because it works spot-on, but I've run into a problem...

If I sell 'Item A', with a size and weight that will fit into a 125gm large letter (I use pb1 bags from Australia Post for small stuff), everything works well and calculates out correctly. In the real world, all of my bags go out with a signature on delivery sticker, but there's no option to specify a signature sticker.
With debug enabled, the only signature options on 'letters' are for express, registered, etc...
If I trundle over to the AP postage calculator site, there is also no option to add a signature on delivery to standard letters either, so my guess is that the module is working correctly, but SoD is not part of AP's returned string (even though I do it every day when I post goods out).

Is there a way to add signature on delivery to 'standard letters' in the module and have it show during checkout as a signature cost? (I know I can add it as a handling charge, but I prefer to show the breakdown as "including handling charge: $xxx & signature on delivery $yyy".)
For handling charge, I added a some maths in PHP to calculate a % value of the parcel weight, so I try and treat it as a different item.

Hope all this makes sense!

30 Aug 2017, 7:13 AM
#2197
rodg avatar

rodg

Deceased

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

Re: ozpost shipping module

Foster660:

G'day all,
I'm setting up a new zencart store (ver 1.5.5) after my webstore being down for a long time, and I have gone straight back to the OzPost shipping module (ver 4.2.4) because it works spot-on, but I've run into a problem...

If I sell 'Item A', with a size and weight that will fit into a 125gm large letter (I use pb1 bags from Australia Post for small stuff), everything works well and calculates out correctly. In the real world, all of my bags go out with a signature on delivery sticker, but there's no option to specify a signature sticker.
With debug enabled, the only signature options on 'letters' are for express, registered, etc...
If I trundle over to the AP postage calculator site, there is also no option to add a signature on delivery to standard letters either, so my guess is that the module is working correctly, but SoD is not part of AP's returned string (even though I do it every day when I post goods out).

Is there a way to add signature on delivery to 'standard letters' in the module and have it show during checkout as a signature cost? (I know I can add it as a handling charge, but I prefer to show the breakdown as "including handling charge: $xxx & signature on delivery $yyy".)
For handling charge, I added a some maths in PHP to calculate a % value of the parcel weight, so I try and treat it as a different item.

Hope all this makes sense!

  1. Yes, it makes sense
  2. I didn't even know there was such a thing as a signature sticker. I'm guessing this would be similar to the registered post stickers? (Not that it is really relevant)
  3. I don't know if you are correct about the AP's returned string or not. Ozpost uses its own data tables.
  4. I didn't see any need/reason to have an option for SoD for regular letters because the registered letters option is functionally equivalent (isn't it?)
  5. I'd feel a little uncomfortable adding a SoD option to standard letters when the AP website itself doesn't show this as an option
  6. Adding it as an option to the client module would be a rather difficult task because each method has its own uniqueID that needs a matching ID within the main processing loop and since these ID's are generated by the ozpost servers it isn't possible to just wedge a new one in.

.... However..... how do you feel about replacing the 'priority' option with the SoD option?
Change

case "SLETp"; case "LL1p";case "LL2p";case "LL3p";
                       if (in_array("Aust Priority", $this->allowed_methods)) {
                           $handlingFee = MODULE_SHIPPING_OZPOST_LETP_HANDLING;
                       }
                       break;


                   case "SLETpi"; case "LL1pi"; case "LL2pi";case "LL3pi";
                       if (in_array("Aust Priority Insured", $this->allowed_methods)) {
                           $handlingFee = MODULE_SHIPPING_OZPOST_LETP_HANDLING + MODULE_SHIPPING_OZPOST_RI_HANDLING;
                       }
                       break;

To

  case "SLETp"; case "LL1p";case "LL2p";case "LL3p";
                        if (in_array("Aust Priority", $this->allowed_methods)) {

$quote->cost =  $quote->cost - 0.50 + 2.95 ; 
$quote->otherfeeIncl = 2.95 ;
$quote->otherfeeName = "SIG Fee" ; 
$quote->description = "Letter + Sig" ; 


                            $handlingFee = MODULE_SHIPPING_OZPOST_LETP_HANDLING;
                        }
                        break;


                    case "SLETpi"; case "LL1pi"; case "LL2pi";case "LL3pi";
                        if (in_array("Aust Priority Insured", $this->allowed_methods)) {

$quote->cost =  $quote->cost - 0.50 + 2.95 ; 
$quote->otherfeeIncl = 2.95 ;
$quote->otherfeeName = "SIG Fee" ; 
$quote->description = "Letter + Sig" ;  


                            $handlingFee = MODULE_SHIPPING_OZPOST_LETP_HANDLING + MODULE_SHIPPING_OZPOST_RI_HANDLING;
                        }
                        break;

The reason this will work is because with any standard letter quote is a priority quote - which is always going to be 50cents more than the standard rate - so what we are doing is taking the quote cost, subtracting this 50cents and replacing it with the $2.95 signature fee.

Cheers
Rod

NOTE: We are sorry that Rod is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

Ozpost - The Ultimate Shipping module for Australian Merchants. Click these links for its Homepage, or Download from Zen-Cart.com.

30 Aug 2017, 10:49 PM
#2198
foster660 avatar

foster660

New Zenner

Join Date:
Aug 2017
Location:
Wandong
Posts:
19
Plugin Contributions:
0

Re: ozpost shipping module

That's fantastic Rod, thanks very much!
That gave me heaps of clues to work on for what I'm trying to achieve. I wish I'd known about the 'otherfeeIncl' and 'otherfeeName' variables a week ago!
What you have come up with is basically what I've been working around without much success, but now I've seen your mods, I managed to get exactly what I wanted in 5 minutes this morning.

Here's my mods with comments that might help others if they're trying to do the same as me. It might not be recommended (or good coding skills), but it seems to work for what I'm doing...

// Letters // 
                    case "SLET"; case "LL1";case "LL2";case "LL3";
                        if (in_array("Aust Standard", $this->allowed_methods)) {
							//echo "Description: $quote->description  - Cost: $quote->cost  - Other Fee Included: $quote->otherfeeIncl  - Other Fee Name: $quote->otherfeeName"; //<-- Echo to the screen for debugging
							$quote->cost =  $quote->cost - $quote->cost + 2.95 ; //<-- Take off the value of the original postage cost and add the SoD value
							$quote->otherfeeIncl = 2.95 ; //<-- Assign the 'other fees' value
							$quote->otherfeeName = "Signature" ; //<-- Assign the 'other fees' reason
							$quote->description = $quote->description . " + Signature"; //<-- Add 'Signature' to the description
                            $handlingFee = MODULE_SHIPPING_OZPOST_LET_HANDLING; // + (($parcelWeight/1000)*3.5); // <-- Add handling based on total parcle weight if required
                        }
                        break;

The idea is to take the standard 'Large Letter', subtract the actual postage cost (I send by free postage when I use padded bags), then add the static value of the Signature.
The comments are explain it pretty well and are pretty much what you put here as an example, but on large letters instead.
Handling fee has code to add a variable value dependent on weight but I don't use it here (that's for the bigger items in parcels that will take bubble wrap and tape).

SoD stickers are similar to registered post stickers, but they are a little cheaper so I go with them and the registered letters / SoD is functionally equivalent, but it's a more expensive option.

Again, my thanks and you've got a great module here (congratulations on figuring out the minefield that AP has for postal rates... I tried it myself and it's a complete mystery!)

John

31 Aug 2017, 7:05 AM
#2199
rodg avatar

rodg

Deceased

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

Re: ozpost shipping module

Foster660:

That's fantastic Rod, thanks very much!
That gave me heaps of clues to work on for what I'm trying to achieve. I wish I'd known about the 'otherfeeIncl' and 'otherfeeName' variables a week ago!

FWIW, those variables/values aren't used for anything (other than display purposes). They are defined by the ozpost server, but as can be seen, they can easily be overridden.

Foster660:

What you have come up with is basically what I've been working around without much success, but now I've seen your mods, I managed to get exactly what I wanted in 5 minutes this morning.

Here's my mods with comments that might help others if they're trying to do the same as me. It might not be recommended (or good coding skills), but it seems to work for what I'm doing...

// Letters //
case "SLET"; case "LL1";case "LL2";case "LL3";
if (in_array("Aust Standard", $this->allowed_methods)) {
//echo "Description: $quote->description - Cost: $quote->cost - Other Fee Included: $quote->otherfeeIncl - Other Fee Name: $quote->otherfeeName"; //<-- Echo to the screen for debugging
$quote->cost = $quote->cost - $quote->cost + 2.95 ; //<-- Take off the value of the original postage cost and add the SoD value
$quote->otherfeeIncl = 2.95 ; //<-- Assign the 'other fees' value
$quote->otherfeeName = "Signature" ; //<-- Assign the 'other fees' reason
$quote->description = $quote->description . " + Signature"; //<-- Add 'Signature' to the description
$handlingFee = MODULE_SHIPPING_OZPOST_LET_HANDLING; // + (($parcelWeight/1000)*3.5); // <-- Add handling based on total parcle weight if required
}
break;

> 
> The idea is to take the standard 'Large Letter', subtract the actual postage cost (I send by free postage when I use padded bags), then add the static value of the Signature.
> The comments are explain it pretty well and are pretty much what you put here as an example, but on large letters instead.

The reason I opted to use the priority rather than standard letters was because this gives to ability to provide a standard letter option plus a standard letter + sig option.  By making the change as per your example the options will now be standard letter + sig, plus the priority letter option.   Matter of preference really. 

Also,  "$quote->cost =  $quote->cost - $quote->cost + 2.95 ; //<-- Take off the value of the original postage cost and add the SoD value"   could be more easily expressed as "$quote->cost = 2.95"  

You  also mentioned 'large letter' twice.  It would be amiss if I didn't tell you that these changes will also apply to 'small letters'.   If you wish to avoid this, you will need to replicate the original code between 
case "SLET"; case "LL1";case "LL2";case "LL3"; 
<snip>
break  ;

Then change 
case "SLET"; case "LL1";case "LL2";case "LL3";  
to 
case "SLET";

on the original code, and change to 
 case "LL1";case "LL2";case "LL3"; 
on the 'new' code.    IOW,  the 'SLET' (small letter) will now get different treatment than the large letters (LL) 
 
   > **Foster660:**
>
> Handling fee has code to add a variable value dependent on weight but I don't use it here (that's for the bigger items in parcels that will take bubble wrap and tape).
> 
> SoD stickers are similar to registered post stickers, but they are a little cheaper so I go with them and the registered letters / SoD is functionally equivalent, but it's a more expensive option.
> 
> Again, my thanks and you've got a great module here (congratulations on figuring out the minefield that AP has for postal rates... I tried it myself and it's a complete mystery!)
> 
> John

Thanks  :) 
Rod

NOTE: We are sorry that Rod is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

Ozpost - The Ultimate Shipping module for Australian Merchants. Click these links for its Homepage, or Download from Zen-Cart.com.

31 Aug 2017, 10:20 PM
#2200
foster660 avatar

foster660

New Zenner

Join Date:
Aug 2017
Location:
Wandong
Posts:
19
Plugin Contributions:
0

Re: ozpost shipping module

Thanks for your help here Rod, it's much appreciated... :)

Also, "$quote->cost = $quote->cost - $quote->cost + 2.95 ; //<-- Take off the value of the original postage cost and add the SoD value" could be more easily expressed as "$quote->cost = 2.95"

Doh!
Hey, but... I was under pressure... and I wasn't thinking clearly... and my brain hurt from PHP code... and... and... and...
Yeah, as soon as I read your comment, it was a forehead slapping moment! LOL

You also mentioned 'large letter' twice. It would be amiss if I didn't tell you that these changes will also apply to 'small letters'. If you wish to avoid this, you will need to replicate the original code between
<snip>
case "LL1";case "LL2";case "LL3";
on the 'new' code. IOW, the 'SLET' (small letter) will now get different treatment than the large letters (LL)

I was never really concerned with "Letters" as such so I didn't give it much thought, but I've changed it for clarity. Thanks for the tip :)
It brought up another problem with letters. I did a test with a (roughly) business card sized product - 10cm x 5cm x .03cm which the server returned -

====== Parcel Build ======
Item 1, Qty 1
Item Value $0
Item Weight 0.001kg
Product#1 had no height using 250mm
Item Dimensions 25 x 10 x 5 (cm)

... which defaults to a parcel size... if I enter a height of 0.1cm, it calculates correctly for letters, so I'm guessing that the server doesn't handle down to 100th sizes?
Not a biggy for me, just an observation :)
(hmmm... I just noticed "Item Value $0" above where my actual value was $0.10)

BTW (I'm probably getting picky now), in your install section of ozpost.php, where it creates the 'Tare Dimension' (and the like) for editing in the module, the code defines some text as white text on a white background, so I also did some code changes around here from "color:white" to "color:black", just to make it visible. :)

Thanks Rod

John