Product Module - Field Definitions - Problem

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply

Urgent Problem with using the field definitions within the product module.

Okay
0
No votes
Crap
0
No votes
 
Total votes: 0

james123
Forum Members
Forum Members
Posts: 12
Joined: Thu Nov 12, 2009 12:05 pm

Product Module - Field Definitions - Problem

Post by james123 »

I am wondering if anyone knows how to add field definitions, that have been created within the Product Module into the Detail Template of the products module.

There is multiple field definitions which I have created, some are text and some are images.


An example of how I have tried to do this with one of the field definitions which is an image is below.

    {if count($entry->fields)}
  {foreach from=$entry->fields key='name' item='field'}
      {if $field->type == 'image' && isset($field->image_box)}
        file_location}/{$field->image_box}" width="100%" alt="{$field->value}"/>
      {/if}
  {/foreach}
{/if}
 


'image_box' is the field definitions is the name I defined in the properties for creating a new field definitions.
Utter
Forum Members
Forum Members
Posts: 41
Joined: Sun Mar 06, 2005 11:39 pm

Re: Product Module - Field Definitions - Problem

Post by Utter »

Here's how I did it - i wanted to pull out the individual fields and wrap them in their own html so:

Code: Select all

<div class="product_detail_field">
     <span class="detail_field_label">Location: </span><span class="detail_field_value">{$entry->fields.Location->value}</span><br /><br />
     <span class="detail_field_label">Date: </span><span class="detail_field_value">{$entry->fields.Date->value}</span><br />
Try {$field->image_box} as {$entry->fields.image_box->value} 

I'm reasonably sure that this just works out of the box for FDs in Product Manager - I don't recall having to wrote any other code to make this happen but apologies if it's on the wrong track.

Thanks once again to calguy1000.
Post Reply

Return to “Modules/Add-Ons”