Quote Originally Posted by brittainmark View Post
You could try this. No programming required.

If you create a new category and disable the category. Then add products to that category. Unless you search specifically for them, they can only be found if you send them a link to the product_id. Thus I have a product that I have achive that I do not want people to see anymore . You can see it here https://innerlightcrystals.co.uk/sal...oducts_id=3311

So you would have to create the links as above replacing innerlightcrystals.co.uk with your website.

Cavate: they will still appear in searches if people search zen cart for them.

If you are up to a little bit of programming you can exclude categories from the search. Below works for zen cart 2.0.1 and I am pretty sure it will work for 2.1.

Create a file YOURSITE\includes\classes\observers\auto.exclude_search_category.php
put the following code in to it.

Code:
<?php
/* 
 * Observers for excluding products with a master category in EXCLUDE_SORT_CATEGORIES from search results.
 */
class zcObserverExcludeSearchCategory extends base {

    public function __construct() {
        $this->attach(
            $this,
            [
                'NOTIFY_SEARCH_WHERE_STRING',
            ]
        );
    }
    protected function updateNotifySearchWhereString(&$class, $eventID, $keywords, &$where_str, $keyword_search_fields) 
    {
        if (!defined('EXCLUDE_SORT_CATEGORIES') || preg_match('#^[0-9 \,]+$#' , EXCLUDE_SORT_CATEGORIES) === 0) {
            return;
        }
        if (!empty($where_str)) {
            $where_str .=  ' AND';
        }
        $where_str .= ' p.master_categories_id NOT IN (' . EXCLUDE_SORT_CATEGORIES . ')';
    }
}
create a second file YOUYSITE\includes\extra_datafiles\search_exclude.php
put the following code in it changing the #### to a comma separated list of the category_id(s) of the categories you want to exclude

Code:
<?php
// Enter comma sepersted list of categories to be excluded from search.
define('EXCLUDE_SORT_CATEGORIES','###');
I think that should work!
this worked and absolute treat A1!!!!
admins should consider adding this to the plugins