@@ -625,25 +625,25 @@ |
||
| 625 | 625 | // preselection of a variant in a selection article |
| 626 | 626 | if (isset($_GET['productId']) && is_numeric($_GET['productId'])): |
| 627 | 627 | |
| 628 | - foreach( $this->detailProductItem->getRefItems( 'product', null, 'default' ) as $prodid => $product ) : |
|
| 628 | + foreach( $this->detailProductItem->getRefItems( 'product', null, 'default' ) as $prodid => $product ) : |
|
| 629 | 629 | |
| 630 | - if ($prodid == $_GET['productId']): |
|
| 630 | + if ($prodid == $_GET['productId']): |
|
| 631 | 631 | |
| 632 | - $attributes = $product->getRefItems('attribute',null,'variant'); |
|
| 633 | - $js = ''; |
|
| 634 | - foreach($attributes as $attribId => $attribute): |
|
| 635 | - $js .= '"' . $attribute->getType() . '": "' . $attribute->getId() . '", |
|
| 632 | + $attributes = $product->getRefItems('attribute',null,'variant'); |
|
| 633 | + $js = ''; |
|
| 634 | + foreach($attributes as $attribId => $attribute): |
|
| 635 | + $js .= '"' . $attribute->getType() . '": "' . $attribute->getId() . '", |
|
| 636 | 636 | '; |
| 637 | - endforeach; |
|
| 637 | + endforeach; |
|
| 638 | 638 | |
| 639 | - if (!empty($js)): ?> |
|
| 639 | + if (!empty($js)): ?> |
|
| 640 | 640 | <script> |
| 641 | 641 | AimeosVariantSelectionProduct = {"prodId": "<?= $this->detailProductItem->getId() ?>", "attributes": {<?= $js ?>}}; |
| 642 | 642 | </script> |
| 643 | 643 | |
| 644 | 644 | <?php endif; |
| 645 | - endif; |
|
| 646 | - endforeach; |
|
| 645 | + endif; |
|
| 646 | + endforeach; |
|
| 647 | 647 | endif; |
| 648 | 648 | |
| 649 | 649 | ?> |
@@ -623,20 +623,20 @@ |
||
| 623 | 623 | |
| 624 | 624 | <?php |
| 625 | 625 | // preselection of a variant in a selection article |
| 626 | -if (isset($_GET['productId']) && is_numeric($_GET['productId'])): |
|
| 626 | +if( isset( $_GET['productId'] ) && is_numeric( $_GET['productId'] ) ): |
|
| 627 | 627 | |
| 628 | 628 | foreach( $this->detailProductItem->getRefItems( 'product', null, 'default' ) as $prodid => $product ) : |
| 629 | 629 | |
| 630 | - if ($prodid == $_GET['productId']): |
|
| 630 | + if( $prodid == $_GET['productId'] ): |
|
| 631 | 631 | |
| 632 | - $attributes = $product->getRefItems('attribute',null,'variant'); |
|
| 632 | + $attributes = $product->getRefItems( 'attribute', null, 'variant' ); |
|
| 633 | 633 | $js = ''; |
| 634 | - foreach($attributes as $attribId => $attribute): |
|
| 635 | - $js .= '"' . $attribute->getType() . '": "' . $attribute->getId() . '", |
|
| 634 | + foreach( $attributes as $attribId => $attribute ): |
|
| 635 | + $js .= '"' . $attribute->getType() . '": "' . $attribute->getId() . '", |
|
| 636 | 636 | '; |
| 637 | 637 | endforeach; |
| 638 | 638 | |
| 639 | - if (!empty($js)): ?> |
|
| 639 | + if( !empty( $js ) ): ?> |
|
| 640 | 640 | <script> |
| 641 | 641 | AimeosVariantSelectionProduct = {"prodId": "<?= $this->detailProductItem->getId() ?>", "attributes": {<?= $js ?>}}; |
| 642 | 642 | </script> |