Jump to content

how to make a category if statement in the product-list.tpl


Recommended Posts

Hello everyone. i'm trying to make an if statement in the product-list.tpl and i made this code

 

{if ($category->name|escape:'htmlall':'UTF-8' = "Xbox 360 Games") || ($category->name|escape:'htmlall':'UTF-8' = "Playstation 3 Games") }

do this if is true

{/if}

 

 

but is not working. what i'm doing wrong?

 

 

thank you

Link to comment
Share on other sites

Hi.

 

You are using the assignment operator: = and not the comparison operator: ==

 

Regards.

 

Robin.

 

The CartExpert Team

 

so my statement should be like this

if ($category->name|escape:'htmlall':'UTF-8' == "Xbox 360 Games") ?

Edited by giwrgos (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...