Zen Follower
- Join Date:
- Aug 2007
- Posts:
- 116
- Plugin Contributions:
- 0
AustPost - improved issues.
This links works... (non-secure)
http://www.edeliver.com.au/templates/ifs/IFS_DRC_Terms.htm
Views: 6,962
Zen Follower
This links works... (non-secure)
http://www.edeliver.com.au/templates/ifs/IFS_DRC_Terms.htm
Zen Follower
I've been reading through this post and I think my questions (I hope) is a lot easier.
I've tweaked the module to work for me for large letters (I always send via padded bag size 1 or 0) so that it charges what I like to charge as the way it was set up was too expensive.
So I got it going real good from items less than 50gms to 500gms and it works real well. I just had to use a minus amount the handling fees areas.
However, with the overseas charges I can get it to work for items less than 50gms but it keeps that amount no matter how many items I add to the cart. And all the pricing for overseas letters/parcels are correct. I used the minus sign again to get it to work for items less than 50gms. But for some reason it doesn't work as well as the aussie set up does.
Any idea where else I can tweak this to get it working for me? Thank you so much. I appreciate that shipping modules are tricky. Nothing beats a human being at a post office counter with scales and measuring tape!! If only I could get one of those in my zen cart files ......
Deceased
Hi GAM,
If there is anyway I can help and if you want me to perform testing > etc, please don't hesitate to ask as the sooner I can offer online
quotes for ECI the better! :)
I'll almost certainly be emailing you a preliminary copy for testing purposes before uploading anything to the zencart site for others.
I really will get onto it ASAP, but don't hold your breath just yet 'cos I really am quite bogged down with end of year classes.
Cheers
Rod
Deceased
G'day vivaraquel,
I've been reading through this post and I think my questions (I >hope) is a lot easier.
I wish that were the case.
I've tweaked the module to work for me for large letters (I always
send via padded bag size 1 or 0) so that it charges what I like to
charge as the way it was set up was too expensive.
Curious, because all the letter rates are 'fixed' variables (ie, not calculated like the parcel quotations), so the only way it could really overcharge is if your 'large letters' are actually being quoted as parcels, which will be the 'default' unless you either change the default dimensions, or explicitly define your items with accurate dimensions (as mentioned elsewhere in this thread).
So I got it going real good from items less than 50gms to 500gms > and it works real well. I just had to use a minus amount the
handling fees areas.
In that case, you are 'correcting' the wrong thing. You should be trying to get the weights/dimensions right to classify the item(s) are large letters, not trying to compensate by introducing negative handling fees.
However, with the overseas charges I can get it to work for items
less than 50gms but it keeps that amount no matter how many
items I add to the cart.
You have something fundimentally wrong somewhere. Although I'm no expert on how the weights are actually calculated (as per the 'weights.txt' file this is not a function of the AustPost module) but I seriously doubt it'll be giving you different weights depending on country of destination ;-)
As I said, you have something fundimentally wrong somewhere, and I'd not even like to guess what or where.
Any idea where else I can tweak this to get it working for me?
Not really, but I also can't fathom what scenario would require you to use negative handling fees in order to obtain a valid quote.
Something is 'odd'.
Zen Follower
For international shipping I've gone the zone rates way so I don't have to bother with it except I don't know how to introduce insured parcels that way.
For Australian rates using your module I have set the dimensions as per the padded bag size 1 which is (rounded off) 15x23 and then allowed the maximum of 2cm for width.
When you say: "In that case, you are 'correcting' the wrong thing. You should be trying to get the weights/dimensions right to classify the item(s) are large letters, not trying to compensate by introducing negative handling fees."
I totally agree except I don't understand what I might have done wrong as I think I entered the dimensions correctly.
So I took off the dimensions I entered as I figured I probaly don't need them is the module is set up for letter rates by default. But I get this message when I go to estimate shipping
Warning: Division by zero in /home/easybead/public_html/includes/modules/shipping/austpost.php on line 166
On the cart the weight is showing up properly but not on the stimation window. What is it supposed to divide by?
Thanks.
Zen Follower
This is what I have in that line 166:
$x = round(($cube / ( $maxlength * $maxwidth)),2) ;
I have no idea if that's whats meant to be in there.
Deceased
G'day V,
For international shipping I've gone the zone rates way so I don't
have to bother with it except I don't know how to introduce
insured parcels that way.
I only support the AP module, not the zone rates module, and I've no idea how that handles insurance.
For Australian rates using your module I have set the dimensions
as per the padded bag size 1 which is (rounded off) 15x23 and
then allowed the maximum of 2cm for width.
What do you mean by "allowed a maximum of 2cm" for width?
Last time I checked the AP module didn't have any setting for maximum anything ??????
When you say: "In that case, you are 'correcting' the wrong thing.
I meant that literally, you are correcting the wrong thing.
I totally agree except I don't understand what I might have done
wrong as I think I entered the dimensions correctly.
If you had, then you'd be getting valid rates, just like the rest of us ;-)
So I took off the dimensions I entered as I figured I probaly don't
need them
How did you come to that conclusion? How is the AP module supposed to know that your parcels are small enough to be a letter?
Seriously, do you think I would have gone to all the trouble of adding dimensions to products if they weren't going to actually be used?
is the module is set up for letter rates by default.
I'm not sure if you are saying that you have set up the AP module for your store to default to letters, or whether you are implying that the distribution version is set up to use letters by default.
If the former, then you have obviously messed up somewhere - possibly by confusing the 'default' dimensions with the non existant 'maximum' dimensions?
If the latter, then I'd like to know where you got the impression that the module defaults to letter rates, because as discussed elsewhere in this thread, the defaults are set to NOT use letter rates.
But I get this message when I go to estimate shipping
Warning: Division by zero
Yeah, computers really have a hard time dividing numbers by zero. They always seem to complain about it. <g>
On the cart the weight is showing up properly but not on the
stimation window.
Err, so when did we start talking about weight issues? I thought you were having dimension issues?
Are you now telling me that you are having a problem with both the weights AND the dimensions?
What else aren't you telling me? The last time I had a discussion like this it went on for almost a week before I eventually figured out that the person involved was trying to use the AP module with an old version of zencart.
I rather not repeat that frustrating experience.
What is it supposed to divide by?
Anything other than zero ;-)
This is what I have in that line 166:
$x = round(($cube / ( $maxlength * $maxwidth)),2) ;
I guess that looks right (isolated lines of code are often meaningless).
I have no idea if that's whats meant to be in there
Unless it is something you added, or if you downloaded the module from somewhere other than zen-cart.com, then I think it is safe to assume it is supposed to be there. I really do tend to avoid writing code or adding options unless it actually does something.
Not too difficult - it only has one division operator, and it is saying:
the answer ($x) is "something" divided by the maxlength times maxwidth, then round the result to 2 decimal places.
So, we now ask ourselves, where could this 'zero' come from?
The answer should be obvious, it is either going to be the 'maxlength' or the 'maxwidth' - if either of these are zero, then the result is going to be zero (anything multiplied by zero = zero).
So, the quesion now becomes WHY are these values zero?
Alas, this is one question that I can't answer without more info. At this stage I am going to assume you are running an older version of zencart, because it is currently the only thing I can think of that will explain your multiple issues.
Cheers
Rod
Zen Follower
Ok, I uninstalled it and installed it again and chaged the dimensions from what comes up to the padded bag dimensions of 23x15cm and changed the Default Parcel Height from 2.5 to 1.99. As per the Australia Post site a parcel height above 2cm is considered a parcel and not a large letter.
It is working for 1 items. But it is multiplying the height of 1.99 when multiple items are added to the cart so that stuffs up the cost. Is there a way around this?
Thank you for your time and I appreciate you bearing with me.
Deceased
G'day V,
Ok, I uninstalled it and installed it again and chaged the dimensions > from what comes up to the padded bag dimensions of 23x15cm
and changed the Default Parcel Height from 2.5 to 1.99.
As per the Australia Post site a parcel height above 2cm is
considered a parcel and not a large letter.
Uhuh.
It is working for 1 items. But it is multiplying the height of 1.99
when multiple items are added to the cart
But isn't that to be expected? If one item is 1.99cm high then surely two of them stacked on top of each other will be 1.99 x 2 ?
so that stuffs up the cost.
No, it doesn't stuff the cost, what it is doing is accurately quoting the cost. Single item @1.99cm high is perfectly suitable for letter rates, but if you stack 2 of them together they become too large for a letter and are therefore quoted @ parcel rates.
Is there a way around this?
Sure. Simply give your products accurate dimensions, and always remember that the DEFAULT dimensions are only used when there are no dimensions explicitly defined for any given item.
IOW, for your items, if you set the dimensions to
23x15x0.2cm, the first ten items will be quoted @ single letter rate, but the 11th item will push the dimensions over the limit and will therefore be quoted at parcel rates.
If all of your products are of similar dimensions, then setting the defaults to those dimensions will save you a lot of work, however if you have any items that are of different dimensions then they will need to be explicitly defined, else they will also be quoted using the defaults.
One final note. The AP module does NOT take into account the thickness of the packaging (it has no way of knowing whether you are using padded bags, regular envelopes, or perhaps even disk mailers), so if this is likely to be an issue I suggest you over estimate the height of your items a little to avoid being caught out with a package being quoted as a letter, only to find it is a little oversize due to the packaging.
Cheers
Rod
Zen Follower
I understand about the thickness of the packaging. The items in the bag are under 2cm 90% of the time.
However, since the packaging is 23x15 I am not going to stack one item on top of the other, I am going to lay them side by side. Depending on the items (eg, bead strands) this will make the height be more than 2cm. So is there a way to make it not do that?
I appreciate you have put the time and knowledge into making this module and I am by no means saying that you've done it badly. Simply that I personally don't stack my products one on top of the other so if there's a way I can stop the module from doing it, it would work better for me personally.
And when you say give your products accurate dimensions and any items that are of different dimensions will need to be explicitly defined, I don't undertsand where I would do this. When creating a new prodcut all I can enter is its weight, qty, model and image.
Thank you again for your reply.
Zen Follower
I'll try to help Rod out here.
Somewhere in the documentation accompanying the AustPost module, it explains that is uses a 'stack' method for multiple items because the coding was a challenge that Rod wasn't willing to take on. So, regardless of an item's area, the module will always stack one item on top of the other to determine the overall height of the parcel.
Note that I was discussing this issue earlier in this thread, as I have several products that can be stuffed into a 'large letter' size envelope, and mentioned a method/workaround for this situation. I have now implemented it and after some testing I am confident that it is working well.
Regarding the specification of product dimensions. Product dimensions (Length, Width & Height) are an additional to the Zen Cart database that are installed by the AustPost module. After a 'successful' and 'complete' install of AustPost, you should see these fields towards the bottom of the edit product page from Admin|Products... These are specified individually for each product. Where a product's dimensions are not specified, AustPost will use the 'Default Parcel Dimensions' for that product. If you have small products, you'll find that the default sizes will be far larger and will determine a 'parcel' every time.
Again, refer back to my posts early in this thread (and onwards) for further details of my 'suggested' workaround.
Specifying the dimensions for each product, if you have many, is very time consuming. For this reason, amongst others, I find Easy Populate an invaluable contribution. The only problem is that Easy Populate doesn't cater for the additional product dimension fields. I had to modify the Easy Populate code to accomodate these. I've now managed to do this and have it working very successfully.
I hope this info helps you out a little and may explain why you are getting these apparent anomolies with your Australia Post shipping estimates.
Cheers
GAM
Deceased
G'day V,
However, since the packaging is 23x15 I am not going to stack one
item on top of the other, I am going to lay them side by side.
Which if you really think about it, is a rather illogical way to stack/pack flat items.
Example, suppose you were selling framed portraits that measured
500cm x 500cm x 2cm, and you sold two of them, what size parcel would you create? 1000cm x 500cm x 2cm or 500cm x 500cm x 4cm?
The only "logical" way is to stack the items by height.
Also, keep in mind that the AustPost module doesn't have any concept of the size of your packaging. All it knows about are the size of the items, and as mentioned, it stacks them by height.
IMPORTANT: Height, width and length are all 'relative' measurements, not absolute. What this means is that if you define item "A" as
20h x 10w x 30l and item "B" as
30h x 10w x 20l
The AP module will -re-orientate them as both being
10h x 20w x 30l - iow, the longest measurement is always the length, and the shortest measurement becomes the height.
And when you say give your products accurate dimensions and any > items that are of different dimensions will need to be explicitly
defined, I don't undertsand where I would do this. When creating a > new prodcut all I can enter is its weight, qty, model and image.
I see that GAM has already explained this one to you. (thanks GAM).
Cheers
Rod.
Zen Follower
Thank you Gam for your help.
I've reinstalled the files of the mod and now I am getting the extra dimension fields on the items.
I also changed the code as per your suggestions in page 2 of this thread.
Where you said:
"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. My suggestion to 'letter' people would be to specify the max letter dimensions... L36 W26 H2 (requires the .01 addition to dimensions in code above too, otherwise specify defaults as L36.01 W26.01 H2.01)"
Do I change the default parcel size in the admin>modules>shipping to L5xW5xH2 or to L36 W26 H2?
And: "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)."
Where do I do that?
Thank you for your time GAM.
Not everyone sends picture frames as I gather you probably don't. I sell beading supplies so 99% of my items are less then 5mm high. It would be illogical for me to shove them in an envelope, let them bunch up into a ball and make my customers pay more than they have to for shipping when all I have to do is pack them flat into the same envelope and save them money they can spend on more items.
Have a good night.
Zen Follower
vivaraquel:
Thank you Gam for your help.
I've reinstalled the files of the mod and now I am getting the extra dimension fields on the items.
I also changed the code as per your suggestions in page 2 of this thread.
Where you said:
"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. My suggestion to 'letter' people would be to specify the max letter dimensions... L36 W26 H2 (requires the .01 addition to dimensions in code above too, otherwise specify defaults as L36.01 W26.01 H2.01)"
Do I change the default parcel size in the admin>modules>shipping to L5xW5xH2 or to L36 W26 H2?
That paragraph is a little confusing, sorry.
You would specify the maximum allowable letter dimensions (36/26/2) if you typically have products that could fit individually into a large letter. If, like you and I, you can fit several items into an envelope, then the minimum acceptable 'DRC Server' dimensions might be preferable (5/5/2). If you have specified appropriate dimensions for all your products, then it doesn't really matter as the 'default parcel size' only comes into play where no product dimensions are specified for an ordered product.
And: "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)."
Where do I do that?
In a spreadsheet of your products or other similar method.
I start with a spreadsheet, by supplier or product type, for all new products. These spreadsheets have numerous worksheets and formulas to derive my cost and pricing as well as list the various specifications of each product, derive model numbers, names, etc. Additionally now I've included columns that take into account a typical 'pack' size for each product and then determine the number of packs that can fit in a large envelope.
For instance,
So, I can fit approx....
Lx4, Wx5, Hx1 = 20 items per large envelope. (20mm/20)x2 = 2. I specify Height for this product as 0.2cm. 2cm/0.2cm = 10... items per package as calculated by AustPost before a parcel is determined. I go with half the number for good measure. Typically my weight will determine a parcel at these quantities, but I am also not sure what to expect when thick products are mixed with many thin products, hence erring heavily on the side of caution. ;)
Lx4,Wx5,Hx3 = 60 items. (20mm/60)x2 = 0.67. Height for this product is 0.07cm. 2cm/0.07 = 28 metres (items) of cable sleeving per large envelope.
Lx2,Wx2,Hx4 = 16 items. (20mm/16)x2 = 2.5. Height for this product is 0.25cm. 2cm/0.25 = 8 fan grills per large envelope.
Thank you for your time GAM.
Not everyone sends picture frames as I gather you probably don't. I sell beading supplies so 99% of my items are less then 5mm high. It would be illogical for me to shove them in an envelope, let them bunch up into a ball and make my customers pay more than they have to for shipping when all I have to do is pack them flat into the same envelope and save them money they can spend on more items.
Have a good night.
Agreed.
I hope this helps.
Good luck,
GAM
Zen Follower
Thanks GAM.
What I meant at the beginning of my last post is that I re uploaded the module to make sure all the files uploaded correctly and now I am able to enter the item's dimension when creating a new product.
I have set the min dimesions of 5x5x2 on the shipping module until I am able to set each items diemensions. But I am still having trouble with the o'seas costs so I'll disable those and use zone rates until I can get it fixed.
Thank you, now I can have my site open again. It's been a horrible week and I appreciate you helping me out.
Have a nice day, Raquel.
Zen Follower
Hi Raquel,
No problem with the assitance. :D
You may realise this, but I thought I'd point it out just in case.
Due to the stacking method and in the absence of individually dimensioned products (<2cm), you will only get a Letter rate quote for a single item order. Any more than one item ordered will still default to Parcel rates as the 'Default Parcel Size' Height parameter is 2cm. 2 items in an order means 2x2cm i.e., 4cm height for the order, therefore 'parcel' rates.
Cheers
GAM
Zen Follower
Yep, I am aware of that.
As I was lying in bed last night I was thinking, as you do ... Rod said this in one of the posts:
"IMPORTANT: Height, width and length are all 'relative' measurements, not absolute. What this means is that if you define item "A" as
20h x 10w x 30l and item "B" as
30h x 10w x 20l
The AP module will -re-orientate them as both being
10h x 20w x 30l - iow, the longest measurement is always the length, and the shortest measurement becomes the height."
Is there a way to do it where when there are more than 1 product the module uses the biggest height as the overall height rather than stacking it, at least for my own module as I know most other sellers will need them to stack.
Just a thought, thanks.
Deceased
G'day V,
Is there a way to do it where when there are more than 1 product > the module uses the biggest height as the overall height rather
than stacking it, at least for my own module as I know most other > sellers will need them to stack.
If we do it this way we then end up with serious problems in other areas, in particular, we would rapidly exceed the allowed dimensions for the parcels length (probably not an issue with your products).
In fact this is already an issue even with the current code, because when enough items get 'stacked' the height of the parcel then becomes the length of the parcel, so it needs to be re-orientated again. When the length (ex height) exceeds the allowable length of AustPost the parcel is then 'cut in half' and the items stacked side by side, the parcel is then re-oriented again and additional items are then stacked on top of the new height (which is going to be either the old length or width).
If all of this sounds a bit confusing, try adding a product to your store that measures a nice round 100mm x 100mm x 100 mm, then proceded to 'purchase' multiple items of this object - You'll soon see from the displayed dimensions how these nice simple 'cubes' not only get 'stacked' atop each other, but also how once it reaches a certain height it'll half the height, restack them side by side, then start adding any more items to the new height.
I do appreciate that none of this is of much help to you or the products you sell, but please bear in mind that the AP module really is primarily designed to give quotes for parcels - The 'letter' options are an added afterthought, and ideally should probably be approached in an entirely different manner. For example, if you take a look at the Canada post module, they have taken a different approach entirely - Whereas the AP module takes the items and attempts to determine the size of the final parcel, the CP module defines the size of your packing boxes and attempts to fit as many items into the area or those boxes, adding boxes as required.
Needless to say, this method also has its issues and drawbacks, such as ending up with 2 boxes (same size) one of them packed to the brim, and the other with a single item and lots of air. However, I believe that this approach is probably more suitable for your requirements.
Cheers
Rod
Zen Follower
Thanks Rod, it does make sense.
I'll just keep an eye on it and see how it goes. It should be ok, I've entered dimesions for each individual item and after all my shipping charges are cheaper than most of my competitors so I shouldn't get complaints.
It may be good to have 2 AP mods, one for letters and large letters and another for parcels. I am not saying you should do this but maybe in the future it may be a better option.
Have a nice day,
Raquel.
Deceased
G'day V,
It may be good to have 2 AP mods, one for letters and large letters > and another for parcels.
We'd still have the issue of trying to determine what (and how many) store items can be added to package before it changes from a letter to a parcel.
Hmm, I just realised, the AP module uses both weight and dimensions for this, so in theory, if you set accurate weights, and set the dimensions as small as possible, eg, 1mm x 1mm x 1mm, then as long as your total weight doesn't exceed letter limits you should be able to get up to 19 items in a single 'letter' (before it reaches the 20cm width limit). The next item would push it over the limit and it'll be treated as a parcel. Depending on the weights of the items, 20 of them may be too heavy to be considered a letter anyway.
The only current problem with this is that the AP server will complain about the parcel being too small (assuming it gets that far). I posted the details on how to fix this bug earlier in this thread.
Cheers
Rod
Tell staff why this post should be reviewed.