View Single Post
  #8  
Old 01-18-2012, 06:48 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,201
 

Default Re: Adding "More Colors" to products_t.tpl listing

You still need to query the db, products options is not available on products list page. Try this

In include/search.php find
PHP Code:
// foreach ($products as $k => $v)
unset($thumb_dims); 

and just before add (replace 'Color' with your option class name exactly as you have it)

PHP Code:
// added by CFL Systems for 'more colors' note
$products[$k]['more_colors'] = func_query_first_cell("select count(*) from $sql_tbl[classes] where productid = $v[productid] and avail = 'Y' and class = 'Color'") > 'Y' 'N'

then in the products list template where you want it to show

Code:
{if $product.more_colors eq 'Y'} MORE COLORS NOTE {/if}
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote