You could block products_type 3 which is the Document General products_type code in the products table ...
Printable View
You could block products_type 3 which is the Document General products_type code in the products table ...
Well, there you have it!
Linda's suggestion may be the best route as long as you don't have sub-categories in there that you don't want to be excluded...
Thanks for your input Linda!
Linda,
That sounds like an ideal solution as I will also have documents like FAQ, hints and tips etc that also need keeping out of the New Products listings.
Do you have a snippet of code as a starter?
Thanks,
Jonathan
Copy the module:
/includes/new_products.php
To your templates and overrides directory:
/includes/your_template_dir/new_products.php
and add on to the two SELECT statements additions to the WHERE clause for:
p.products_type != 3
Ok,
I edited the new_products.php file as suggested and placed it in includes/modules/AtomicWorkshop_template/new_products.php the edited section is shown below:-
if ( (!isset($new_products_category_id)) || ($new_products_category_id == '0') ) {
$new_products_query = "select p.products_id, p.products_image, p.products_tax_class_id, p.products_price, p.products_date_added
from " . TABLE_PRODUCTS . " p
where p.products_type != 3
and p.products_status = 1 " . $display_limit;
} else {
$new_products_query = "select distinct p.products_id, p.products_image, p.products_tax_class_id, p.products_date_added,
p.products_price
from " . TABLE_PRODUCTS . " p
left join " . TABLE_SPECIALS . " s
on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " .
TABLE_CATEGORIES . " c
where p.products_id = p2c.products_id
and p2c.categories_id = c.categories_id
and p.products_type != 3
and c.parent_id = '" . (int)$new_products_category_id . "'
and p.products_status = 1 " . $display_limit;
}
But, the two document-general product types (test and peter smarts blah blah blah) still show up when the 'new products...' link is clicked from the categories (products) sidebox.
I also edited the whats_new.php sidebox file and placed it in includes/modules/sideboxes/AtomicWorkshop_template/whats_new.php override and that works fine - when I enable the what's new sidebox, those two document-general products never appear in the sidebox.
Here's a link to the live site:-
www.atomicworkshop.co.uk
Any idea why the 'new products...' link from the Products sidebox still isn't working?
Many Thanks in advance,
Jonathan
The info that I gave you was for the New Products Centerbox ...
For the New Products Listing you would need to edit the SELECT statement in:
/includes/modules/pages/products_new/header_php.php
There are no overrides for this so be sure to backup a copy of the original file as well as your new file for future upgrades ...
Perfect!
Thank you indeed!
Jonathan