@@ -706,7 +706,7 @@ |
||
| 706 | 706 | |
| 707 | 707 | try { |
| 708 | 708 | $stmt->execute()->finish(); |
| 709 | - } catch( \Aimeos\Base\DB\Exception $e ) { ; } // Ignore duplicates |
|
| 709 | + } catch( \Aimeos\Base\DB\Exception $e ) {; } // Ignore duplicates |
|
| 710 | 710 | } |
| 711 | 711 | } |
| 712 | 712 | } |
@@ -682,9 +682,13 @@ |
||
| 682 | 682 | $stmt->bind( 4, $context->datetime() ); // mtime |
| 683 | 683 | $stmt->bind( 5, $siteid ); |
| 684 | 684 | |
| 685 | - try { |
|
| 685 | + try |
|
| 686 | + { |
|
| 686 | 687 | $stmt->execute()->finish(); |
| 687 | - } catch( \Aimeos\Base\DB\Exception $e ) { ; } // Ignore duplicates |
|
| 688 | + } |
|
| 689 | + catch( \Aimeos\Base\DB\Exception $e ) |
|
| 690 | + { |
|
| 691 | +; } // Ignore duplicates |
|
| 688 | 692 | } |
| 689 | 693 | } |
| 690 | 694 | } |
@@ -140,8 +140,7 @@ |
||
| 140 | 140 | foreach( $cond->getExpressions() as $expr ) { |
| 141 | 141 | $list = array_merge( $list, $this->getProductIds( $expr ) ); |
| 142 | 142 | } |
| 143 | - } |
|
| 144 | - elseif( $cond instanceof \Aimeos\Base\Criteria\Expression\Compare\Iface ) |
|
| 143 | + } elseif( $cond instanceof \Aimeos\Base\Criteria\Expression\Compare\Iface ) |
|
| 145 | 144 | { |
| 146 | 145 | if( $cond->getName() === 'stock.productid' && $cond->getOperator() === '==' ) { |
| 147 | 146 | $list = array_merge( $list, (array) $cond->getValue() ); |
@@ -307,8 +307,7 @@ |
||
| 307 | 307 | */ |
| 308 | 308 | $path = 'madmin/job/manager/insert'; |
| 309 | 309 | $sql = $this->addSqlColumns( array_keys( $columns ), $this->getSqlConfig( $path ) ); |
| 310 | - } |
|
| 311 | - else |
|
| 310 | + } else |
|
| 312 | 311 | { |
| 313 | 312 | /** madmin/job/manager/update/mysql |
| 314 | 313 | * Updates an existing job record in the database |
@@ -619,8 +619,7 @@ |
||
| 619 | 619 | */ |
| 620 | 620 | $path = 'mshop/customer/manager/insert'; |
| 621 | 621 | $sql = $this->addSqlColumns( array_keys( $columns ), $this->getSqlConfig( $path ) ); |
| 622 | - } |
|
| 623 | - else |
|
| 622 | + } else |
|
| 624 | 623 | { |
| 625 | 624 | /** mshop/customer/manager/update/mysql |
| 626 | 625 | * Updates an existing customer record in the database |
@@ -60,8 +60,7 @@ |
||
| 60 | 60 | $sort = 'mindte_ft.RANK * mpro."boost"'; |
| 61 | 61 | |
| 62 | 62 | $func = $this->getFunctionRelevance(); |
| 63 | - } |
|
| 64 | - else |
|
| 63 | + } else |
|
| 65 | 64 | { |
| 66 | 65 | $search = ':site AND mindte."langid" = $1 AND CHARINDEX( $2, content )'; |
| 67 | 66 | $sort = '-CHARINDEX( $2, content ) * mpro."boost"'; |
@@ -133,9 +133,11 @@ |
||
| 133 | 133 | $code = $orderProduct->getProductCode(); |
| 134 | 134 | $prodMap[$code] = ( $prodMap[$code] ?? 0 ) + $orderProduct->getQuantity(); |
| 135 | 135 | |
| 136 | - foreach( $orderProduct->getProducts() as $prodItem ) // calculate bundled products |
|
| 136 | + foreach( $orderProduct->getProducts() as $prodItem ) { |
|
| 137 | + // calculate bundled products |
|
| 137 | 138 | { |
| 138 | 139 | $code = $prodItem->getProductCode(); |
| 140 | + } |
|
| 139 | 141 | $prodMap[$code] = ( $prodMap[$code] ?? 0 ) + $prodItem->getQuantity(); |
| 140 | 142 | } |
| 141 | 143 | } |
@@ -270,9 +270,13 @@ discard block |
||
| 270 | 270 | */ |
| 271 | 271 | public function create( array $values = [] ) : \Aimeos\MShop\Common\Item\Iface |
| 272 | 272 | { |
| 273 | - try { |
|
| 273 | + try |
|
| 274 | + { |
|
| 274 | 275 | $values['log.siteid'] = $values['log.siteid'] ?? $this->context()->locale()->getSiteId(); |
| 275 | - } catch( \Exception $e ) {} // if no locale item is available |
|
| 276 | + } |
|
| 277 | + catch( \Exception $e ) |
|
| 278 | + { |
|
| 279 | +} // if no locale item is available |
|
| 276 | 280 | |
| 277 | 281 | return $this->createItemBase( $values ); |
| 278 | 282 | } |
@@ -449,9 +453,12 @@ discard block |
||
| 449 | 453 | return $item; |
| 450 | 454 | } |
| 451 | 455 | |
| 452 | - try { |
|
| 456 | + try |
|
| 457 | + { |
|
| 453 | 458 | $siteid = $this->context()->locale()->getSiteId(); |
| 454 | - } catch( \Exception $e ) { |
|
| 459 | + } |
|
| 460 | + catch( \Exception $e ) |
|
| 461 | + { |
|
| 455 | 462 | $siteid = ''; |
| 456 | 463 | } |
| 457 | 464 | |
@@ -498,8 +505,7 @@ discard block |
||
| 498 | 505 | */ |
| 499 | 506 | $path = 'madmin/log/manager/insert'; |
| 500 | 507 | $sql = $this->addSqlColumns( array_keys( $columns ), $this->getSqlConfig( $path ) ); |
| 501 | - } |
|
| 502 | - else |
|
| 508 | + } else |
|
| 503 | 509 | { |
| 504 | 510 | /** madmin/log/manager/update/mysql |
| 505 | 511 | * Updates an existing log record in the database |
@@ -102,16 +102,19 @@ |
||
| 102 | 102 | |
| 103 | 103 | if( $siteId ) |
| 104 | 104 | { |
| 105 | - if( in_array( $siteId, $siteIds ) ) // if product is inherited, inherit price too |
|
| 105 | + if( in_array( $siteId, $siteIds ) ) { |
|
| 106 | + // if product is inherited, inherit price too |
|
| 106 | 107 | { |
| 107 | 108 | if( !in_array( $priceItem->getSiteId(), $siteIds ) ) { |
| 108 | 109 | continue; |
| 109 | - } |
|
| 110 | 110 | } |
| 111 | - elseif( $priceItem->getSiteId() !== $siteId ) // Use price from specific site originally passed as parameter |
|
| 111 | + } |
|
| 112 | + } elseif( $priceItem->getSiteId() !== $siteId ) { |
|
| 113 | + // Use price from specific site originally passed as parameter |
|
| 112 | 114 | { |
| 113 | 115 | continue; |
| 114 | 116 | } |
| 117 | + } |
|
| 115 | 118 | } |
| 116 | 119 | |
| 117 | 120 | $qty = (string) $priceItem->getQuantity(); |
@@ -44,9 +44,12 @@ |
||
| 44 | 44 | |
| 45 | 45 | foreach( $data as $entry ) |
| 46 | 46 | { |
| 47 | - try { |
|
| 47 | + try |
|
| 48 | + { |
|
| 48 | 49 | $manager->find( $entry['catalog.code'] ); |
| 49 | - } catch( \Exception $e ) { |
|
| 50 | + } |
|
| 51 | + catch( \Exception $e ) |
|
| 52 | + { |
|
| 50 | 53 | $manager->insert( $manager->create()->fromArray( $entry ) ); |
| 51 | 54 | } |
| 52 | 55 | } |