darekm Posted February 28, 2015 Share Posted February 28, 2015 (edited) 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 February 28, 2015 by darekm (see edit history) Link to comment Share on other sites More sharing options...
fred-vinapresta Posted March 1, 2015 Share Posted March 1, 2015 Hi, hou can try: {if isset($feature)}....{/if} Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now