View Single Post
  #3  
Old 10-01-2011, 06:52 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,201
 

Default Re: help displaying hidden products SKU.

In manufacturers.php before // Assign the current location line

Code:
if ($manufacturerid) { // get hidden products array $hidden_products = func_query("SELECT * FROM $sql_tbl[products] WHERE forsale = 'H' AND manufacturerid = '$manufacturerid'"); //Assign the hidden_products variable (array) to smarty $smarty->assign('hidden_products', $hidden_products); }

In the tpl where need to show result

Code:
{foreach from=$hidden_products item=i} SKU: <a href="product.php?productid={$i.productid}">{$i.productcode}</a> <br /> {/foreach}

Note that the way you started it this will work only if you go to any manufacturer page otherwise the code will just not execute and hidden_products array will be empty so nothign to show
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote