Colissimo in progress

This commit is contained in:
Etienne Roudeix
2013-11-14 11:21:34 +01:00
parent e8b4a4ac74
commit 48409c29a9
10 changed files with 236 additions and 158 deletions

View File

@@ -112,4 +112,18 @@ class Cart extends BaseCart
return $total;
}
public function getWeight()
{
$weight = 0;
foreach($this->getCartItems() as $cartItem) {
$itemWeight = $cartItem->getProductSaleElements()->getWeight();
$itemWeight *= $cartItem->getQuantity();
$weight += $itemWeight;
}
return $weight;
}
}