0
Hellou, I need put regex ^.gold|Gold|GOLD. in product.tpl (thirtybees 1.0.8) and check if product name consist gold or Gold or GOLD. If product name consist in product name for example Anchor blue Gold then I need create product flag. Is there possible? I try it, but function is not working correctly.
{if (preg_match('^.*gold|gold|GOLD.*', {$product->name|escape:'html':'UTF-8'}))}
<span class="new-box">
<span class="zlato-label">GOLD 24K</span>
{elseif(preg_match('^.*rosegold|Rosegold|ROSEGOLD.*', {$product->name|escape:'html':'UTF-8'}))}
<span class="new-box">
<span class="zlato-label">Rose GOLD 24K</span>
{else}
<span class="new-box">
<span class="new-label">Nothing</span>
{/if}