@@ -50,15 +50,15 @@ |
||
| 50 | 50 | ?> |
| 51 | 51 | <?php if( isset( $this->detailProductItem ) ) : |
| 52 | 52 | |
| 53 | - // preselection of a variant product in a selection article |
|
| 54 | - $preSelectVariantAttributes = []; |
|
| 55 | - if ($this->param( 'productId' )): |
|
| 53 | + // preselection of a variant product in a selection article |
|
| 54 | + $preSelectVariantAttributes = []; |
|
| 55 | + if ($this->param( 'productId' )): |
|
| 56 | 56 | |
| 57 | - if(($listItem = $this->detailProductItem->getListItem( 'product', 'default', $this->param( 'productId' ))) && ( $product = $listItem->getRefItem() ) ): |
|
| 58 | - $preSelectVariantAttributes = $product->getRefItems( 'attribute', null, 'variant' )->col( 'attribute.id', 'attribute.type' ); |
|
| 59 | - endif; |
|
| 57 | + if(($listItem = $this->detailProductItem->getListItem( 'product', 'default', $this->param( 'productId' ))) && ( $product = $listItem->getRefItem() ) ): |
|
| 58 | + $preSelectVariantAttributes = $product->getRefItems( 'attribute', null, 'variant' )->col( 'attribute.id', 'attribute.type' ); |
|
| 59 | + endif; |
|
| 60 | 60 | |
| 61 | - endif; |
|
| 61 | + endif; |
|
| 62 | 62 | |
| 63 | 63 | ?> |
| 64 | 64 | |
@@ -52,9 +52,9 @@ discard block |
||
| 52 | 52 | |
| 53 | 53 | // preselection of a variant product in a selection article |
| 54 | 54 | $preSelectVariantAttributes = []; |
| 55 | - if ($this->param( 'productId' )): |
|
| 55 | + if( $this->param( 'productId' ) ): |
|
| 56 | 56 | |
| 57 | - if(($listItem = $this->detailProductItem->getListItem( 'product', 'default', $this->param( 'productId' ))) && ( $product = $listItem->getRefItem() ) ): |
|
| 57 | + if( ( $listItem = $this->detailProductItem->getListItem( 'product', 'default', $this->param( 'productId' ) ) ) && ( $product = $listItem->getRefItem() ) ): |
|
| 58 | 58 | $preSelectVariantAttributes = $product->getRefItems( 'attribute', null, 'variant' )->col( 'attribute.id', 'attribute.type' ); |
| 59 | 59 | endif; |
| 60 | 60 | |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | |
| 72 | 72 | <article class="product row <?= $this->detailProductItem->getConfigValue( 'css-class' ) ?>" |
| 73 | 73 | data-id="<?= $this->detailProductItem->getId() ?>" data-reqstock="<?= $reqstock ?>" |
| 74 | - data-preselectvariant="<?= $enc->attr($preSelectVariantAttributes)?>" |
|
| 74 | + data-preselectvariant="<?= $enc->attr( $preSelectVariantAttributes )?>" |
|
| 75 | 75 | |
| 76 | 76 | <div class="col-sm-6"> |
| 77 | 77 | |