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 ) |
||
41 | |||
42 | |||
43 | /** |
||
44 | * Returns the filter for searching items |
||
45 | * |
||
46 | * @return \Aimeos\MW\Criteria\Iface Filter object |
||
47 | */ |
||
48 | public function createFilter() |
||
52 | |||
53 | |||
54 | /** |
||
55 | * Returns the order item for the given ID |
||
56 | * |
||
57 | * @param string $id Unique order ID |
||
58 | * @return \Aimeos\MShop\Order\Item\Iface Order object |
||
59 | */ |
||
60 | public function getItem( $id ) |
||
64 | |||
65 | |||
66 | /** |
||
67 | * Returns the order items based on the given filter that belong to the current user |
||
68 | * |
||
69 | * @param \Aimeos\MW\Criteria\Iface Filter object |
||
70 | * @param integer|null &$total Variable that will contain the total number of available items |
||
71 | * @return \Aimeos\MShop\Order\Item\Iface[] Associative list of IDs as keys and order objects as values |
||
72 | */ |
||
73 | public function searchItems( \Aimeos\MW\Criteria\Iface $filter, &$total = null ) |
||
77 | |||
78 | |||
79 | /** |
||
80 | * Blocks the resources listed in the order. |
||
81 | * |
||
82 | * Every order contains resources like products or redeemed coupon codes |
||
83 | * that must be blocked so they can't be used by another customer in a |
||
84 | * later order. This method reduces the the stock level of products, the |
||
85 | * counts of coupon codes and others. |
||
86 | * |
||
87 | * It's save to call this method multiple times for one order. In this case, |
||
88 | * the actions will be executed only once. All subsequent calls will do |
||
89 | * nothing as long as the resources haven't been unblocked in the meantime. |
||
90 | * |
||
91 | * You can also block and unblock resources several times. Please keep in |
||
92 | * mind that unblocked resources may be reused by other orders in the |
||
93 | * meantime. This can lead to an oversell of products! |
||
94 | * |
||
95 | * @param \Aimeos\MShop\Order\Item\Iface $orderItem Order item object |
||
96 | */ |
||
97 | public function block( \Aimeos\MShop\Order\Item\Iface $orderItem ) |
||
101 | |||
102 | |||
103 | /** |
||
104 | * Frees the resources listed in the order. |
||
105 | * |
||
106 | * If customers created orders but didn't pay for them, the blocked resources |
||
107 | * like products and redeemed coupon codes must be unblocked so they can be |
||
108 | * ordered again or used by other customers. This method increased the stock |
||
109 | * level of products, the counts of coupon codes and others. |
||
110 | * |
||
111 | * It's save to call this method multiple times for one order. In this case, |
||
112 | * the actions will be executed only once. All subsequent calls will do |
||
113 | * nothing as long as the resources haven't been blocked in the meantime. |
||
114 | * |
||
115 | * You can also unblock and block resources several times. Please keep in |
||
116 | * mind that unblocked resources may be reused by other orders in the |
||
117 | * meantime. This can lead to an oversell of products! |
||
118 | * |
||
119 | * @param \Aimeos\MShop\Order\Item\Iface $orderItem Order item object |
||
120 | */ |
||
121 | public function unblock( \Aimeos\MShop\Order\Item\Iface $orderItem ) |
||
125 | |||
126 | |||
127 | /** |
||
128 | * Blocks or frees the resources listed in the order if necessary. |
||
129 | * |
||
130 | * After payment status updates, the resources like products or coupon |
||
131 | * codes listed in the order must be blocked or unblocked. This method |
||
132 | * cares about executing the appropriate action depending on the payment |
||
133 | * status. |
||
134 | * |
||
135 | * It's save to call this method multiple times for one order. In this case, |
||
136 | * the actions will be executed only once. All subsequent calls will do |
||
137 | * nothing as long as the payment status hasn't changed in the meantime. |
||
138 | * |
||
139 | * @param \Aimeos\MShop\Order\Item\Iface $orderItem Order item object |
||
140 | */ |
||
141 | public function update( \Aimeos\MShop\Order\Item\Iface $orderItem ) |
||
145 | |||
146 | |||
147 | /** |
||
148 | * Creates a new order from the given basket. |
||
149 | * |
||
150 | * Saves the given basket to the storage including the addresses, coupons, |
||
151 | * products, services, etc. and creates/stores a new order item for that |
||
152 | * order. |
||
153 | * |
||
154 | * @param \Aimeos\MShop\Order\Item\Base\Iface $basket Basket object to be stored |
||
155 | * @return \Aimeos\MShop\Order\Item\Iface Order item that belongs to the stored basket |
||
156 | * @deprecated 2017.04 Use store() from basket controller instead |
||
157 | */ |
||
158 | public function store( \Aimeos\MShop\Order\Item\Base\Iface $basket ) |
||
178 | } |
||
179 |