Jump to content

Smarty accessing Product Features by name


EMK

Recommended Posts

Hi all,

In a template (tpl) I want to access the Product Features directly using the Feature Name.

Right now I am doing this which is definitely not ideal (I want to access the Feature Value for the Feature Name 'meta_Product_Desc'):

{foreach from=$product.features item=feature}
     {if $feature.name == 'meta_Product_Desc'}                   
            // Do something with {$feature.value}
     {/if}
{/foreach}

Is there a shorthand way for example $product.features['meta_Product_Desc'] (Which I tried and didn't work)?

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...