Ajeh:
Could you go into phpMyAdmin and search for the products_id that you do not want to see and see what their master_categories_id are?
Linda - not sure where to find "phpMyAdmin" ? Checking other sources, category listing in admin, the category I.D. to be excluded is 23. In the line "AND p.master_categories_id != 7" mentioned above I changed 7 to read 23 with no result. Here are the codes as they now exist - maybe I have the "line" of code mentioned above in the wrong order?
from /includes/modules/pages/products_new/header_php.php
// $display_limit = zen_get_products_new_timelimit();
$display_limit = zen_get_new_date_range();
$products_new_query_raw = "SELECT p.products_id, p.products_type, 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,
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.master_categories_id != 23
AND p.products_id = pd.products_id
AND pd.language_id = :languageID " . $display_limit . $order_by;
from /includes/modules/new_products.php
// initialize vars
$categories_products_id_list = '';
$list_of_products = '';
$new_products_query = '';
$display_limit = zen_get_new_date_range();
if ( (($manufacturers_id > 0 && $_GET['filter_id'] == 0) || $_GET['music_genre_id'] > 0 || $_GET['record_company_id'] > 0) || (!isset($new_products_category_id) || $new_products_category_id == '0') ) {
$new_products_query = "select distinct p.products_id, p.products_image, p.products_tax_class_id, pd.products_name,
p.products_date_added, p.products_price, p.products_type, p.master_categories_id
from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd
where p.products_id = pd.products_id
and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'
and p.products_status = 1 " . $display_limit;
} else {
// get all products and cPaths in this subcat tree
$productsInCategory = zen_get_categories_products_list( (($manufacturers_id > 0 && $_GET['filter_id'] > 0) ? zen_get_generated_category_path_rev($_GET['filter_id']) : $cPath), false, true, 0, $display_limit);
if (is_array($productsInCategory) && sizeof($productsInCategory) > 0) {
// build products-list string to insert into SQL query
foreach($productsInCategory as $key => $value) {
$list_of_products .= $key . ', ';
}
$list_of_products = substr($list_of_products, 0, -2); // remove trailing comma
$new_products_query = "select distinct p.products_id, p.products_image, p.products_tax_class_id, pd.products_name,
p.products_date_added, p.products_price, p.products_type, p.master_categories_id
from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd
where p.products_id = pd.products_id
and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'
and p.products_status = 1
and p.master_categories_id != 23
and p.products_id in (" . $list_of_products . ")";
}
}
from /includes/modules/sideboxes/whats_new.php
// display limits
// $display_limit = zen_get_products_new_timelimit();
$display_limit = zen_get_new_date_range();
$random_whats_new_sidebox_product_query = "select p.products_id, p.products_image, p.products_tax_class_id, p.products_price, pd.products_name,
p.master_categories_id
from (" . TABLE_PRODUCTS . " p
left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id )
where p.products_id = pd.products_id
and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'
and p.master_categories_id != 23
and p.products_status = 1 " . $display_limit;
I have also attached a screen capture of the index page showing my problem - not sure if it will show up - if not then just click on my site link below - obviously new products images rotate so you may need to leave home page then return to see it - just a bunch of Articles using the same image - looks terrible to say the least. (I wouldn't shop here, would you?)
The reason I use a Product Category to insert Articles is that when using EZ Pages I cannot find a way to add meta descriptions, keywords etc for SEO benefit (the only reason I bother with articles in the first place)
[Attachment no longer available]
So Linda, I very much look forward to your help here.
cheers,
Mike