View Single Post
  #7  
Old 03-28-2016, 04:57 PM
  DrQuietus's Avatar 
DrQuietus DrQuietus is offline
 

Advanced Member
  
Join Date: Dec 2005
Posts: 81
 

Default Re: How to add extra field values to the product list page

If the data is available, can you tell why this is not returning any values:

Code:
<table cellpadding="3" cellspacing="0" class="prodlist-table"> <thead> <tr> <th>Part #</th> {section name=product loop=$products} {if $smarty.section.product.first} {foreach from=$products[product].extra_fields item=extra_field name=field} {if $extra_field.value ne ''} <th>{$extra_field.field}</th> {/if} {/foreach} {/if} {/section} </tr> </thead> <tbody> {foreach from=$products item=product name=products} <script type="text/javascript"> //<![CDATA[ products_data[{$product.productid}] = {ldelim}{rdelim}; //]]> </script> {if $active_modules.Product_Configurator and $is_pconf and $current_product} {assign var="url" value="product.php?productid=`$product.productid`&amp;pconf=`$current_product.productid`&amp;slot=`$slot`"} {else} {assign var="url" value="product.php?productid=`$product.productid`&amp;cat=`$cat`&amp;page=`$navigation_page`"} {if $featured eq 'Y'} {assign var="url" value=$url|cat:"&amp;featured=Y"} {/if} {/if} <tr class="{cycle values="odd,even"} product-name-row highlight product-cell product-cell-buynow"> <td><a href="{$url}" class="product-title">{$product.productcode|escape}</a></td> {foreach from=$product.extra_fields item=extra_field name=field} {if $extra_field.field_value ne ""} <td align="center">{$extra_field.field_value}</td> {/if} {/foreach} </tr> {/foreach} </tbody> </table>
__________________
Dave Jones
dave@industrialwebworks.net
Mostly 4.7.2 - 4.7.5
Reply With Quote