bunyip:
If they are all in the same category, you could simply do some tweaking of the sql queries for those pages to exclude that category.
Take the products_all page for example:
make an override copy of includes/templates/template_default/templates/tpl_products_all_default.php, then edit this line of code (line 38):
$products_all_query_raw = "select p.products_id, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id, p.products_date_added, m.manufacturers_name, p.products_model, p.products_quantity, p.products_weight 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 = '" . (int)$_SESSION['languages_id'] . "'" . $order_by;
> ```
$products_all_query_raw = "select p.products_id, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id, p.products_date_added, m.manufacturers_name, p.products_model, p.products_quantity, p.products_weight 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 = '" . (int)$_SESSION['languages_id'] . "'" . and p.master_categories_id != 'xx' $order_by;
``` where xx is the category id of your freebies
WOW. that works OK, but I've had to look for that SELECT query in the whole folders. It seems that you are talking of a zencart version previous to the 1.3.
After making a search I found your suggest in includes/modules/pages/products_all/header_php.php
Here is the code (line 23): I marked your suggest addin in bold-red with the category number set to 3 (my freebies category id.) :D
$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, m.manufacturers_name, p.products_model, p.products_quantity, p.products_weight, p.product_is_call
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
[b]AND p.master_categories_id != '3'[/b]
AND pd.language_id = :languageID " . $order_by;
Thanks a lot for the tip, now I only need to eliminate those damn freebies from the best-seller sidebox. :D
Any ideas? Maybe the same thing... ?
Regards!!