1 | <?php |
||
21 | class ShoppingCart extends \yz\shoppingcart\ShoppingCart |
||
22 | { |
||
23 | /** |
||
24 | * @var AbstractCartPosition[] |
||
25 | */ |
||
26 | protected $_positions = []; |
||
27 | |||
28 | /** |
||
29 | * The cart module. |
||
30 | */ |
||
31 | public $module; |
||
32 | |||
33 | public $currency = 'usd'; |
||
34 | |||
35 | /** |
||
36 | * @return integer |
||
37 | */ |
||
38 | 1 | public function getCount() |
|
42 | |||
43 | 1 | public function getQuantity() |
|
52 | |||
53 | 2 | public function getSubtotal() |
|
57 | |||
58 | 2 | public function getTotal() |
|
62 | |||
63 | 1 | public function getDiscount() |
|
67 | |||
68 | 1 | public function formatCurrency($sum, $currency = null) |
|
72 | |||
73 | /** |
||
74 | * Checks whether any of cart positions has error in `id` attribute. |
||
75 | * @return boolean |
||
76 | */ |
||
77 | public function hasErrors() |
||
87 | } |
||
88 |