Search code examples
prestashopsmartyprestashop-1.6

Smarty OR statement


This is working:

{if $filter.id_key='68'}

This doesn't:

{if ($filter.id_key='68' || $filter.id_key='63')}

Not sure what's wrong here (tried also without the round brackets). There are plenty of examples of the same OR statement in the same file.


Solution

  • In {if $filter.id_key='68'} you are assigning 68 to $filter.id_key, so it's always true. You should use double equal ==:

    {if ($filter.id_key == '68' || $filter.id_key == '63')}