Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change the unit for product weight in Magento?

What is the default product weight unit in Magento? How can I change it?

like image 519
blakcaps Avatar asked Apr 21 '11 17:04

blakcaps


3 Answers

The default weight is nothing at all. To change it, edit the weight in the backend. To change the "default", edit the shipping methods that calculate weight to use a different default.

like image 115
Joe Mastey Avatar answered Oct 18 '22 22:10

Joe Mastey


The weight unit is whatever is being used for shipping. You can sometimes control it in System > Configuration > Shipping Methods. For example UPS has a choice of Lbs or Kgs; For FedEx there doesn't seem to be a choice, I assume it is fixed as Lbs on purpose.

like image 39
clockworkgeek Avatar answered Oct 19 '22 00:10

clockworkgeek


Just to post for those struggling with FedEx shipping weight (there is no choice in the admin panel). If you want to use KG as your default weight setting (I'm based in Canada for instance and so this is preferable) you'll run into the issue that FedEx rates will be quoted using Lbs instead but with your KG value. I found a work around by editing the FedEx.php file. You can find the file in:

/app/code/core/Mage/Usa/Model/Shipping/Carrier/FedEx.php.

Find the following code around line 371:

 'RequestedPackageLineItems' => array(
                '0' => array(
                    'Weight' => array(
                        'Value' => (float)$r->getWeight(),
                        'Units' => 'LBS'
                    ),
                    'GroupPackageCount' => 1,
                )

You can change the value for 'Units' from 'LBS' for pounds to 'KG' for kilos. You'll want to edit this by making a copy of the file in (so that you don't edit core files):

app/code/local/Mage/Usa/Model/Shipping/Carrier/FedEx.php

Hope someone finds it useful!

like image 2
Adam B Avatar answered Oct 18 '22 22:10

Adam B