@@ -82,8 +82,7 @@ discard block |
||
| 82 | 82 | foreach( $manager->search( $search ) as $item ) { |
| 83 | 83 | $this->listTypes[$item->getCode()] = $item->getCode(); |
| 84 | 84 | } |
| 85 | - } |
|
| 86 | - else |
|
| 85 | + } else |
|
| 87 | 86 | { |
| 88 | 87 | $this->listTypes = array_flip( $this->listTypes ); |
| 89 | 88 | } |
@@ -147,8 +146,7 @@ discard block |
||
| 147 | 146 | { |
| 148 | 147 | $listItem = $listMap[$code][$attrType][$listtype]; |
| 149 | 148 | unset( $listItems[$listItem->getId()] ); |
| 150 | - } |
|
| 151 | - else |
|
| 149 | + } else |
|
| 152 | 150 | { |
| 153 | 151 | $listItem = $manager->createListItem()->setType( $listtype ); |
| 154 | 152 | } |
@@ -81,8 +81,7 @@ discard block |
||
| 81 | 81 | foreach( $manager->search( $search ) as $item ) { |
| 82 | 82 | $this->listTypes[$item->getCode()] = $item->getCode(); |
| 83 | 83 | } |
| 84 | - } |
|
| 85 | - else |
|
| 84 | + } else |
|
| 86 | 85 | { |
| 87 | 86 | $this->listTypes = array_flip( $this->listTypes ); |
| 88 | 87 | } |
@@ -159,8 +158,7 @@ discard block |
||
| 159 | 158 | $listItem = $listMap[$url][$type][$listtype]; |
| 160 | 159 | $refItem = $listItem->getRefItem(); |
| 161 | 160 | unset( $listItems[$listItem->getId()] ); |
| 162 | - } |
|
| 163 | - else |
|
| 161 | + } else |
|
| 164 | 162 | { |
| 165 | 163 | $listItem = $manager->createListItem()->setType( $listtype ); |
| 166 | 164 | $refItem = $refManager->create()->setType( $type ); |
@@ -81,8 +81,7 @@ discard block |
||
| 81 | 81 | foreach( $manager->search( $search ) as $item ) { |
| 82 | 82 | $this->listTypes[$item->getCode()] = $item->getCode(); |
| 83 | 83 | } |
| 84 | - } |
|
| 85 | - else |
|
| 84 | + } else |
|
| 86 | 85 | { |
| 87 | 86 | $this->listTypes = array_flip( $this->listTypes ); |
| 88 | 87 | } |
@@ -138,8 +137,7 @@ discard block |
||
| 138 | 137 | $listItem = $listMap[$content][$type][$listtype]; |
| 139 | 138 | $refItem = $listItem->getRefItem(); |
| 140 | 139 | unset( $listItems[$listItem->getId()] ); |
| 141 | - } |
|
| 142 | - else |
|
| 140 | + } else |
|
| 143 | 141 | { |
| 144 | 142 | $listItem = $manager->createListItem()->setType( $listtype ); |
| 145 | 143 | $refItem = $refManager->create()->setType( $type ); |
@@ -81,8 +81,7 @@ |
||
| 81 | 81 | foreach( $manager->search( $search ) as $item ) { |
| 82 | 82 | $this->listTypes[$item->getCode()] = $item->getCode(); |
| 83 | 83 | } |
| 84 | - } |
|
| 85 | - else |
|
| 84 | + } else |
|
| 86 | 85 | { |
| 87 | 86 | $this->listTypes = array_flip( $this->listTypes ); |
| 88 | 87 | } |
@@ -530,9 +530,11 @@ |
||
| 530 | 530 | $map = $this->getMappedChunk( $list, $mapping ); |
| 531 | 531 | $product = $products->get( trim( $code ) ) ?: $manager->create(); |
| 532 | 532 | |
| 533 | - if( isset( $map[0] ) ) // there can only be one chunk for the base product data |
|
| 533 | + if( isset( $map[0] ) ) { |
|
| 534 | + // there can only be one chunk for the base product data |
|
| 534 | 535 | { |
| 535 | 536 | $type = $this->checkType( $this->val( $map[0], 'product.type', $product->getType() ) ); |
| 537 | + } |
|
| 536 | 538 | $map[0]['product.config'] = json_decode( $map[0]['product.config'] ?? '[]', true ) ?: []; |
| 537 | 539 | |
| 538 | 540 | $product = $product->fromArray( $map[0], true ); |