Hi GAM,
added .01 to dims to ensure exact max accepted i.e.,
H=2cm is still a letter.
I didn't consider this accuracy nessesary, especially since the thickness of the envelope/packaging isn't taken into consideration either.
..there was something wrong with the syntax of your code
suggestion earlier,
I typed it in by hand. Probably miskeyed something.
Additionally, I have changed my 'Default Parcel Size' to L5xW5xH2 > (H2 being the most important), as the code uses the max
dimension of Item and Default. If any of the defaults are outside
the 'Letter' max dimensions, Letter size is not available.
I did it that way intentionally. The prime purpose of this module is to obtain quotes for parcels. The ability to cater for letter sized items is/was an after the fact addon. I'd rather have new users have their default postage be based on parcel rates rather than letter rates otherwise they'll be screaming at me wondering why their customers are being underquoted.
IOW, Letter are considered to be the exception rather than the rule.
However, that said, all stores are different, and obvioulsly most of your items are apparently letter sized, so it simply makes sense for you to change the defaults to suit your own needs. I don't think it wise to have this the default for all users though.
EDIT: The above (default parcel size) and below (Height)
workarounds assume that you have ACCURATE DIMENSIONS
SPECIFIED FOR ALL PRODUCTS! If not, you could be quoting
letter rates for your light but LARGE boxes ;) ]
This is exactly why having letter sized defaults (for the distribution package) is not a good idea. It would be more accurate to assume that when people first install the AP module they WON'T have accurate dimensions for their products - in fact they won't have any dimensions at all because this feature is added by the AP module.
The defaults given in the distribution package will tend to give pretty accurate results based on weights alone (which could/should exist prior to installing the AP module). If I made the defaults to be within letter sized then the 'out of the box' defaults will severely underquote.
For the stacking problem, I will use a workaround along the lines of > the following:
- Very small and 'thin' (<20mm) items that could be packed up to > 10 to a large envelope, Height specified as 2cm/8 (to be safe)
- Small and 'thin' (<20mm) items that could be packed up to 6 to a > large envelope, Height specified as 2cm/5 (to be safe)
- Medium 15-20mm items that could be packed up to 4 to a large > envelope, Height specified as 2cm/2 (being very safe).
That may work well for you, but please remember that this module is used by lots of different people with very different needs. How is your
"workaround" going to work for someone that sells kitchen sinks, taps, and stickers/decals, in various combinations?
Any solution you come up with needs to take such scenarios into consideration (assuming it is something you wish to share, rather than doing merely to fine tune things for your own situation).
Although this is less than ideal, it is much better than asking $10
for freight where it costs $1 (many of my poor young customers
will appreciate this, especially when they are only spending
$10! ;)).
On the other hand, it is far easier for a merchant to give a $9.00 refund on such a sale rather than quote $1.00 for postage (instead of $10.00) and then having to either absorb the cost, send the customer and updated invoice, or cancel the sale, all of which will turn the customer off far more than quoting the higher price in the first place.
It is for this reason the AP module always tends to err in favour of the merchant rather than the customer.
I hope this info is well received and not an unessecary burden ;)
I take all comments, criticisms and suggestions seriously and in the helpful manner they are intended. Whether I accept or reject any given suggestion is another matter. In this case I cannot conscionably implement your suggestion to change the default dimension settings in the distribution package.
As for the parcel stacking algorithm... before you get too involved in it, you ARE aware that this is something of a 'holy grail' in programming, aren't you?
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.