@@ -87,9 +87,12 @@ |
||
87 | 87 | </select> |
88 | 88 | </div> |
89 | 89 | </div> |
90 | - <?php else : ?> |
|
90 | + <?php else { |
|
91 | + : ?> |
|
91 | 92 | <input class="item-languageid" type="hidden" |
92 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'address', 'idx', 'customer.address.languageid' ) ) ); ?>'.replace('idx', idx)" |
|
93 | + v-bind:name="'<?= $enc->attr( $this->formparam( array( 'address', 'idx', 'customer.address.languageid' ) ) ); |
|
94 | +} |
|
95 | +?>'.replace('idx', idx)" |
|
93 | 96 | value="<?= $enc->attr( $languages->getCode()->first() ); ?>" /> |
94 | 97 | <?php endif; ?> |
95 | 98 | <div class="form-group row optional"> |
@@ -5,8 +5,7 @@ discard block |
||
5 | 5 | * @copyright Aimeos (aimeos.org), 2017-2020 |
6 | 6 | */ |
7 | 7 | |
8 | -$price = function( array $orders, \Aimeos\MShop\Order\Item\Iface $item, $priceFormat ) |
|
9 | -{ |
|
8 | +$price = function( array $orders, \Aimeos\MShop\Order\Item\Iface $item, $priceFormat ) { |
|
10 | 9 | if( isset( $orders[$item->getBaseId()] ) ) |
11 | 10 | { |
12 | 11 | $price = $orders[$item->getBaseId()]->getPrice(); |
@@ -15,8 +14,7 @@ discard block |
||
15 | 14 | }; |
16 | 15 | |
17 | 16 | |
18 | -$name = function( array $orders, \Aimeos\MShop\Order\Item\Iface $item ) |
|
19 | -{ |
|
17 | +$name = function( array $orders, \Aimeos\MShop\Order\Item\Iface $item ) { |
|
20 | 18 | if( isset( $orders[$item->getBaseId()] ) ) |
21 | 19 | { |
22 | 20 | $addresses = $orders[$item->getBaseId()]->getAddresses(); |
@@ -36,8 +34,7 @@ discard block |
||
36 | 34 | }; |
37 | 35 | |
38 | 36 | |
39 | -$payment = function( array $orders, \Aimeos\MShop\Order\Item\Iface $item ) |
|
40 | -{ |
|
37 | +$payment = function( array $orders, \Aimeos\MShop\Order\Item\Iface $item ) { |
|
41 | 38 | if( isset( $orders[$item->getBaseId()] ) ) |
42 | 39 | { |
43 | 40 | $services = $orders[$item->getBaseId()]->getServices(); |
@@ -49,8 +46,7 @@ discard block |
||
49 | 46 | }; |
50 | 47 | |
51 | 48 | |
52 | -$status = function( $list, $key ) |
|
53 | -{ |
|
49 | +$status = function( $list, $key ) { |
|
54 | 50 | return ( isset( $list[$key] ) ? $list[$key] : '' ); |
55 | 51 | }; |
56 | 52 |
@@ -645,8 +645,7 @@ |
||
645 | 645 | { |
646 | 646 | $view->errors = array_merge( $view->get( 'errors', [] ), [$e->getMessage()] ); |
647 | 647 | return $this; |
648 | - } |
|
649 | - elseif( $e instanceof \Aimeos\MShop\Exception ) |
|
648 | + } elseif( $e instanceof \Aimeos\MShop\Exception ) |
|
650 | 649 | { |
651 | 650 | $view->errors = array_merge( $view->get( 'errors', [] ), [$i18n->dt( 'mshop', $e->getMessage() )] ); |
652 | 651 | return $this; |
@@ -360,9 +360,12 @@ |
||
360 | 360 | </select> |
361 | 361 | </div> |
362 | 362 | </div> |
363 | - <?php else : ?> |
|
363 | + <?php else { |
|
364 | + : ?> |
|
364 | 365 | <input class="item-type" type="hidden" |
365 | - name="<?= $enc->attr( $this->formparam( array( 'item', 'product.type' ) ) ); ?>" |
|
366 | + name="<?= $enc->attr( $this->formparam( array( 'item', 'product.type' ) ) ); |
|
367 | +} |
|
368 | +?>" |
|
366 | 369 | value="<?= $enc->attr( $types->firstKey() ) ?>" /> |
367 | 370 | <?php endif; ?> |
368 | 371 | <div class="form-group row mandatory"> |
@@ -133,9 +133,12 @@ |
||
133 | 133 | </select> |
134 | 134 | </div> |
135 | 135 | </div> |
136 | - <?php else : ?> |
|
136 | + <?php else { |
|
137 | + : ?> |
|
137 | 138 | <input class="item-type" type="hidden" |
138 | - name="<?= $enc->attr( $this->formparam( array( 'item', 'service.type' ) ) ); ?>" |
|
139 | + name="<?= $enc->attr( $this->formparam( array( 'item', 'service.type' ) ) ); |
|
140 | +} |
|
141 | +?>" |
|
139 | 142 | value="<?= $enc->attr( $types->getCode()->first() ) ?>" /> |
140 | 143 | <?php endif; ?> |
141 | 144 | <div class="form-group row mandatory"> |
@@ -133,9 +133,12 @@ |
||
133 | 133 | </select> |
134 | 134 | </div> |
135 | 135 | </div> |
136 | - <?php else : ?> |
|
136 | + <?php else { |
|
137 | + : ?> |
|
137 | 138 | <input class="item-type" type="hidden" |
138 | - name="<?= $enc->attr( $this->formparam( array( 'item', 'plugin.type' ) ) ); ?>" |
|
139 | + name="<?= $enc->attr( $this->formparam( array( 'item', 'plugin.type' ) ) ); |
|
140 | +} |
|
141 | +?>" |
|
139 | 142 | value="<?= $enc->attr( $types->getCode()->first() ) ?>" /> |
140 | 143 | <?php endif; ?> |
141 | 144 | <div class="form-group row mandatory"> |
@@ -445,8 +445,7 @@ |
||
445 | 445 | $listItem = \Aimeos\MShop::create( $context, 'product' )->createListItem(); |
446 | 446 | $item = $item->addListItem( 'attribute', $listItem->setType( 'custom' ), $attrItem ); |
447 | 447 | } |
448 | - } |
|
449 | - else |
|
448 | + } else |
|
450 | 449 | { |
451 | 450 | if( ( $litem = $item->getListItem( 'attribute', 'custom', $attrItem->getId(), false ) ) !== null ) { |
452 | 451 | $item = $item->deleteListItem( 'attribute', $litem ); |
@@ -5,8 +5,7 @@ discard block |
||
5 | 5 | * @copyright Aimeos (aimeos.org), 2016-2020 |
6 | 6 | */ |
7 | 7 | |
8 | -$price = function( \Aimeos\MShop\Order\Item\Iface $item, $priceFormat ) |
|
9 | -{ |
|
8 | +$price = function( \Aimeos\MShop\Order\Item\Iface $item, $priceFormat ) { |
|
10 | 9 | if( $order = $item->getBaseItem() ) |
11 | 10 | { |
12 | 11 | $price = 0; |
@@ -20,8 +19,7 @@ discard block |
||
20 | 19 | }; |
21 | 20 | |
22 | 21 | |
23 | -$name = function( \Aimeos\MShop\Order\Item\Iface $item ) |
|
24 | -{ |
|
22 | +$name = function( \Aimeos\MShop\Order\Item\Iface $item ) { |
|
25 | 23 | if( $order = $item->getBaseItem() ) |
26 | 24 | { |
27 | 25 | $type = \Aimeos\MShop\Order\Item\Base\Address\Base::TYPE_PAYMENT; |
@@ -39,8 +37,7 @@ discard block |
||
39 | 37 | }; |
40 | 38 | |
41 | 39 | |
42 | -$payment = function( \Aimeos\MShop\Order\Item\Iface $item ) |
|
43 | -{ |
|
40 | +$payment = function( \Aimeos\MShop\Order\Item\Iface $item ) { |
|
44 | 41 | if( $order = $item->getBaseItem() ) |
45 | 42 | { |
46 | 43 | $type = \Aimeos\MShop\Order\Item\Base\Service\Base::TYPE_PAYMENT; |
@@ -56,8 +53,7 @@ discard block |
||
56 | 53 | }; |
57 | 54 | |
58 | 55 | |
59 | -$status = function( array $list, $key ) |
|
60 | -{ |
|
56 | +$status = function( array $list, $key ) { |
|
61 | 57 | return ( isset( $list[$key] ) ? $list[$key] : '' ); |
62 | 58 | }; |
63 | 59 |
@@ -35,8 +35,11 @@ |
||
35 | 35 | <span class="navbar-label"> |
36 | 36 | <?php if( $this->get( 'itemData/locale.id' ) ) : ?> |
37 | 37 | <?= $enc->html( $this->get( 'itemData/locale.languageid' ) . '/' . $this->get( 'itemData/locale.currencyid' ) ); ?> |
38 | - <?php else : ?> |
|
39 | - <?= $enc->html( $this->translate( 'admin', 'New' ) ); ?> |
|
38 | + <?php else { |
|
39 | + : ?> |
|
40 | + <?= $enc->html( $this->translate( 'admin', 'New' ) ); |
|
41 | +} |
|
42 | +?> |
|
40 | 43 | <?php endif; ?> |
41 | 44 | </span> |
42 | 45 | <span class="navbar-site"><?= $enc->html( $this->site()->match( $this->get( 'itemData/locale.siteid' ) ) ); ?></span> |