View Single Post
  #1  
Old 01-17-2011, 06:07 AM
 
Fascinations Fascinations is offline
 

Member
  
Join Date: Dec 2010
Posts: 16
 

Default Displaying Extra Fields using "if" statements

I am trying to use extra fields on my product page. I want to be able to call each extra field individually in different locations and only show them if there is a "value" for that particular extra field.

For example: I have an extra field called "texture", it is the 3rd field from the top (so it is number "2"), below you will see the code I am using, it works just fine to show the field and it's value, but it doesn't go away when the field is left blank like I want it to. Does anyone have an idea what I am doing wrong here? Any feedback is appreciated. Thanks!

Code:
{section name=texture} {if $extra_fields[texture].active eq "Y" && $extra_fields[texture].field_value} <strong>{$extra_fields[2].field}:</strong> {$extra_fields[2].field_value} {/if} {/section}
__________________
X-Cart Pro 4.4
Reply With Quote