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.
So, how about we (yes, you and me), take a look at this particular error together:
-------------------------
Problem: Warning: Division by zero
Code: $x = round(($cube / ( $maxlength * $maxwidth)),2) ;
------------------------------------
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



