Jump to content

How to check if a feature is defined?


darekm

Recommended Posts

Hi, I would like to determine if a feature has been set for the product via smarty. 

I used to do that like this:

{foreach from=$features item=feature}  {if $feature.name == 'is_credit'}


    SOMETHING


{/if} 
{/foreach}

But this time I need a if/else check to determine if a variable exists; not by going through them one by one.

 

Like this:

 

{if this feature is set}

do that

{else}

do something else

{/if}

 

 

Is it supposed to be something like feature.isset? 

I'm talking about the product.tpl file.

 
Help!
Thanks. 
Edited by darekm (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...