I want to make my table rates volumetric, i.e. the weight based on width, height and depth for bulky (but not heavy) items. These attributes are setup and I can read them fine in my own Model/Flatrate.php module.
This works for the measurements that are my own attributes and weight which is a built in attribute:
if ($request->getAllItems())
{ foreach ($request->getAllItems() as $item)
Mage::log($item->getShipping_height());
However, when I try the same in Tablerate.php it does not work, even if in the core rather than my own module. I get nothing for the weight, height, length and depth. None of this works, I do get entries in the log file but no labels:
if ($request->getAllItems()) {
foreach ($request->getAllItems() as $item) {
Mage::log("Weight ".$item->getWeight."*");
Mage::log("Height ".$item->getProduct()->getShipping_height()."*");
Mage::log("Width ".$item->getShipping_width()."*");
Mage::log("Depth ".$item->getShipping_length()."*");
Does anyone have any ideas?
This worked: