@@ -21,8 +21,7 @@ discard block |
||
| 21 | 21 | */ |
| 22 | 22 | |
| 23 | 23 | |
| 24 | -$pgroup = function( array $params, $group ) |
|
| 25 | -{ |
|
| 24 | +$pgroup = function( array $params, $group ) { |
|
| 26 | 25 | if( $group != null ) { |
| 27 | 26 | return [$group => ['page' => $params]]; |
| 28 | 27 | } |
@@ -55,8 +54,7 @@ discard block |
||
| 55 | 54 | } else { |
| 56 | 55 | $key = 'admin/jqadm/url/create'; |
| 57 | 56 | } |
| 58 | -} |
|
| 59 | -else |
|
| 57 | +} else |
|
| 60 | 58 | { |
| 61 | 59 | $key = 'admin/jqadm/url/search'; |
| 62 | 60 | } |
@@ -54,8 +54,7 @@ |
||
| 54 | 54 | } else { |
| 55 | 55 | $cfgkey = 'admin/jqadm/url/create'; |
| 56 | 56 | } |
| 57 | -} |
|
| 58 | -else |
|
| 57 | +} else |
|
| 59 | 58 | { |
| 60 | 59 | $cfgkey = 'admin/jqadm/url/search'; |
| 61 | 60 | } |
@@ -29,7 +29,8 @@ discard block |
||
| 29 | 29 | <span class="navbar-label"> |
| 30 | 30 | <?php if( $this->get( 'itemData/subscription.id' ) ) : ?> |
| 31 | 31 | <?= $enc->html( $this->get( 'itemData/subscription.datenext' ) . ' ' . $this->get( 'itemData/subscription.interval' ) ) ?> |
| 32 | - <?php else : ?> |
|
| 32 | + <?php else { |
|
| 33 | + : ?> |
|
| 33 | 34 | <?= $enc->html( $this->translate( 'admin', 'New' ) ) ?> |
| 34 | 35 | <?php endif ?> |
| 35 | 36 | </span> |
@@ -188,6 +189,7 @@ discard block |
||
| 188 | 189 | <?php |
| 189 | 190 | /// Price format with price value (%1$s) and currency (%2$s) |
| 190 | 191 | $priceFormat = $this->translate( 'client/code', '%1$s %2$s' ); |
| 192 | +} |
|
| 191 | 193 | $currency = $this->translate( 'currency', $order->getPrice()->getCurrencyId() ); |
| 192 | 194 | ?> |
| 193 | 195 | |
@@ -287,9 +287,12 @@ discard block |
||
| 287 | 287 | { |
| 288 | 288 | $manager = \Aimeos\MShop::create( $this->context(), 'attribute' ); |
| 289 | 289 | |
| 290 | - try { |
|
| 290 | + try |
|
| 291 | + { |
|
| 291 | 292 | return $manager->find( 'custom', [], 'product', 'price' ); |
| 292 | - } catch( \Aimeos\MShop\Exception $e ) { |
|
| 293 | + } |
|
| 294 | + catch( \Aimeos\MShop\Exception $e ) |
|
| 295 | + { |
|
| 293 | 296 | return $manager->save( $manager->create()->setDomain( 'product' )->setType( 'price' )->setCode( 'custom' ) ); |
| 294 | 297 | } |
| 295 | 298 | } |
@@ -458,8 +461,7 @@ discard block |
||
| 458 | 461 | $listItem = \Aimeos\MShop::create( $this->context(), 'product' )->createListItem(); |
| 459 | 462 | $item = $item->addListItem( 'attribute', $listItem->setType( 'custom' ), $attrItem ); |
| 460 | 463 | } |
| 461 | - } |
|
| 462 | - else |
|
| 464 | + } else |
|
| 463 | 465 | { |
| 464 | 466 | if( ( $litem = $item->getListItem( 'attribute', 'custom', $attrItem->getId(), false ) ) !== null ) { |
| 465 | 467 | $item = $item->deleteListItem( 'attribute', $litem ); |
@@ -381,8 +381,7 @@ |
||
| 381 | 381 | $list['product.code'] = $list['product.code'] . '_' . substr( md5( microtime( true ) ), -5 ); |
| 382 | 382 | |
| 383 | 383 | $list['stock.stocklevel'] = 0; |
| 384 | - } |
|
| 385 | - else |
|
| 384 | + } else |
|
| 386 | 385 | { |
| 387 | 386 | $list = array_merge( $list, $refItem->getStockItems( 'default' )->first( map() )->toArray() ); |
| 388 | 387 | } |
@@ -291,8 +291,7 @@ |
||
| 291 | 291 | $propItem->setValue( $value ); |
| 292 | 292 | |
| 293 | 293 | $item->addPropertyItem( $propItem ); |
| 294 | - } |
|
| 295 | - else |
|
| 294 | + } else |
|
| 296 | 295 | { |
| 297 | 296 | $item->deletePropertyItems( $propItems ); |
| 298 | 297 | } |
@@ -86,7 +86,8 @@ discard block |
||
| 86 | 86 | <?php if( $logos = $this->get( 'itemData/locale.site.logo' ) ) : ?> |
| 87 | 87 | <img class="item-preview" |
| 88 | 88 | src="<?= $enc->attr( $this->content( end( $logos ) ) ) ?>"> |
| 89 | - <?php else : ?> |
|
| 89 | + <?php else { |
|
| 90 | + : ?> |
|
| 90 | 91 | <p class="item-preview"> |
| 91 | 92 | <?= $enc->html( $this->translate( 'admin', 'Upload shop logo' ) ) ?> |
| 92 | 93 | </p> |
@@ -100,7 +101,9 @@ discard block |
||
| 100 | 101 | <div class="box"> |
| 101 | 102 | |
| 102 | 103 | <div class="form-group media-preview"> |
| 103 | - <input class="fileupload" type="file" tabindex="<?= $this->get( 'tabindex', 1 ); ?>" |
|
| 104 | + <input class="fileupload" type="file" tabindex="<?= $this->get( 'tabindex', 1 ); |
|
| 105 | +} |
|
| 106 | +?>" |
|
| 104 | 107 | name="<?= $enc->attr( $this->formparam( ['media', 'icon'] ) ) ?>"> |
| 105 | 108 | <?php if( $icon = $this->get( 'itemData/locale.site.icon' ) ) : ?> |
| 106 | 109 | <img class="item-preview" |
@@ -5,8 +5,7 @@ discard block |
||
| 5 | 5 | * @copyright Aimeos (aimeos.org), 2016-2025 |
| 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 | $price = 0; |
| 11 | 10 | |
| 12 | 11 | foreach( $item->getProducts() as $product ) |
@@ -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 | $type = \Aimeos\MShop\Order\Item\Address\Base::TYPE_PAYMENT; |
| 26 | 24 | |
| 27 | 25 | if( ( $address = current( $item->getAddress( $type ) ) ) === false ) { |
@@ -32,8 +30,7 @@ discard block |
||
| 32 | 30 | }; |
| 33 | 31 | |
| 34 | 32 | |
| 35 | -$payment = function( \Aimeos\MShop\Order\Item\Iface $item ) |
|
| 36 | -{ |
|
| 33 | +$payment = function( \Aimeos\MShop\Order\Item\Iface $item ) { |
|
| 37 | 34 | $codes = []; |
| 38 | 35 | $type = \Aimeos\MShop\Order\Item\Service\Base::TYPE_PAYMENT; |
| 39 | 36 | |
@@ -45,8 +42,7 @@ discard block |
||
| 45 | 42 | }; |
| 46 | 43 | |
| 47 | 44 | |
| 48 | -$status = function( array $list, $key ) |
|
| 49 | -{ |
|
| 45 | +$status = function( array $list, $key ) { |
|
| 50 | 46 | return ( isset( $list[$key] ) ? $list[$key] : '' ); |
| 51 | 47 | }; |
| 52 | 48 | |
@@ -5,15 +5,13 @@ discard block |
||
| 5 | 5 | * @copyright Aimeos (aimeos.org), 2017-2025 |
| 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 | $price = $item->getPrice(); |
| 11 | 10 | return sprintf( $priceFormat, $price->getValue(), $price->getCurrencyId() ); |
| 12 | 11 | }; |
| 13 | 12 | |
| 14 | 13 | |
| 15 | -$name = function( \Aimeos\MShop\Order\Item\Iface $item ) |
|
| 16 | -{ |
|
| 14 | +$name = function( \Aimeos\MShop\Order\Item\Iface $item ) { |
|
| 17 | 15 | $addresses = $item->getAddresses(); |
| 18 | 16 | |
| 19 | 17 | if( !isset( $addresses[\Aimeos\MShop\Order\Item\Address\Base::TYPE_PAYMENT] ) ) { |
@@ -30,8 +28,7 @@ discard block |
||
| 30 | 28 | }; |
| 31 | 29 | |
| 32 | 30 | |
| 33 | -$payment = function( \Aimeos\MShop\Order\Item\Iface $item ) |
|
| 34 | -{ |
|
| 31 | +$payment = function( \Aimeos\MShop\Order\Item\Iface $item ) { |
|
| 35 | 32 | $services = $item->getServices(); |
| 36 | 33 | |
| 37 | 34 | if( isset( $services[\Aimeos\MShop\Order\Item\Service\Base::TYPE_PAYMENT] ) ) { |
@@ -40,8 +37,7 @@ discard block |
||
| 40 | 37 | }; |
| 41 | 38 | |
| 42 | 39 | |
| 43 | -$status = function( $list, $key ) |
|
| 44 | -{ |
|
| 40 | +$status = function( $list, $key ) { |
|
| 45 | 41 | return ( isset( $list[$key] ) ? $list[$key] : '' ); |
| 46 | 42 | }; |
| 47 | 43 | |