Forums / General Questions / Excluding a product type from search

Excluding a product type from search

Views: 554

Results 1 to 4 of 4
12 Jun 2013, 2:04 PM
#1
dannyvarley avatar

dannyvarley

Zen Follower

Join Date:
Dec 2011
Posts:
287
Plugin Contributions:
0

Excluding a product type from search

Hi There!

I want to exclude product_type 5 from the displaying in the search results, I'm pretty sure I would have to change something in /includes/modules/pages/advanced_search_result/header_php.php But i'm not sure what? I was thinking it would be a:

if (product_type = 1) {
somethingsomethingsomething
}

Think anyone could give me a solution?

danny

12 Jun 2013, 4:25 PM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Excluding a product type from search

Around line 355 in the:
/includes/modules/pages/advanced_search_results/header_php.php

you can add the code in RED to block a Product Type:

//die('I SEE ' . $where_str);

[B]// bof: exclude Product Type 5 from search
$where_str .= " and p.products_type != 5 ";
// eof: exclude Product Type from search
[/B]
if (isset($_GET['dfrom']) && zen_not_null($_GET['dfrom']) && ($_GET['dfrom'] != DOB_FORMAT_STRING)) {

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!

13 Jun 2013, 8:12 AM
#3
dannyvarley avatar

dannyvarley

Zen Follower

Join Date:
Dec 2011
Posts:
287
Plugin Contributions:
0

Re: Excluding a product type from search

Perfect! Thankyou!

:clap:

13 Jun 2013, 2:03 PM
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Excluding a product type from search

Thanks for the update that this is now working for you ... :smile:

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!