View Single Post
  #23  
Old 12-18-2005, 09:06 PM
 
DVDirect DVDirect is offline
 

Advanced Member
  
Join Date: May 2005
Posts: 35
 

Default

FYI... v4.0.15

This is what you can add to your .tpl files to call the Extra Field Data:

In /customer/main/product.tpl you have the followiing calling the Extra Field Data:

Code:
{if $active_modules.Extra_Fields ne ""} {include file="modules/Extra_Fields/product.tpl"} {/if}

Included code in /modules/Extra_Fields/product.tpl

Code:
{* $Id: product.tpl,v 1.7 2004/05/28 12:21:07 max Exp $ *} {section name=field loop=$extra_fields} {if $extra_fields[field].active eq "Y" && $extra_fields[field].field_value} <TR><TD width="30%"> {$extra_fields[field].field} </TD> <TD> {$extra_fields[field].field_value} </TD> </TR> {/if} {/section}

This justs lists the Extra Data fields on the Product Detail Page.

So to get just the Extra Field you want use the Extra Field ROW#. In Admin you have Extra Field you can add... if the data is in the 3rd row then use '03' inplcase of [field] in the code below... you can use 01,02,03,04,05 etc for represented rows.

Extra field Title:
Code:
{$extra_fields[field].field} = {$extra_fields[03].field}

Extra Field Value:
Code:
{$extra_fields[field].field_value} = {$extra_fields[03].field_value}

The Other thing you can do is just qualify the Title to make sure that you are displaying the correct ROW incase you have changed the Title to something else.

Taken from above code in /modules/Extra_Fields/product.tpl

Extra Field Title to display only = Test Title

Code:
{section name=field loop=$extra_fields} {if $extra_fields[field].active eq "Y" && $extra_fields[field].field_value} {if $extra_fields[field].field eq "Test Title"} <TR><TD width="30%"> {$extra_fields[field].field} </TD> <TD> {$extra_fields[field].field_value} </TD> </TR> {/if} {/if} {/section}

Regards,
Marko
__________________
X-Cart v4.0.15
MMPro
EZy Checkout
Rewards Points
Heavily modified back end
Reply With Quote