Jump to content

Edit History

ps8modules

ps8modules

Hello.
If you want to change it directly in the TPL, it is not a problem to add the condition.

./themes/your_theme/templates/catalog/_partials/product-flags.tpl

Sample for category id 3:

{block name='product_flags'}
    <ul class="product-flags js-product-flags">
        {if $category.id == '3'}
            <li class="product-flag new">{l s='discountinued' d='Shop.Theme.Catalog'}</li>
        {/if}
        {foreach from=$product.flags item=flag}
            <li class="product-flag {$flag.type}">{$flag.label}</li>
        {/foreach}
    </ul>
{/block}

result:

obrazek.png.0408ffde53fea892e89576942170bc9e.png

If you also want to do it with a module, that's no problem either.

ps8modules

ps8modules

Hello.
If you want to change it directly in the TPL, it is not a problem to add the condition.

./themes/your_theme/templates/catalog/_partials/product-flags.tpl

Sample for category id 3:

{block name='product_flags'}
    <ul class="product-flags js-product-flags">
        {if $category.id == '3'}
            <li class="product-flag new">{l s='discountinued' d='Shop.Theme.Catalog'}</li>
        {/if}
        {foreach from=$product.flags item=flag}
            <li class="product-flag {$flag.type}">{$flag.label}</li>
        {/foreach}
    </ul>
{/block}

result:

obrazek.png.0408ffde53fea892e89576942170bc9e.png

×
×
  • Create New...