@@ -36,8 +36,11 @@ |
||
36 | 36 | <td> |
37 | 37 | <?php if( $pos < $cnt - 1 ) : ?> |
38 | 38 | <div class="fa fa-minus" aria-label="<?php echo $enc->attr( $this->translate( 'admin', 'Remove filter' ) ); ?>"></div> |
39 | -<?php else : ?> |
|
40 | - <div class="fa fa-plus" aria-label="<?php echo $enc->attr( $this->translate( 'admin', 'Add filter' ) ); ?>"></div> |
|
39 | +<?php else { |
|
40 | + : ?> |
|
41 | + <div class="fa fa-plus" aria-label="<?php echo $enc->attr( $this->translate( 'admin', 'Add filter' ) ); |
|
42 | +} |
|
43 | +?>"></div> |
|
41 | 44 | <?php endif; ?> |
42 | 45 | </td> |
43 | 46 | <td> |
@@ -33,8 +33,11 @@ |
||
33 | 33 | <?php foreach( $this->get( 'stockWarehouses', array() ) as $whid => $warehouse ) : ?> |
34 | 34 | <?php if( $whid == $this->get( 'stockData/product.stock.warehouseid/' . $idx ) ) : ?> |
35 | 35 | <option value="<?php echo $enc->attr( $whid ); ?>" selected="selected"><?php echo $enc->html( $warehouse->getLabel() ) ?></option> |
36 | -<?php else : ?> |
|
37 | - <option value="<?php echo $enc->attr( $whid ); ?>"><?php echo $enc->html( $warehouse->getLabel() ) ?></option> |
|
36 | +<?php else { |
|
37 | + : ?> |
|
38 | + <option value="<?php echo $enc->attr( $whid ); |
|
39 | +} |
|
40 | +?>"><?php echo $enc->html( $warehouse->getLabel() ) ?></option> |
|
38 | 41 | <?php endif; ?> |
39 | 42 | <?php endforeach; ?> |
40 | 43 | </select> |
@@ -42,8 +42,11 @@ |
||
42 | 42 | <?php foreach( (array) $this->get( 'priceTypes', array() ) as $typeId => $typeItem ) : ?> |
43 | 43 | <?php if( $typeId == $this->get( 'priceData/price.typeid/' . $idx ) ) : ?> |
44 | 44 | <option value="<?php echo $enc->attr( $typeId ); ?>" selected="selected"><?php echo $enc->html( $typeItem->getLabel() ); ?></option> |
45 | -<?php else : ?> |
|
46 | - <option value="<?php echo $enc->attr( $typeId ); ?>"><?php echo $enc->html( $typeItem->getLabel() ); ?></option> |
|
45 | +<?php else { |
|
46 | + : ?> |
|
47 | + <option value="<?php echo $enc->attr( $typeId ); |
|
48 | +} |
|
49 | +?>"><?php echo $enc->html( $typeItem->getLabel() ); ?></option> |
|
47 | 50 | <?php endif; ?> |
48 | 51 | <?php endforeach; ?> |
49 | 52 | </select> |
@@ -155,16 +155,14 @@ discard block |
||
155 | 155 | $textManager->commit(); |
156 | 156 | $manager->commit(); |
157 | 157 | return; |
158 | - } |
|
159 | - catch( \Aimeos\MShop\Exception $e ) |
|
158 | + } catch( \Aimeos\MShop\Exception $e ) |
|
160 | 159 | { |
161 | 160 | $error = array( 'product-item-price' => $context->getI18n()->dt( 'mshop', $e->getMessage() ) ); |
162 | 161 | $view->errors = $view->get( 'errors', array() ) + $error; |
163 | 162 | |
164 | 163 | $textManager->rollback(); |
165 | 164 | $manager->rollback(); |
166 | - } |
|
167 | - catch( \Exception $e ) |
|
165 | + } catch( \Exception $e ) |
|
168 | 166 | { |
169 | 167 | $context->getLogger()->log( $e->getMessage() . ' - ' . $e->getTraceAsString() ); |
170 | 168 | $error = array( 'product-item-price' => $e->getMessage() ); |
@@ -365,8 +363,7 @@ discard block |
||
365 | 363 | |
366 | 364 | $item = $priceItem; |
367 | 365 | $item->setId( null ); |
368 | - } |
|
369 | - else |
|
366 | + } else |
|
370 | 367 | { |
371 | 368 | $litem = $listItems[$listid]; |
372 | 369 | $item = $litem->getRefItem(); |
@@ -157,16 +157,14 @@ discard block |
||
157 | 157 | $textManager->commit(); |
158 | 158 | $manager->commit(); |
159 | 159 | return; |
160 | - } |
|
161 | - catch( \Aimeos\MShop\Exception $e ) |
|
160 | + } catch( \Aimeos\MShop\Exception $e ) |
|
162 | 161 | { |
163 | 162 | $error = array( 'product-item-text' => $context->getI18n()->dt( 'mshop', $e->getMessage() ) ); |
164 | 163 | $view->errors = $view->get( 'errors', array() ) + $error; |
165 | 164 | |
166 | 165 | $textManager->rollback(); |
167 | 166 | $manager->rollback(); |
168 | - } |
|
169 | - catch( \Exception $e ) |
|
167 | + } catch( \Exception $e ) |
|
170 | 168 | { |
171 | 169 | $context->getLogger()->log( $e->getMessage() . ' - ' . $e->getTraceAsString() ); |
172 | 170 | $error = array( 'product-item-text' => $e->getMessage() ); |
@@ -401,8 +399,7 @@ discard block |
||
401 | 399 | |
402 | 400 | $item = $textItem; |
403 | 401 | $item->setId( null ); |
404 | - } |
|
405 | - else |
|
402 | + } else |
|
406 | 403 | { |
407 | 404 | $litem = $listItems[$listid]; |
408 | 405 | $item = $litem->getRefItem(); |
@@ -151,14 +151,12 @@ discard block |
||
151 | 151 | |
152 | 152 | $manager->commit(); |
153 | 153 | return; |
154 | - } |
|
155 | - catch( \Aimeos\MShop\Exception $e ) |
|
154 | + } catch( \Aimeos\MShop\Exception $e ) |
|
156 | 155 | { |
157 | 156 | $error = array( 'product-item-selection' => $context->getI18n()->dt( 'mshop', $e->getMessage() ) ); |
158 | 157 | $view->errors = $view->get( 'errors', array() ) + $error; |
159 | 158 | $manager->rollback(); |
160 | - } |
|
161 | - catch( \Exception $e ) |
|
159 | + } catch( \Exception $e ) |
|
162 | 160 | { |
163 | 161 | $context->getLogger()->log( $e->getMessage() . ' - ' . $e->getTraceAsString() ); |
164 | 162 | $error = array( 'product-item-selection' => $e->getMessage() ); |
@@ -391,8 +389,7 @@ discard block |
||
391 | 389 | $code = $refItem->getCode(); |
392 | 390 | $data[$code]['product.lists.id'] = $listid; |
393 | 391 | $data[$code]['product.id'] = $listItem->getRefId(); |
394 | - } |
|
395 | - else |
|
392 | + } else |
|
396 | 393 | { |
397 | 394 | $code = $refItem->getCode() . '_copy'; |
398 | 395 | $data[$code]['product.lists.id'] = ''; |
@@ -523,8 +520,7 @@ discard block |
||
523 | 520 | |
524 | 521 | $item = $prodItem; |
525 | 522 | $item->setId( null ); |
526 | - } |
|
527 | - else |
|
523 | + } else |
|
528 | 524 | { |
529 | 525 | $litem = $listItems[$listid]; |
530 | 526 | $item = $litem->getRefItem(); |
@@ -155,16 +155,14 @@ discard block |
||
155 | 155 | $mediaManager->commit(); |
156 | 156 | $manager->commit(); |
157 | 157 | return; |
158 | - } |
|
159 | - catch( \Aimeos\MShop\Exception $e ) |
|
158 | + } catch( \Aimeos\MShop\Exception $e ) |
|
160 | 159 | { |
161 | 160 | $error = array( 'product-item-image' => $context->getI18n()->dt( 'mshop', $e->getMessage() ) ); |
162 | 161 | $view->errors = $view->get( 'errors', array() ) + $error; |
163 | 162 | |
164 | 163 | $mediaManager->rollback(); |
165 | 164 | $manager->rollback(); |
166 | - } |
|
167 | - catch( \Exception $e ) |
|
165 | + } catch( \Exception $e ) |
|
168 | 166 | { |
169 | 167 | $context->getLogger()->log( $e->getMessage() . ' - ' . $e->getTraceAsString() ); |
170 | 168 | $error = array( 'product-item-image' => $e->getMessage() ); |
@@ -451,21 +449,18 @@ discard block |
||
451 | 449 | if( $mediaId !== '' && isset( $mediaItems[$mediaId] ) ) |
452 | 450 | { |
453 | 451 | $item = $mediaItems[$mediaId]; |
454 | - } |
|
455 | - else if( ( $file = $view->value( $files, $num ) ) !== null ) |
|
452 | + } else if( ( $file = $view->value( $files, $num ) ) !== null ) |
|
456 | 453 | { |
457 | 454 | $item = $mediaItem; |
458 | 455 | $item->setId( null ); |
459 | 456 | |
460 | 457 | $cntl->add( $item, $file ); |
461 | 458 | $num++; |
462 | - } |
|
463 | - else |
|
459 | + } else |
|
464 | 460 | { |
465 | 461 | throw new \Aimeos\Admin\JQAdm\Exception( sprintf( 'No file uploaded for %1$d. new image', $num+1 ) ); |
466 | 462 | } |
467 | - } |
|
468 | - else |
|
463 | + } else |
|
469 | 464 | { |
470 | 465 | $litem = $listItems[$listid]; |
471 | 466 | $item = $litem->getRefItem(); |
@@ -151,14 +151,12 @@ |
||
151 | 151 | |
152 | 152 | $manager->commit(); |
153 | 153 | return; |
154 | - } |
|
155 | - catch( \Aimeos\MShop\Exception $e ) |
|
154 | + } catch( \Aimeos\MShop\Exception $e ) |
|
156 | 155 | { |
157 | 156 | $error = array( 'product-item-category' => $context->getI18n()->dt( 'mshop', $e->getMessage() ) ); |
158 | 157 | $view->errors = $view->get( 'errors', array() ) + $error; |
159 | 158 | $manager->rollback(); |
160 | - } |
|
161 | - catch( \Exception $e ) |
|
159 | + } catch( \Exception $e ) |
|
162 | 160 | { |
163 | 161 | $context->getLogger()->log( $e->getMessage() . ' - ' . $e->getTraceAsString() ); |
164 | 162 | $error = array( 'product-item-category' => $e->getMessage() ); |
@@ -87,13 +87,11 @@ discard block |
||
87 | 87 | foreach( $this->getSubClients() as $client ) { |
88 | 88 | $view->itemBody .= $client->copy(); |
89 | 89 | } |
90 | - } |
|
91 | - catch( \Aimeos\MShop\Exception $e ) |
|
90 | + } catch( \Aimeos\MShop\Exception $e ) |
|
92 | 91 | { |
93 | 92 | $error = array( 'product-item' => $context->getI18n()->dt( 'mshop', $e->getMessage() ) ); |
94 | 93 | $view->errors = $view->get( 'errors', array() ) + $error; |
95 | - } |
|
96 | - catch( \Exception $e ) |
|
94 | + } catch( \Exception $e ) |
|
97 | 95 | { |
98 | 96 | $error = array( 'product-item' => $e->getMessage() ); |
99 | 97 | $view->errors = $view->get( 'errors', array() ) + $error; |
@@ -124,13 +122,11 @@ discard block |
||
124 | 122 | foreach( $this->getSubClients() as $client ) { |
125 | 123 | $view->itemBody .= $client->create(); |
126 | 124 | } |
127 | - } |
|
128 | - catch( \Aimeos\MShop\Exception $e ) |
|
125 | + } catch( \Aimeos\MShop\Exception $e ) |
|
129 | 126 | { |
130 | 127 | $error = array( 'product-item' => $context->getI18n()->dt( 'mshop', $e->getMessage() ) ); |
131 | 128 | $view->errors = $view->get( 'errors', array() ) + $error; |
132 | - } |
|
133 | - catch( \Exception $e ) |
|
129 | + } catch( \Exception $e ) |
|
134 | 130 | { |
135 | 131 | $error = array( 'product-item' => $e->getMessage() ); |
136 | 132 | $view->errors = $view->get( 'errors', array() ) + $error; |
@@ -166,14 +162,12 @@ discard block |
||
166 | 162 | $manager->commit(); |
167 | 163 | |
168 | 164 | return; |
169 | - } |
|
170 | - catch( \Aimeos\MShop\Exception $e ) |
|
165 | + } catch( \Aimeos\MShop\Exception $e ) |
|
171 | 166 | { |
172 | 167 | $error = array( 'product-item' => $context->getI18n()->dt( 'mshop', $e->getMessage() ) ); |
173 | 168 | $view->errors = $view->get( 'errors', array() ) + $error; |
174 | 169 | $manager->rollback(); |
175 | - } |
|
176 | - catch( \Exception $e ) |
|
170 | + } catch( \Exception $e ) |
|
177 | 171 | { |
178 | 172 | $error = array( 'product-item' => $e->getMessage() ); |
179 | 173 | $view->errors = $view->get( 'errors', array() ) + $error; |
@@ -200,13 +194,11 @@ discard block |
||
200 | 194 | foreach( $this->getSubClients() as $client ) { |
201 | 195 | $view->itemBody .= $client->get(); |
202 | 196 | } |
203 | - } |
|
204 | - catch( \Aimeos\MShop\Exception $e ) |
|
197 | + } catch( \Aimeos\MShop\Exception $e ) |
|
205 | 198 | { |
206 | 199 | $error = array( 'product-item' => $context->getI18n()->dt( 'mshop', $e->getMessage() ) ); |
207 | 200 | $view->errors = $view->get( 'errors', array() ) + $error; |
208 | - } |
|
209 | - catch( \Exception $e ) |
|
201 | + } catch( \Exception $e ) |
|
210 | 202 | { |
211 | 203 | $error = array( 'product-item' => $e->getMessage() ); |
212 | 204 | $view->errors = $view->get( 'errors', array() ) + $error; |
@@ -249,18 +241,15 @@ discard block |
||
249 | 241 | |
250 | 242 | $manager->commit(); |
251 | 243 | return; |
252 | - } |
|
253 | - catch( \Aimeos\Admin\JQAdm\Exception $e ) |
|
244 | + } catch( \Aimeos\Admin\JQAdm\Exception $e ) |
|
254 | 245 | { |
255 | 246 | // fall through to create() |
256 | - } |
|
257 | - catch( \Aimeos\MShop\Exception $e ) |
|
247 | + } catch( \Aimeos\MShop\Exception $e ) |
|
258 | 248 | { |
259 | 249 | $error = array( 'product-item' => $context->getI18n()->dt( 'mshop', $e->getMessage() ) ); |
260 | 250 | $view->errors = $view->get( 'errors', array() ) + $error; |
261 | 251 | $manager->rollback(); |
262 | - } |
|
263 | - catch( \Exception $e ) |
|
252 | + } catch( \Exception $e ) |
|
264 | 253 | { |
265 | 254 | $error = array( 'product-item' => $e->getMessage() ); |
266 | 255 | $view->errors = $view->get( 'errors', array() ) + $error; |
@@ -296,13 +285,11 @@ discard block |
||
296 | 285 | foreach( $this->getSubClients() as $client ) { |
297 | 286 | $view->itemBody .= $client->search(); |
298 | 287 | } |
299 | - } |
|
300 | - catch( \Aimeos\MShop\Exception $e ) |
|
288 | + } catch( \Aimeos\MShop\Exception $e ) |
|
301 | 289 | { |
302 | 290 | $error = array( 'product-item' => $context->getI18n()->dt( 'mshop', $e->getMessage() ) ); |
303 | 291 | $view->errors = $view->get( 'errors', array() ) + $error; |
304 | - } |
|
305 | - catch( \Exception $e ) |
|
292 | + } catch( \Exception $e ) |
|
306 | 293 | { |
307 | 294 | $error = array( 'product-item' => $e->getMessage() ); |
308 | 295 | $view->errors = $view->get( 'errors', array() ) + $error; |