It can be done on the Products All Listing as well...this was tested on ZenCart v. 1.5.3 so test it on your version before going live.
Open /includes/modules/pages/products_all/header.php and add
PHP Code:
p.manufacturers_id
to the SELECT statement at the top of the page.
PHP Code:
$products_all_query_raw = "SELECT p.products_type, p.products_id, pd.products_name,
p.products_image, p.products_price, p.products_tax_class_id, p.products_date_added, p.manufacturers_id,
m.manufacturers_name, p.products_model, p.products_quantity,
p.products_weight, p.product_is_call, p.product_is_always_free_shipping,
p.products_qty_box_status, p.master_categories_id
FROM " . TABLE_PRODUCTS . " p
LEFT JOIN " . TABLE_MANUFACTURERS . " m ON (p.manufacturers_id = m.manufacturers_id), " .
TABLE_PRODUCTS_DESCRIPTION . " pd
WHERE p.products_status = 1
AND p.products_id = pd.products_id
AND pd.language_id = :languageID " . $order_by;
Then open /includes/templates/YOUR CUSTOM FOLDER/templates/tpl_modules_product_listing.php and add this
PHP Code:
. '<a href="' . zen_href_link(FILENAME_DEFAULT,'manufacturers_id=' . zen_get_products_manufacturers_id($products_all->fields['products_id'])). '">'
and this as I did in the code below (around line 71):
PHP Code:
if (PRODUCT_ALL_LIST_MANUFACTURER != '0' and zen_get_show_product_switch($products_all->fields['products_id'], 'manufacturer')) {
$display_products_manufacturers_name = ($products_all->fields['manufacturers_name'] != '' ?
TEXT_MANUFACTURER . ' ' . '<a href="' . zen_href_link(FILENAME_DEFAULT,'manufacturers_id=' .
zen_get_products_manufacturers_id($products_all->fields['products_id'])). '">' . $products_all
->fields['manufacturers_name'] . '</a>' . str_repeat('<br clear="all" />',
substr(PRODUCT_ALL_LIST_MANUFACTURER, 3, 1)) : ''); //MIKE IS WORKING ON MAKING THE
ANCHOR WORK
} else {
$display_products_manufacturers_name = '';
}
Web spiders may pick up on this and index your manufacturers id pages...you can disable that in Google and Bing Webmaster Tools if you like.
I hope this saves someone time.
Bookmarks