View Single Post
  #21  
Old 03-09-2006, 07:29 PM
 
Total Hosting Total Hosting is offline
 

Advanced Member
  
Join Date: Feb 2006
Posts: 52
 

Default

Not sure why, but I get nothing. I get the extra fields to pull in fine into product.tpl. What am I not seeing?
products.tpl
Code:
<TD valign="top"> <h1 style="margin: 0px; padding-bottom: 5px;"><FONT class="ProductTitle">{$products[product].product}</FONT></h1> {* Get the product ID as we loop through the products to be displayed *} {assign var="productId" value=$products[product].productid} {php} global $sql_tbl; // Get the product id from the smarty var $productid=$this->get_template_vars('productId'); // Get the rows from the extra_field_values table for this product id if($productid) { $extra_fields = func_query( "SELECT productid, fieldid, value as field_value FROM $sql_tbl[extra_field_values] WHERE productid = $productid" ); } $this->assign("extra_fields",$extra_fields); {/php} {$extra_fields[2].field_value} {$products[product].descr|truncate:500:"...":true}
products_t.tp
Code:
<TABLE border="0" width="100%" cellpadding="5" cellspacing="1"> {math equation="floor(100/x)" x=$config.Appearance.products_per_row assign="width"} {section name=product loop=$products} {assign var="discount" value=0} {* Get the product ID as we loop through the products to be displayed *} {assign var="productId" value=$products[product].productid} {php} global $sql_tbl; // Get the product id from the smarty var $productid=$this->get_template_vars('productId'); // Get the rows from the extra_field_values table for this product id if($productid) { $extra_fields = func_query( "SELECT productid, fieldid, value as field_value FROM $sql_tbl[extra_field_values] WHERE productid = $productid" ); } $this->assign("extra_fields",$extra_fields); {/php} {if %product.index% is div by $config.Appearance.products_per_row} <TR> {assign var="cell_counter" value=0} {/if} {math equation="x+1" x=$cell_counter assign="cell_counter" } <TD align="center" valign="top" width="{$width}%" class="DialogBox"> {$products[product].product} <!-- {$lng.lbl_sku}: {$products[product].productcode} --> {$extra_fields[2].field_value} {if $active_modules.Special_Offers ne "" and $products[product].have_offers} {include file="modules/Special_Offers/customer/product_offer_thumb.tpl" product=$products[product]} {else}

here is the page: http://www.empowermentgroup.com/xcart/home.php?cat=26 The products work fine.

Thanks
__________________
Regards,

Peter Stoermer
http://www.TotalHosting.com for http://www.EmpowermentGroup.com
X-cart: 4.0.17
Reply With Quote