View Single Post
  #23  
Old 02-24-2009, 08:54 AM
 
ChristineP ChristineP is offline
 

eXpert
  
Join Date: Jul 2008
Posts: 310
 

Default Re: Extra Fields 4.1.x products_t.tpl

With your suggested code, I believe I have the "loop through" working in /modules/Extra_Fields/product.tpl, though I haven't been able to place each of my extra fields separately in customer/main/product.tpl.

This is what I have for my product.tpl
{if $active_modules.Extra_Fields ne ""}
{include file="modules/Extra_Fields/product.tpl"}

When I tried adding just one field name, there was no change
{if $active_modules.Extra_Fields ne ""}{$product.extra_fields.11.value}
{include file="modules/Extra_Fields/product.tpl"}

Can you see what I'm missing to call out individual extra fields where I need in my customer/main/product.tpl?

Christine

Quote:
Originally Posted by toltion
The code allows you to selectively display any extra field. I sometimes like to display the extra fields in different locations on the template, so I run the code at the top of the page and assign variables to the values. In this code I chose to identify the extra_fields by their Service Name instead of index position in the loop -
Code:
{section name=field loop=$extra_fields} {if $extra_fields[field].service_name eq "NO_SHIP_AIR"} {if $extra_fields[field].field_value ne ""}{assign var="no_ship_air" value="Y"}{/if} {/if} {if $extra_fields[field].service_name eq "CLEARANCE_PRICE"} {if $extra_fields[field].field_value ne ""}{assign var="clearance_price" value="Y"}{/if} {/if} {/section}

Then I can display the variables "no_ship_air" & "clearance_price" anywhere on the page using {if $no_ship_air ne ""}{$no_ship_air}{/if}.
__________________
______________
version 4.1.9 Gold
Reply With Quote