1 | <?php |
||
21 | class Standard |
||
22 | extends \Aimeos\Controller\Frontend\Base |
||
23 | implements Iface, \Aimeos\Controller\Frontend\Common\Iface |
||
24 | { |
||
25 | /** |
||
26 | * Creates and adds a new order for the given order base ID |
||
27 | * |
||
28 | * @param string $baseId Unique ID of the saved basket |
||
29 | * @param string $type Arbitrary order type (max. eight chars) |
||
30 | * @return \Aimeos\MShop\Order\Item\Iface Created order object |
||
31 | */ |
||
32 | public function addItem( $baseId, $type ) |
||
75 | |||
76 | |||
77 | /** |
||
78 | * Returns the filter for searching items |
||
79 | * |
||
80 | * @return \Aimeos\MW\Criteria\Iface Filter object |
||
81 | */ |
||
82 | public function createFilter() |
||
86 | |||
87 | |||
88 | /** |
||
89 | * Returns the order item for the given ID |
||
90 | * |
||
91 | * @param string $id Unique order ID |
||
92 | * @return \Aimeos\MShop\Order\Item\Iface Order object |
||
93 | */ |
||
94 | public function getItem( $id ) |
||
115 | |||
116 | |||
117 | /** |
||
118 | * Returns the order items based on the given filter that belong to the current user |
||
119 | * |
||
120 | * @param \Aimeos\MW\Criteria\Iface Filter object |
||
121 | * @param integer|null &$total Variable that will contain the total number of available items |
||
122 | * @return \Aimeos\MShop\Order\Item\Iface[] Associative list of IDs as keys and order objects as values |
||
123 | */ |
||
124 | public function searchItems( \Aimeos\MW\Criteria\Iface $filter, &$total = null ) |
||
137 | |||
138 | |||
139 | /** |
||
140 | * Blocks the resources listed in the order. |
||
141 | * |
||
142 | * Every order contains resources like products or redeemed coupon codes |
||
143 | * that must be blocked so they can't be used by another customer in a |
||
144 | * later order. This method reduces the the stock level of products, the |
||
145 | * counts of coupon codes and others. |
||
146 | * |
||
147 | * It's save to call this method multiple times for one order. In this case, |
||
148 | * the actions will be executed only once. All subsequent calls will do |
||
149 | * nothing as long as the resources haven't been unblocked in the meantime. |
||
150 | * |
||
151 | * You can also block and unblock resources several times. Please keep in |
||
152 | * mind that unblocked resources may be reused by other orders in the |
||
153 | * meantime. This can lead to an oversell of products! |
||
154 | * |
||
155 | * @param \Aimeos\MShop\Order\Item\Iface $orderItem Order item object |
||
156 | */ |
||
157 | public function block( \Aimeos\MShop\Order\Item\Iface $orderItem ) |
||
161 | |||
162 | |||
163 | /** |
||
164 | * Frees the resources listed in the order. |
||
165 | * |
||
166 | * If customers created orders but didn't pay for them, the blocked resources |
||
167 | * like products and redeemed coupon codes must be unblocked so they can be |
||
168 | * ordered again or used by other customers. This method increased the stock |
||
169 | * level of products, the counts of coupon codes and others. |
||
170 | * |
||
171 | * It's save to call this method multiple times for one order. In this case, |
||
172 | * the actions will be executed only once. All subsequent calls will do |
||
173 | * nothing as long as the resources haven't been blocked in the meantime. |
||
174 | * |
||
175 | * You can also unblock and block resources several times. Please keep in |
||
176 | * mind that unblocked resources may be reused by other orders in the |
||
177 | * meantime. This can lead to an oversell of products! |
||
178 | * |
||
179 | * @param \Aimeos\MShop\Order\Item\Iface $orderItem Order item object |
||
180 | */ |
||
181 | public function unblock( \Aimeos\MShop\Order\Item\Iface $orderItem ) |
||
185 | |||
186 | |||
187 | /** |
||
188 | * Blocks or frees the resources listed in the order if necessary. |
||
189 | * |
||
190 | * After payment status updates, the resources like products or coupon |
||
191 | * codes listed in the order must be blocked or unblocked. This method |
||
192 | * cares about executing the appropriate action depending on the payment |
||
193 | * status. |
||
194 | * |
||
195 | * It's save to call this method multiple times for one order. In this case, |
||
196 | * the actions will be executed only once. All subsequent calls will do |
||
197 | * nothing as long as the payment status hasn't changed in the meantime. |
||
198 | * |
||
199 | * @param \Aimeos\MShop\Order\Item\Iface $orderItem Order item object |
||
200 | */ |
||
201 | public function update( \Aimeos\MShop\Order\Item\Iface $orderItem ) |
||
205 | |||
206 | |||
207 | /** |
||
208 | * Creates a new order from the given basket. |
||
209 | * |
||
210 | * Saves the given basket to the storage including the addresses, coupons, |
||
211 | * products, services, etc. and creates/stores a new order item for that |
||
212 | * order. |
||
213 | * |
||
214 | * @param \Aimeos\MShop\Order\Item\Base\Iface $basket Basket object to be stored |
||
215 | * @return \Aimeos\MShop\Order\Item\Iface Order item that belongs to the stored basket |
||
216 | * @deprecated 2017.04 Use store() from basket controller instead |
||
217 | */ |
||
218 | public function store( \Aimeos\MShop\Order\Item\Base\Iface $basket ) |
||
238 | } |
||
239 |