Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Display product features on product page Rate Topic   - - - - -

 
  • ckad79
  • Senior Member
  • Members
  • Join Date: 20-Jun 07
  • 500 posts

Posted 18 January 2012 - 09:33 PM #1

On my detailed product pages, under my product image, I want to fill that space with my PRODUCT FEATURE options. What is the code to display product features?

Thanks.
"Enjoy yourself, it's later than you think" T. Snider.

 
  • solesurvivor
  • Senior Member
  • Members
  • Join Date: 05-Aug 11
  • 745 posts

Posted 18 January 2012 - 10:54 PM #2

On my detailed product pages, under my product image, I want to fill that space with my PRODUCT FEATURE options. What is the code to display product features?

Thanks.


Heres some code from my template you might find helpful. You may want to try putting it in a hook such as the "products:view_main_info". If your familiar with hooks then I would suggest that and just use a post hook unless of course you need more exact placement then you'll have to edit the core template files or create a custom hook. I suggest the latter.


{* $Id$ *}

{foreach from=$product_features item="feature"}
{if $feature.feature_type != "G"}
<div class="form-field">
{if $feature.full_description|trim}{*{include file="common_templates/help.tpl" text=$feature.description content=$feature.full_description|unescape id=$feature.feature_id show_brackets=true}*}{/if}
<label>{$feature.description|unescape}:</label>

{if $feature.feature_type == "M"}
{assign var="hide_prefix" value=true}
{else}
{assign var="hide_prefix" value=false}
{/if}

{strip}
{if $feature.prefix && !$hide_prefix}{$feature.prefix}{/if}
{if $feature.feature_type == "C"}
<img src="{$images_dir}/icons/checkbox_{if $feature.value != "Y"}un{/if}ticked.gif" width="13" height="13" alt="{$feature.value}" align="top" />
{elseif $feature.feature_type == "D"}
{$feature.value_int|date_format:"`$settings.Appearance.date_format`"}
{elseif $feature.feature_type == "M" && $feature.variants}
<ul class="no-markers no-margin">
{foreach from=$feature.variants item="var"}
{if $var.selected}<li><img src="{$images_dir}/icons/checkbox_ticked.gif" width="13" height="13" alt="{$var.variant}" />&nbsp;{if $hide_prefix}{$feature.prefix}{/if}{$var.variant}{if $hide_prefix}{$feature.suffix}{/if}</li>{/if}
{/foreach}
</ul>
{elseif $feature.feature_type == "S" || $feature.feature_type == "E"}
{foreach from=$feature.variants item="var"}
{if $var.selected}{if $var.seo_name}<a href="{$var.seo_name}.html">{/if}{$var.variant}</a>{/if}
{/foreach}
{elseif $feature.feature_type == "N" || $feature.feature_type == "O"}
{$feature.value_int|default:"-"}
{else}
{$feature.value|default:"-"}
{/if}
{if $feature.suffix && !$hide_prefix}{$feature.suffix}{/if}
{/strip}
</div>
{/if}
{/foreach}

{foreach from=$product_features item="feature"}
{if $feature.feature_type == "G" && $feature.subfeatures}
{include file="common_templates/subheader.tpl" title=$feature.description tooltip=$feature.full_description text=$feature.description}
{include file="views/products/components/product_features.tpl" product_features=$feature.subfeatures}
{/if}
{/foreach}


 
  • ckad79
  • Senior Member
  • Members
  • Join Date: 20-Jun 07
  • 500 posts

Posted 20 January 2012 - 07:09 PM #3

Thank you for reply.

I just copied that into my default template for detailed product pages and my options did not appear.
"Enjoy yourself, it's later than you think" T. Snider.

 
  • solesurvivor
  • Senior Member
  • Members
  • Join Date: 05-Aug 11
  • 745 posts

Posted 20 January 2012 - 07:36 PM #4

Thank you for reply.

I just copied that into my default template for detailed product pages and my options did not appear.



Did you clear your cache? That might be the problem. Just goto your admin.php?cc to clear your cache.