View Single Post
  #3  
Old 06-12-2014, 01:51 PM
  drheath's Avatar 
drheath drheath is offline
 

Advanced Member
  
Join Date: Nov 2010
Location: Wisconsin
Posts: 53
 

Default Re: 4.6 Change in Extra Fields IF Statement

Thanks Steve. We have used this mod for several versions and to be honest I have not thought to really dig too much into it since it worked. Though, if $extra_fields.x.field_value is only referring to the array position and not the field id, I'm not really sure how it worked in the past since we do not use all fields for all products.

Either way, I modified the syntax to call the service_name instead as shown below. I cannot use the extra_fileds product.tpl as is because we have a different output for the same field in different situations. It seems to me that there must be a more efficient way to do this through variable assignment so I could call a generic template file that would allow me to customize the output based on the call. But perhaps it would be more effort than it is worth.

Code:
{foreach from=$extra_fields item=v} {if $v.service_name eq "Hazardous" and $v.field_value} {$lng.lbl_haz_prod} </div> {/if} {/foreach}
__________________
Business Edition 5.2.10
Gold Plus 4.6.1
Reply With Quote