View Single Post
  #1  
Old 02-15-2013, 02:26 AM
 
Paulw Paulw is offline
 

Senior Member
  
Join Date: Jul 2004
Location: United Kingdon (Manchester)
Posts: 134
 

Default Manipulate product extra fields display

I hope someone can help. The template /common_files/modules/Extra_Fields/product.tpl

is as follows:

{foreach from=$extra_fields item=v}
{if $v.active eq "Y" and $v.field_value}
<tr>
<td class="property-name">{$v.field}</td>
<td class="property-value" colspan="2">{$v.field_value}</td>
</tr>
{/if}
{/foreach}

What i'm looking to do is to only display certain extra fields on the product details page. I've therefore created a new tpl called: /common_files/modules/Extra_Fields/product2.tpl

Then I'm stuck as I can't work out how to display two extra fields. I've tried:


{if $product.extra_fields}
{foreach from=$product.extra_fields item=extra_field name=extra_fields}
{* Display the Availability and Delivery fields *}
{if $extra_field.service_name eq "SERVICE_NAME02"}
<br><b>{$extra_field.value}</b>
{/if}
{if $extra_field.service_name eq "SERVICE_NAME05"}
<br>{$extra_field.value} <br><br>{/if}
{/foreach}
{/if}

but it doesn't show up on the product details page. The same code on the subcateogires page /common_files/customer/main/products_t.tpl does show up correctly?

Where am I going wrong please?
__________________
X-Cart Gold V 4.4.1
Reply With Quote