The SELECT statement for All Products is in the:
/includes/modules/pages/products_all/header_php.php
You can customize it in there ...
NOTE: this is not an override file so be sure to save both the original and your changes ...
The SELECT statement for All Products is in the:
/includes/modules/pages/products_all/header_php.php
You can customize it in there ...
NOTE: this is not an override file so be sure to save both the original and your changes ...
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!
Thanks so much! That worked like a charm! :)
I would like to exclude my Sold Gallery category from displaying in Featured Products. in featured_products.php would I just add:
to get:PHP Code:and p.master_categories_id != 8
PHP Code: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') ) {
$featured_products_query = "select distinct p.products_id, p.products_image, pd.products_name, p.master_categories_id
from (" . TABLE_PRODUCTS . " p
left join " . TABLE_FEATURED . " f on p.products_id = f.products_id
left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id )
where p.products_id = f.products_id
and p.products_id = pd.products_id
and p.products_status = 1 and f.status = 1
and p.master_categories_id != 8
and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'";
Thanks!
There was an easy fix to address my issue in this thread. I was able to stop all sold items from appearing in New Products.
Info from the previously mentioned thread allowed me to block items with a 0 product count. To block entire categories from displaying in New Products, see this thread.
I got a MySQL error when trying the above fix:
What did I do wrong?Code:1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'p.product_is_free != 1 order by p.products_ordered ' at line 10 in: [select distinct p.products_id, pd.products_name, p.products_ordered from products p, products_description pd, products_to_categories p2c, categories c where p.products_status = '1' and p.products_ordered > 0 and p.products_id = pd.products_id and pd.language_id = '1' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and '67' in (c.categories_id, c.parent_id) p.product_is_free != 1 order by p.products_ordered desc, pd.products_name limit 20]![]()