我的问题是如何手动计算包装的总重量。 我正在使用Magento 184.108.40.206 CE。 提前致谢！
i have the following problem: when I try to edit an order in Magento, on the initial loading of the edit page,
Mage_Shipping_Model_Rate_Request::getPackageWeight() returns zero.This behaviour occurs only with configurable products.
My question is how can i calculate manually the total weight of the package. I am using Magento 220.127.116.11 CE. Thanks in advance!
The weight of quote items is calculated by the shipping total model
Mage_Sales_Model_Quote_Address_Total_Shipping in the
After the item weight is collected, the total model then calls
$address->collectShippingRates(); to trigger the shipping rate calculation.
I suggest you look at the loop in the total model mentioned above, where it iterates over each item, to see why a configurable doesn't get a weight value assigned.
The only thing I can think of without further access is that maybe you have a sales rule in place that sets
free_shipping on the quote item.
Before you wonder, the
weight_type attribute is only used for
bundled products to indicate if the total weight should be fixed or calculated dynamically from the associated products.