@@ -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(); |
@@ -196,16 +196,14 @@ discard block |
||
196 | 196 | $attrManager->commit(); |
197 | 197 | $manager->commit(); |
198 | 198 | return; |
199 | - } |
|
200 | - catch( \Aimeos\MShop\Exception $e ) |
|
199 | + } catch( \Aimeos\MShop\Exception $e ) |
|
201 | 200 | { |
202 | 201 | $error = array( 'product-item-download' => $context->getI18n()->dt( 'mshop', $e->getMessage() ) ); |
203 | 202 | $view->errors = $view->get( 'errors', array() ) + $error; |
204 | 203 | |
205 | 204 | $attrManager->rollback(); |
206 | 205 | $manager->rollback(); |
207 | - } |
|
208 | - catch( \Exception $e ) |
|
206 | + } catch( \Exception $e ) |
|
209 | 207 | { |
210 | 208 | $context->getLogger()->log( $e->getMessage() . ' - ' . $e->getTraceAsString() ); |
211 | 209 | $error = array( 'product-item-download' => $e->getMessage() ); |
@@ -482,8 +480,7 @@ discard block |
||
482 | 480 | |
483 | 481 | $data['time'] = $fs->time( $data['path'] ); |
484 | 482 | $data['size'] = $fs->size( $data['path'] ); |
485 | - } |
|
486 | - catch( \Exception $e ) { ; } |
|
483 | + } catch( \Exception $e ) { ; } |
|
487 | 484 | } |
488 | 485 | |
489 | 486 | $view->downloadData = $data; |
@@ -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() ); |