You need to do a couple changes for this ...
Edit the file:
/admin//includes/modules/category_product_listing.php
and change the line:
<td class="dataTableHeadingContent" align="left"><?php echo TABLE_HEADING_MANUFACTURERS; ?></td>
to add:
<td class="dataTableHeadingContent"><?php echo TABLE_HEADING_CATEGORIES_PRODUCTS; ?></td>
<td class="dataTableHeadingContent" align="left"><?php echo TABLE_HEADING_MANUFACTURERS_NAME; ?></td>
Then change the line:
<td class="dataTableContent"><?php echo $products->fields['products_model']; ?></td>
to add:
<td class="dataTableContent"><?php echo zen_get_products_manufacturers_name($products->fields['products_id']); ?></td>
<td class="dataTableContent"><?php echo $products->fields['products_model']; ?></td>
Then you need to add a new function ...
Create a new file:
/admin/includes/functions/extra_functions/extra_functions.php
NOTE: you can call the file anything you want ...
<?php
// my extra functions
/*
* Return a product's manufacturer's name, from ID
* TABLES: products, manufacturers
*/
function zen_get_products_manufacturers_name($product_id) {
global $db;
$product_query = "select m.manufacturers_name
from " . TABLE_PRODUCTS . " p, " .
TABLE_MANUFACTURERS . " m
where p.products_id = '" . (int)$product_id . "'
and p.manufacturers_id = m.manufacturers_id";
$product =$db->Execute($product_query);
return ($product->RecordCount() > 0) ? $product->fields['manufacturers_name'] : "";
}
?>
Then create the file:
/admin/includes/languages/english/extra_definitions/extra_definitions.php
<?php
define('TABLE_HEADING_MANUFACTURERS_NAME', 'Manufactuer');
?>
Linda McGrath
If you have to think ... you haven't been zenned ...
**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**
Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here
Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!