Cart\Cart::total PHP Method

total() public method

Get the cart total including tax.
public total ( ) : float
return float
    public function total()
    {
        return (double) array_sum(array_map(function (CartItem $item) {
            return $item->getTotalPrice();
        }, $this->items));
    }

Usage Example

Beispiel #1
0
 public function getTotal()
 {
     return $this->cart->total() + $this->cart->icann() - $this->cart->getDiscount();
 }