jtsroberts,
I can only assume that there is something wrong with the way it is determining cart item dimensions / weights.
I think you error comes in from:
made cm the only item in Localisation --> Length Classes
made kg the only item in Localisation --> Weight Classes
Do you have mm referenced at all in your installation? as Opencart needs to know the relationship between cm -> mm otherwise the conversion for the length/width/height won't work, same goes for grams, if OpenCart doesn't have grams configured it won't be able to do the kg -> g conversion correctly.
Code: Select all
if($cartitem['length_class'] != 'mm') {
if($cartitem['width'] != 0) {
$cartitem['width'] = $this->length->convert($cartitem['width'], $cartitem['length_class'], 'mm');
}
Code: Select all
$weight = intval($this->weight->convert($this->cart->getWeight(), $this->config->get('config_weight_class'), 'g'));
If the module is sending 100 for each length that means that it is falling back to that default value, which it only does if the item returns a 0 value for the dimension.
Code: Select all
//If a dimension is missing, fall back to 100mm
if($cartitem['width'] == 0) { $cartitem['width'] = 100;}
if($cartitem['height'] == 0) { $cartitem['height'] = 100;}
if($cartitem['length'] == 0) { $cartitem['length'] = 100;}
How many items are you adding to the cart in your testing? just the single item?
I will need to try and replicate the issue on a test install, will let you know if I find anything, but in the mean time make sure you have 'g' and 'mm' referenced in your weight and length classes, and that their relationships to kg and cm is configured correctly.
A quick way to test this is to change your default measure to 'mm' and 'g' (so the auspost module doesn't need to do any conversion) and confirm that the values you set for the item are sent to DRC directly (ie. not 100 for dimensions). If they are sent correctly I would say it is how you have your weight/length classes configured that is causing the problem.
Let me know how that test goes, and if there are still problems i'll take a closer look.