create smarty attribute for cart
This commit is contained in:
@@ -76,4 +76,17 @@ class Cart extends BaseCart
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function getTotalAmount()
|
||||
{
|
||||
$total = 0;
|
||||
|
||||
foreach($this->getCartItems() as $cartItem) {
|
||||
$total += $cartItem->getPrice()-$cartItem->getDiscount();
|
||||
}
|
||||
|
||||
$total -= $this->getDiscount();
|
||||
|
||||
return $total;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user