View Single Post
  #2  
Old 09-15-2013, 07:50 AM
 
PhilJ PhilJ is offline
 

X-Guru
  
Join Date: Nov 2002
Posts: 4,094
 

Default Re: Show manufacturer on products_t

It's been posted a few times, but here it is again...

products.php

Before...

Code:
$smarty->assign('cat_products', isset($products) ? $products : array());

Insert...

Code:
# Get Product Manufacturer if($products){ foreach($products as $key=> $product) $products[$key]["manufacturerid"] = func_query_first_cell("SELECT manufacturerid FROM $sql_tbl[manufacturers] WHERE manufacturerid=" . $product["manufacturerid"]); $products[$key]["manufacturer"] = func_query_first_cell("SELECT manufacturer FROM $sql_tbl[manufacturers] WHERE manufacturerid=" . $product["manufacturerid"]); } # /Get Product Manufacturer

Then in...

skin/common_files/customer/main/products.tpl
skin/common_files/customer/main/products_t.tpl

Insert...

Code:
{if $product.manufacturer} <p><a href="manufacturers.php?manufacturerid={$product.manufacturerid}">{$product.manufacturer}</a></p> {/if}

You'll also need to add the PHP code to search.php

Before...

Code:
// Assign the current location line $smarty->assign('location', $location);
__________________
xcartmods.co.uk
Reply With Quote