View Single Post
  #10  
Old 03-29-2016, 06:55 AM
  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

print_r "not allowed by security settings". But looking in webmaster mode/Show variables it appears to now be $cat_products (it works the same as $products too), but there are no extra fields.

this returns only productid:
Code:
{foreach from=$cat_products item=product name=products} {$product.productid}<br> {foreach from=$product.extra_fields item=extra_field} REPEAT SOMETHING {/foreach} {/foreach}

So does this:
Code:
{foreach from=$products item=product name=products} {$product.productid}<br> {foreach from=$product.extra_fields item=extra_field} REPEAT SOMETHING {/foreach} {/foreach}

It appears the data has been removed...again? Maybe they removed it because like you said database queries shouldn't be in a loop?

So are we back to the original question - how to query the data from the extra_field_values table? Or do you think there is something else to try? Does this apply: http://stackoverflow.com/questions/15262082/add-sql-php-array-to-an-already-existing-array

Why do you suppose in rob's solution they did the extra fields individually?

I forgot to mention, thank you for helping out Cherie.
__________________
Dave Jones
dave@industrialwebworks.net
Mostly 4.7.2 - 4.7.5
Reply With Quote