Quote Originally Posted by zekin View Post
When you say about max length of 40 and girth of 60, I do have some thought and I like to share with you.
Sure...

Quote Originally Posted by zekin View Post
A 30x40 satchel's max length is 40 when you are sending a sheet of paper. in reality the box is 3D,
Yes, so is a sheet of paper (3D)... and 2 sheets, 5, 10, and 500 sheets.

The 'problem' is that we need to fit a 3d object into an object with only 2 known dimensions.

Quote Originally Posted by zekin View Post
so the 40 x 30 satchel should be able to fit a box with (sum of its length and width) x 2 equals to 80, and (the sum of last side and width) x 2 equals to 60.
Errr, why are we doubling the sum of the length by width? I don't quite follow.

Girth = L x (2W + 2H)
The largest item that will fit (theoretically) is Length 40cm x Girth 60cm

Quote Originally Posted by zekin View Post
So my conclusion is that maybe we can just validate the L , W and H and forget about volume.
Consider the volume as being forgotten already.

The current code already does what you are suggesting, namely, comparing the length (which has a known limit of 40cm max). and the width/height of the actual parcel (by calculating the girth) and comparing it with the max girth that will fit into the satchel.

It isn't possible to use the absolute values for width or height, because the satchel itself is variable in that it can range anwhere between ~0 x30cm to 30x~0, with a mid value being 15x15.

Using this method, your parcel measuring 36 x 13 x 17 cm should *just* fit. Clearly this isn't the case, so which dimension do I need to adjust in order to force a pass/fail ?

You previously stated "I need to adjust by changing one side 13cm to 14cm".
Just to clarify, you need to do this to make the Satchel to *not* appear as an option? - Which means the server needs to test against lower values to force a 'fail' status.

This is entirely possible; for 2 reasons. 1. The 'worst possible length' check wasn't necesarily taken under the worst possible condition, and 2, I haven't made any allowance for 'tightness of fit' of the girth. I am quite happy to adjust any/either of these (downwards) in order to avoid false positives. All I need know is by how much and in what dimension.

Using your numbers as an example, in order to make it work for you the server will need to fail the 'isSatchel' if it tested against a girth of 59cm rather than the current 60cm?

If I do that, will the length also be an issue?

<30 seconds later>
OK, I've tweaked the girth check .. Please lemme know if your parcel succesfully fails now.

Cheers
Rod

ps. One of the aims of the ozpost module is to 'protect the merchant', so on this basis I'd rather have the module NOT show an option where it could rather than show it when it shouldn't. (is that double speak or what?)