Symptom:
Center boxes for NEW PRODUCTS and UPCOMING PRODUCTS show Products even when products_status = 0
Solution:
Fix SELECT statements in the two modules:
/includes/modules/new_products.php
This section around lines 40-45
$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_id in (" . $list_of_products . ")";
Needs to be updated to:
$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.products_id in (" . $list_of_products . ")";
And then in the:
/includes/modules/upcoming_products.php
around lines 43 to 50
$expected_query = "select p.products_id, pd.products_name, products_date_available as date_expected, p.master_categories_id
from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd
where p.products_id = pd.products_id
and p.products_id in (" . $list_of_products . ")
and pd.language_id = '" . (int)$_SESSION['languages_id'] . "' " .
$display_limit .
$limit_clause;
to read:
$expected_query = "select p.products_id, pd.products_name, products_date_available as date_expected, p.master_categories_id
from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd
where p.products_id = pd.products_id
and p.products_status = 1
and p.products_id in (" . $list_of_products . ")
and pd.language_id = '" . (int)$_SESSION['languages_id'] . "' " .
$display_limit .
$limit_clause;
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!