forked from brooksbingham/theme-elegance
refactor: conditionally show product features section
parent
85f4791aee
commit
6dbaef394c
|
@ -1,25 +1,17 @@
|
||||||
<div class="w-full" id="product-details">
|
{block name='product_features'}
|
||||||
|
{if $product.grouped_features}
|
||||||
{block name='product_features'}
|
<div class='w-full flex items-center flex-col'>
|
||||||
{if $product.grouped_features}
|
<h1 class='text-base font-semibold text-gray-600'>
|
||||||
|
Description
|
||||||
|
</h1>
|
||||||
<ul class="product-features list-[square] w-full">
|
<ul class="product-features list-[square] w-full">
|
||||||
{foreach from=$product.grouped_features item=feature}
|
{foreach from=$product.grouped_features item=feature}
|
||||||
<li>
|
<li>
|
||||||
<span class="name inline-flex w-40 font-semibold">{$feature.name}</span>
|
<span class="name inline-flex w-40 font-semibold">{$feature.name}</span>
|
||||||
<span class="value">{$feature.value|escape:'htmlall'|nl2br nofilter}</span>
|
<span class="value">{$feature.value|escape:'htmlall'|nl2br nofilter}</span>
|
||||||
</li>
|
</li>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</ul>
|
</ul>
|
||||||
{/if}
|
</div>
|
||||||
{/block}
|
{/if}
|
||||||
|
{/block}
|
||||||
{block name='product_condition'}
|
|
||||||
{if $product.condition}
|
|
||||||
<div class="product-condition">
|
|
||||||
<label class="label">{l s='Condition' d='Shop.Theme.Catalog'} </label>
|
|
||||||
<link itemprop="itemCondition" href="{$product.condition.schema_url}"/>
|
|
||||||
<span>{$product.condition.label}</span>
|
|
||||||
</div>
|
|
||||||
{/if}
|
|
||||||
{/block}
|
|
||||||
</div>
|
|
||||||
|
|
|
@ -137,9 +137,6 @@
|
||||||
|
|
||||||
{block name='product_tabs'}
|
{block name='product_tabs'}
|
||||||
<div class='w-full flex items-center flex-col mt-12'>
|
<div class='w-full flex items-center flex-col mt-12'>
|
||||||
<h1 class='text-base font-semibold text-gray-600'>
|
|
||||||
Description
|
|
||||||
</h1>
|
|
||||||
{block name='product_details'}
|
{block name='product_details'}
|
||||||
{include file='catalog/_partials/product-details.tpl'}
|
{include file='catalog/_partials/product-details.tpl'}
|
||||||
{/block}
|
{/block}
|
||||||
|
|
Loading…
Reference in New Issue