public function totalPrice()
    {
        $total = 0;

        $cart = $this->getCart();

        if ($cart->isEmpty()) {
            return $total;
        }

        foreach ($cart as $row) {
            $total += $row->qty * $row->price;
        }

        return $total;
    }
public function totalPrice()
    {
        $total = 0;

        $cart = $this->getCart();

        if ($cart->isEmpty()) {
            return $total;
        }

        foreach ($cart as $row) {
            $total += $row->qty * $row->price;
        }

        return $total;
    }
public function totalPrice ( ) { $ total = 0 ; $ cart = $ this -> getCart ( ) ; if ( $ cart -> isEmpty ( ) ) { return $ total ; } foreach ( $ cart as $ row ) { $ total += $ row -> qty * $ row -> price ; } return $ total ; }
Return total price of cart.

@return
Return total price of cart .