@@ -40,24 +40,21 @@ discard block |
||
40 | 40 | $cntl = \Aimeos\Controller\Frontend\Factory::createController( $this->getContext(), 'customer' ); |
41 | 41 | $cntl->deleteItem( $view->param( 'id' ) ); |
42 | 42 | $status = 200; |
43 | - } |
|
44 | - catch( \Aimeos\Controller\Frontend\Customer\Exception $e ) |
|
43 | + } catch( \Aimeos\Controller\Frontend\Customer\Exception $e ) |
|
45 | 44 | { |
46 | 45 | $status = 403; |
47 | 46 | $view->errors = array( array( |
48 | 47 | 'title' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ), |
49 | 48 | 'detail' => $e->getTraceAsString(), |
50 | 49 | ) ); |
51 | - } |
|
52 | - catch( \Aimeos\MShop\Exception $e ) |
|
50 | + } catch( \Aimeos\MShop\Exception $e ) |
|
53 | 51 | { |
54 | 52 | $status = 404; |
55 | 53 | $view->errors = array( array( |
56 | 54 | 'title' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ), |
57 | 55 | 'detail' => $e->getTraceAsString(), |
58 | 56 | ) ); |
59 | - } |
|
60 | - catch( \Exception $e ) |
|
57 | + } catch( \Exception $e ) |
|
61 | 58 | { |
62 | 59 | $status = 500; |
63 | 60 | $view->errors = array( array( |
@@ -93,24 +90,21 @@ discard block |
||
93 | 90 | |
94 | 91 | $view->item = $cntl->getItem( $view->param( 'id' ), $ref ); |
95 | 92 | $status = 200; |
96 | - } |
|
97 | - catch( \Aimeos\Controller\Frontend\Customer\Exception $e ) |
|
93 | + } catch( \Aimeos\Controller\Frontend\Customer\Exception $e ) |
|
98 | 94 | { |
99 | 95 | $status = 403; |
100 | 96 | $view->errors = array( array( |
101 | 97 | 'title' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ), |
102 | 98 | 'detail' => $e->getTraceAsString(), |
103 | 99 | ) ); |
104 | - } |
|
105 | - catch( \Aimeos\MShop\Exception $e ) |
|
100 | + } catch( \Aimeos\MShop\Exception $e ) |
|
106 | 101 | { |
107 | 102 | $status = 404; |
108 | 103 | $view->errors = array( array( |
109 | 104 | 'title' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ), |
110 | 105 | 'detail' => $e->getTraceAsString(), |
111 | 106 | ) ); |
112 | - } |
|
113 | - catch( \Exception $e ) |
|
107 | + } catch( \Exception $e ) |
|
114 | 108 | { |
115 | 109 | $status = 500; |
116 | 110 | $view->errors = array( array( |
@@ -146,24 +140,21 @@ discard block |
||
146 | 140 | |
147 | 141 | $view->item = $cntl->editItem( $view->param( 'id' ), (array) $payload->data->attributes ); |
148 | 142 | $status = 200; |
149 | - } |
|
150 | - catch( \Aimeos\Controller\Frontend\Customer\Exception $e ) |
|
143 | + } catch( \Aimeos\Controller\Frontend\Customer\Exception $e ) |
|
151 | 144 | { |
152 | 145 | $status = 403; |
153 | 146 | $view->errors = array( array( |
154 | 147 | 'title' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ), |
155 | 148 | 'detail' => $e->getTraceAsString(), |
156 | 149 | ) ); |
157 | - } |
|
158 | - catch( \Aimeos\MShop\Exception $e ) |
|
150 | + } catch( \Aimeos\MShop\Exception $e ) |
|
159 | 151 | { |
160 | 152 | $status = 404; |
161 | 153 | $view->errors = array( array( |
162 | 154 | 'title' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ), |
163 | 155 | 'detail' => $e->getTraceAsString(), |
164 | 156 | ) ); |
165 | - } |
|
166 | - catch( \Exception $e ) |
|
157 | + } catch( \Exception $e ) |
|
167 | 158 | { |
168 | 159 | $status = 500; |
169 | 160 | $view->errors = array( array( |
@@ -199,24 +190,21 @@ discard block |
||
199 | 190 | |
200 | 191 | $view->item = $cntl->addItem( (array) $payload->data->attributes ); |
201 | 192 | $status = 201; |
202 | - } |
|
203 | - catch( \Aimeos\Controller\Frontend\Customer\Exception $e ) |
|
193 | + } catch( \Aimeos\Controller\Frontend\Customer\Exception $e ) |
|
204 | 194 | { |
205 | 195 | $status = 403; |
206 | 196 | $view->errors = array( array( |
207 | 197 | 'title' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ), |
208 | 198 | 'detail' => $e->getTraceAsString(), |
209 | 199 | ) ); |
210 | - } |
|
211 | - catch( \Aimeos\MShop\Exception $e ) |
|
200 | + } catch( \Aimeos\MShop\Exception $e ) |
|
212 | 201 | { |
213 | 202 | $status = 404; |
214 | 203 | $view->errors = array( array( |
215 | 204 | 'title' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ), |
216 | 205 | 'detail' => $e->getTraceAsString(), |
217 | 206 | ) ); |
218 | - } |
|
219 | - catch( \Exception $e ) |
|
207 | + } catch( \Exception $e ) |
|
220 | 208 | { |
221 | 209 | $status = 500; |
222 | 210 | $view->errors = array( array( |
@@ -77,31 +77,27 @@ discard block |
||
77 | 77 | |
78 | 78 | $this->controller->deleteAddressItem( $entry->id ); |
79 | 79 | } |
80 | - } |
|
81 | - else |
|
80 | + } else |
|
82 | 81 | { |
83 | 82 | $this->controller->deleteAddressItem( $relId ); |
84 | 83 | } |
85 | 84 | |
86 | 85 | $status = 200; |
87 | - } |
|
88 | - catch( \Aimeos\Controller\Frontend\Customer\Exception $e ) |
|
86 | + } catch( \Aimeos\Controller\Frontend\Customer\Exception $e ) |
|
89 | 87 | { |
90 | 88 | $status = 403; |
91 | 89 | $view->errors = array( array( |
92 | 90 | 'title' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ), |
93 | 91 | 'detail' => $e->getTraceAsString(), |
94 | 92 | ) ); |
95 | - } |
|
96 | - catch( \Aimeos\MShop\Exception $e ) |
|
93 | + } catch( \Aimeos\MShop\Exception $e ) |
|
97 | 94 | { |
98 | 95 | $status = 404; |
99 | 96 | $view->errors = array( array( |
100 | 97 | 'title' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ), |
101 | 98 | 'detail' => $e->getTraceAsString(), |
102 | 99 | ) ); |
103 | - } |
|
104 | - catch( \Exception $e ) |
|
100 | + } catch( \Exception $e ) |
|
105 | 101 | { |
106 | 102 | $status = 500; |
107 | 103 | $view->errors = array( array( |
@@ -138,24 +134,21 @@ discard block |
||
138 | 134 | |
139 | 135 | $view->total = count( $view->items ); |
140 | 136 | $status = 200; |
141 | - } |
|
142 | - catch( \Aimeos\Controller\Frontend\Customer\Exception $e ) |
|
137 | + } catch( \Aimeos\Controller\Frontend\Customer\Exception $e ) |
|
143 | 138 | { |
144 | 139 | $status = 403; |
145 | 140 | $view->errors = array( array( |
146 | 141 | 'title' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ), |
147 | 142 | 'detail' => $e->getTraceAsString(), |
148 | 143 | ) ); |
149 | - } |
|
150 | - catch( \Aimeos\MShop\Exception $e ) |
|
144 | + } catch( \Aimeos\MShop\Exception $e ) |
|
151 | 145 | { |
152 | 146 | $status = 404; |
153 | 147 | $view->errors = array( array( |
154 | 148 | 'title' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ), |
155 | 149 | 'detail' => $e->getTraceAsString(), |
156 | 150 | ) ); |
157 | - } |
|
158 | - catch( \Exception $e ) |
|
151 | + } catch( \Exception $e ) |
|
159 | 152 | { |
160 | 153 | $status = 500; |
161 | 154 | $view->errors = array( array( |
@@ -192,24 +185,21 @@ discard block |
||
192 | 185 | $view->items = $cntl->editAddressItem( $view->param( 'relatedid' ), (array) $payload->data->attributes ); |
193 | 186 | $view->total = 1; |
194 | 187 | $status = 200; |
195 | - } |
|
196 | - catch( \Aimeos\Controller\Frontend\Customer\Exception $e ) |
|
188 | + } catch( \Aimeos\Controller\Frontend\Customer\Exception $e ) |
|
197 | 189 | { |
198 | 190 | $status = 403; |
199 | 191 | $view->errors = array( array( |
200 | 192 | 'title' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ), |
201 | 193 | 'detail' => $e->getTraceAsString(), |
202 | 194 | ) ); |
203 | - } |
|
204 | - catch( \Aimeos\MShop\Exception $e ) |
|
195 | + } catch( \Aimeos\MShop\Exception $e ) |
|
205 | 196 | { |
206 | 197 | $status = 404; |
207 | 198 | $view->errors = array( array( |
208 | 199 | 'title' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ), |
209 | 200 | 'detail' => $e->getTraceAsString(), |
210 | 201 | ) ); |
211 | - } |
|
212 | - catch( \Exception $e ) |
|
202 | + } catch( \Exception $e ) |
|
213 | 203 | { |
214 | 204 | $status = 500; |
215 | 205 | $view->errors = array( array( |
@@ -260,24 +250,21 @@ discard block |
||
260 | 250 | $view->total = count( $list ); |
261 | 251 | $view->items = $list; |
262 | 252 | $status = 201; |
263 | - } |
|
264 | - catch( \Aimeos\Controller\Frontend\Customer\Exception $e ) |
|
253 | + } catch( \Aimeos\Controller\Frontend\Customer\Exception $e ) |
|
265 | 254 | { |
266 | 255 | $status = 403; |
267 | 256 | $view->errors = array( array( |
268 | 257 | 'title' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ), |
269 | 258 | 'detail' => $e->getTraceAsString(), |
270 | 259 | ) ); |
271 | - } |
|
272 | - catch( \Aimeos\MShop\Exception $e ) |
|
260 | + } catch( \Aimeos\MShop\Exception $e ) |
|
273 | 261 | { |
274 | 262 | $status = 404; |
275 | 263 | $view->errors = array( array( |
276 | 264 | 'title' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ), |
277 | 265 | 'detail' => $e->getTraceAsString(), |
278 | 266 | ) ); |
279 | - } |
|
280 | - catch( \Exception $e ) |
|
267 | + } catch( \Exception $e ) |
|
281 | 268 | { |
282 | 269 | $status = 500; |
283 | 270 | $view->errors = array( array( |
@@ -91,8 +91,7 @@ |
||
91 | 91 | foreach( $items as $addrItem ) { |
92 | 92 | $data[] = $entryFcn( $addrItem ); |
93 | 93 | } |
94 | - } |
|
95 | - else |
|
94 | + } else |
|
96 | 95 | { |
97 | 96 | $data = $entryFcn( $items ); |
98 | 97 | } |
@@ -58,8 +58,7 @@ discard block |
||
58 | 58 | $view->items = $provider->getServiceItem(); |
59 | 59 | $view->total = 1; |
60 | 60 | } |
61 | - } |
|
62 | - else |
|
61 | + } else |
|
63 | 62 | { |
64 | 63 | $attributes = $prices = $items = []; |
65 | 64 | $type = $view->param( 'filter/cs_type' ); |
@@ -81,16 +80,14 @@ discard block |
||
81 | 80 | } |
82 | 81 | |
83 | 82 | $status = 200; |
84 | - } |
|
85 | - catch( \Aimeos\MShop\Exception $e ) |
|
83 | + } catch( \Aimeos\MShop\Exception $e ) |
|
86 | 84 | { |
87 | 85 | $status = 404; |
88 | 86 | $view->errors = array( array( |
89 | 87 | 'title' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ), |
90 | 88 | 'detail' => $e->getTraceAsString(), |
91 | 89 | ) ); |
92 | - } |
|
93 | - catch( \Exception $e ) |
|
90 | + } catch( \Exception $e ) |
|
94 | 91 | { |
95 | 92 | $status = 500; |
96 | 93 | $view->errors = array( array( |
@@ -156,8 +156,7 @@ |
||
156 | 156 | $data[] = $entryFcn( $item, $prices, $feConfig ); |
157 | 157 | $included = array_merge( $included, $refFcn( $item ) ); |
158 | 158 | } |
159 | - } |
|
160 | - else |
|
159 | + } else |
|
161 | 160 | { |
162 | 161 | $data = $entryFcn( $this->items, $prices, $feConfig ); |
163 | 162 | $included = $refFcn( $this->items ); |
@@ -313,6 +313,9 @@ |
||
313 | 313 | } |
314 | 314 | |
315 | 315 | |
316 | + /** |
|
317 | + * @param string $name |
|
318 | + */ |
|
316 | 319 | protected function access( $name ) |
317 | 320 | { |
318 | 321 | $class = new \ReflectionClass( '\Aimeos\Client\JsonApi\Order\Standard' ); |
@@ -268,7 +268,7 @@ |
||
268 | 268 | $baseManager = \Aimeos\MShop\Factory::createManager( $this->context, 'order/base' ); |
269 | 269 | |
270 | 270 | $search = $baseManager->createSearch(); |
271 | - $search->setConditions( $search->compare( '==', 'order.base.price', '672.00') ); |
|
271 | + $search->setConditions( $search->compare( '==', 'order.base.price', '672.00' ) ); |
|
272 | 272 | |
273 | 273 | $items = $baseManager->searchItems( $search ); |
274 | 274 |
@@ -101,8 +101,7 @@ |
||
101 | 101 | foreach( $items as $item ) { |
102 | 102 | $data[] = $entryFcn( $item ); |
103 | 103 | } |
104 | - } |
|
105 | - else |
|
104 | + } else |
|
106 | 105 | { |
107 | 106 | $data = $entryFcn( $items ); |
108 | 107 | } |
@@ -43,8 +43,7 @@ discard block |
||
43 | 43 | { |
44 | 44 | $view->items = $cntl->getItem( $id ); |
45 | 45 | $view->total = 1; |
46 | - } |
|
47 | - else |
|
46 | + } else |
|
48 | 47 | { |
49 | 48 | $total = 0; |
50 | 49 | $filter = $cntl->createFilter(); |
@@ -55,24 +54,21 @@ discard block |
||
55 | 54 | } |
56 | 55 | |
57 | 56 | $status = 200; |
58 | - } |
|
59 | - catch( \Aimeos\Controller\Frontend\Exception $e ) |
|
57 | + } catch( \Aimeos\Controller\Frontend\Exception $e ) |
|
60 | 58 | { |
61 | 59 | $status = 403; |
62 | 60 | $view->errors = array( array( |
63 | 61 | 'title' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ), |
64 | 62 | 'detail' => $e->getTraceAsString(), |
65 | 63 | ) ); |
66 | - } |
|
67 | - catch( \Aimeos\MShop\Exception $e ) |
|
64 | + } catch( \Aimeos\MShop\Exception $e ) |
|
68 | 65 | { |
69 | 66 | $status = 404; |
70 | 67 | $view->errors = array( array( |
71 | 68 | 'title' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ), |
72 | 69 | 'detail' => $e->getTraceAsString(), |
73 | 70 | ) ); |
74 | - } |
|
75 | - catch( \Exception $e ) |
|
71 | + } catch( \Exception $e ) |
|
76 | 72 | { |
77 | 73 | $status = 500; |
78 | 74 | $view->errors = array( array( |
@@ -116,32 +112,28 @@ discard block |
||
116 | 112 | $view->total = 1; |
117 | 113 | |
118 | 114 | $status = 201; |
119 | - } |
|
120 | - catch( \Aimeos\Client\JsonApi\Exception $e ) |
|
115 | + } catch( \Aimeos\Client\JsonApi\Exception $e ) |
|
121 | 116 | { |
122 | 117 | $status = $e->getCode(); |
123 | 118 | $view->errors = array( array( |
124 | 119 | 'title' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ), |
125 | 120 | 'detail' => $e->getTraceAsString(), |
126 | 121 | ) ); |
127 | - } |
|
128 | - catch( \Aimeos\Controller\Frontend\Exception $e ) |
|
122 | + } catch( \Aimeos\Controller\Frontend\Exception $e ) |
|
129 | 123 | { |
130 | 124 | $status = 403; |
131 | 125 | $view->errors = array( array( |
132 | 126 | 'title' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ), |
133 | 127 | 'detail' => $e->getTraceAsString(), |
134 | 128 | ) ); |
135 | - } |
|
136 | - catch( \Aimeos\MShop\Exception $e ) |
|
129 | + } catch( \Aimeos\MShop\Exception $e ) |
|
137 | 130 | { |
138 | 131 | $status = 404; |
139 | 132 | $view->errors = array( array( |
140 | 133 | 'title' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ), |
141 | 134 | 'detail' => $e->getTraceAsString(), |
142 | 135 | ) ); |
143 | - } |
|
144 | - catch( \Exception $e ) |
|
136 | + } catch( \Exception $e ) |
|
145 | 137 | { |
146 | 138 | $status = 500; |
147 | 139 | $view->errors = array( array( |
@@ -59,16 +59,14 @@ discard block |
||
59 | 59 | $status = 200; |
60 | 60 | $type = $view->param( 'id', 'default' ); |
61 | 61 | $view->item = $this->controller->setType( $type )->clear()->get(); |
62 | - } |
|
63 | - catch( \Aimeos\MShop\Exception $e ) |
|
62 | + } catch( \Aimeos\MShop\Exception $e ) |
|
64 | 63 | { |
65 | 64 | $status = 404; |
66 | 65 | $view->errors = array( array( |
67 | 66 | 'title' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ), |
68 | 67 | 'detail' => $e->getTraceAsString(), |
69 | 68 | ) ); |
70 | - } |
|
71 | - catch( \Exception $e ) |
|
69 | + } catch( \Exception $e ) |
|
72 | 70 | { |
73 | 71 | $status = 500; |
74 | 72 | $view->errors = array( array( |
@@ -99,24 +97,21 @@ discard block |
||
99 | 97 | try |
100 | 98 | { |
101 | 99 | $view->item = $this->controller->load( $id, $this->getParts( $view ) ); |
102 | - } |
|
103 | - catch( \Aimeos\MShop\Exception $e ) |
|
100 | + } catch( \Aimeos\MShop\Exception $e ) |
|
104 | 101 | { |
105 | 102 | $view->item = $this->controller->setType( $id )->get(); |
106 | 103 | $allow = true; |
107 | 104 | } |
108 | 105 | |
109 | 106 | $status = 200; |
110 | - } |
|
111 | - catch( \Aimeos\MShop\Exception $e ) |
|
107 | + } catch( \Aimeos\MShop\Exception $e ) |
|
112 | 108 | { |
113 | 109 | $status = 404; |
114 | 110 | $view->errors = array( array( |
115 | 111 | 'title' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ), |
116 | 112 | 'detail' => $e->getTraceAsString(), |
117 | 113 | ) ); |
118 | - } |
|
119 | - catch( \Exception $e ) |
|
114 | + } catch( \Exception $e ) |
|
120 | 115 | { |
121 | 116 | $status = 500; |
122 | 117 | $view->errors = array( array( |
@@ -153,16 +148,14 @@ discard block |
||
153 | 148 | |
154 | 149 | $view->item = $basket; |
155 | 150 | $status = 200; |
156 | - } |
|
157 | - catch( \Aimeos\MShop\Exception $e ) |
|
151 | + } catch( \Aimeos\MShop\Exception $e ) |
|
158 | 152 | { |
159 | 153 | $status = 404; |
160 | 154 | $view->errors = array( array( |
161 | 155 | 'title' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ), |
162 | 156 | 'detail' => $e->getTraceAsString(), |
163 | 157 | ) ); |
164 | - } |
|
165 | - catch( \Exception $e ) |
|
158 | + } catch( \Exception $e ) |
|
166 | 159 | { |
167 | 160 | $status = 500; |
168 | 161 | $view->errors = array( array( |
@@ -193,16 +186,14 @@ discard block |
||
193 | 186 | |
194 | 187 | $view->item = $item; |
195 | 188 | $status = 200; |
196 | - } |
|
197 | - catch( \Aimeos\MShop\Exception $e ) |
|
189 | + } catch( \Aimeos\MShop\Exception $e ) |
|
198 | 190 | { |
199 | 191 | $status = 404; |
200 | 192 | $view->errors = array( array( |
201 | 193 | 'title' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ), |
202 | 194 | 'detail' => $e->getTraceAsString(), |
203 | 195 | ) ); |
204 | - } |
|
205 | - catch( \Exception $e ) |
|
196 | + } catch( \Exception $e ) |
|
206 | 197 | { |
207 | 198 | $status = 500; |
208 | 199 | $view->errors = array( array( |