1 | <?php |
||
22 | class ShoppingCart extends \yz\shoppingcart\ShoppingCart |
||
23 | { |
||
24 | /** |
||
25 | * @var AbstractCartPosition[] |
||
26 | * TODO make local AbstractCartPosition |
||
27 | */ |
||
28 | protected $_positions = []; |
||
29 | |||
30 | /** |
||
31 | * The cart module. |
||
32 | */ |
||
33 | public $module; |
||
34 | |||
35 | public $currency = 'usd'; |
||
36 | |||
37 | /** |
||
38 | 1 | * @return integer |
|
39 | */ |
||
40 | 1 | public function getCount() |
|
44 | |||
45 | 1 | public function getQuantity() |
|
54 | |||
55 | 2 | public function getSubtotal() |
|
59 | |||
60 | 2 | public function getTotal() |
|
64 | |||
65 | 1 | public function getDiscount() |
|
69 | |||
70 | 1 | public function formatCurrency($sum, $currency = null) |
|
74 | |||
75 | /** |
||
76 | * Checks whether any of cart positions has error in `id` attribute. |
||
77 | * @return boolean |
||
78 | */ |
||
79 | public function hasErrors() |
||
89 | |||
90 | /** |
||
91 | * @param CartPositionInterface[] $positions |
||
92 | */ |
||
93 | public function putPositions($positions) |
||
116 | } |
||
117 |