What is the default开发者_开发百科 product weight unit in Magento? How can I change it?
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.
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.
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!
精彩评论