This commit is contained in:
Roman Pyrih
2025-07-29 09:09:35 +02:00
parent 1bdabde72d
commit 8bb8cbead0
4 changed files with 70 additions and 18 deletions

View File

@@ -3,17 +3,15 @@
data-product="{$product.embedded_attributes|json_encode}"
role="tabpanel"
> *}
<div class="js-product-details tab-pane {if !$product.description} in active{/if}"
id="product-details"
data-product="{$product.embedded_attributes|json_encode}"
role="tabpanel"
>
<div class="js-product-details tab-pane {if !$product.description} in active{/if}" id="product-details"
data-product="{$product.embedded_attributes|json_encode}" role="tabpanel">
{block name='product_reference'}
{if isset($product_manufacturer->id)}
<div class="product-manufacturer">
{if isset($manufacturer_image_url)}
<a href="{$product_brand_url}">
<img src="{$manufacturer_image_url}" class="img img-fluid manufacturer-logo" alt="{$product_manufacturer->name}" loading="lazy">
<img src="{$manufacturer_image_url}" class="img img-fluid manufacturer-logo" alt="{$product_manufacturer->name}"
loading="lazy">
</a>
{else}
<label class="label">{l s='Brand' d='Shop.Theme.Catalog'}</label>
@@ -35,7 +33,8 @@
{if $product.show_quantities}
<div class="product-quantities">
<label class="label">{l s='In stock' d='Shop.Theme.Catalog'}</label>
<span data-stock="{$product.quantity}" data-allow-oosp="{$product.allow_oosp}">{$product.quantity} {$product.quantity_label}</span>
<span data-stock="{$product.quantity}" data-allow-oosp="{$product.allow_oosp}">{$product.quantity}
{$product.quantity_label}</span>
</div>
{/if}
{/block}
@@ -70,16 +69,42 @@
{/block}
{* if product have specific references, a table will be added to product details section *}
{block name='product_specific_references'}
{* {block name='product_specific_references'}
{if !empty($product.specific_references)}
<section class="product-features">
<p class="h6">
{l s='Specific References' d='Shop.Theme.Catalog'}</p>
<dl class="data-sheet">
{foreach from=$product.specific_references item=reference key=key}
<dt class="name {$key}">{$key}</dt>
<dd class="value {$key}">{$reference}</dd>
{/foreach}
</dl>
</section>
{/if}
{/block} *}
{block name='product_specific_references'}
{assign var='filtered_references' value=[]}
{foreach from=$product.specific_references item=reference key=key}
{if $key != 'ean13'}
{assign var='filtered_references' value=$filtered_references|@array_merge:[$key => $reference]}
{/if}
{/foreach}
{if !empty($filtered_references)}
<section class="product-features">
<p class="h6">{l s='Specific References' d='Shop.Theme.Catalog'}</p>
<dl class="data-sheet">
{foreach from=$product.specific_references item=reference key=key}
<dt class="name">{$key}</dt>
<dd class="value">{$reference}</dd>
{/foreach}
</dl>
<dl class="data-sheet">
{foreach from=$filtered_references item=reference key=key}
<dt class="name {$key}">{$key}</dt>
<dd class="value {$key}">{$reference}</dd>
{/foreach}
</dl>
</section>
{/if}
{/block}
@@ -88,9 +113,9 @@
{if $product.condition}
<div class="product-condition">
<label class="label">{l s='Condition' d='Shop.Theme.Catalog'} </label>
<link href="{$product.condition.schema_url}"/>
<link href="{$product.condition.schema_url}" />
<span>{$product.condition.label}</span>
</div>
{/if}
{/block}
</div>
</div>