Quote:
Originally Posted by qrichou
Hi,
Does anyone know if you can use like with smarty?
We want to say {if $products[product].productcode like "C-"}do this{else}dothis{/if}
Thanks
|
[code]
{assign var="truncCode" value=$products[product].productcode|truncate:2:""}
{if $truncCode eq "C-"}do this{else}do this instead{/if}
{/code}