Forums / Templates, Stylesheets, Page Layout / Exclude 1 category from 'New Products for (month)' page

Exclude 1 category from 'New Products for (month)' page

Views: 728

Results 1 to 6 of 6
12 Apr 2012, 9:45 PM
#1
sethf avatar

sethf

Zen Follower

Join Date:
Sep 2011
Posts:
228
Plugin Contributions:
0

Exclude 1 category from 'New Products for (month)' page

Hi

I am having trouble excluding a single category from the 'New products for (insert month)' page, that shows up on the home page.

I have tried adding this to /includes/modules/new_products.php

and p.master_categories_id != 319

making the code look like this:

where p.products_id = pd.products_id
and p.master_categories_id != 319
and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'
and p.products_status = 1
and p.products_id in (" . $list_of_products . ")";

...but the category still does not exclude itself from the new products page.

Any suggestions?

Thanks :smile:
S

12 Apr 2012, 11:40 PM
#2
ajeh avatar

ajeh

Oba-san

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

Re: Exclude 1 category from 'New Products for (month)' page

That is the New Products centerbox ...

You need to add that to the SELECT in the:
/includes/modules/pages/products_new/header_php.php

if you want them excluded from the New Products page ...

Also, check that the categories_id 319 is the actual master_categories_id for the Products you are trying to exclude ...

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!

14 Apr 2012, 1:52 PM
#3
sethf avatar

sethf

Zen Follower

Join Date:
Sep 2011
Posts:
228
Plugin Contributions:
0

Re: Exclude 1 category from 'New Products for (month)' page

Ajeh:

That is the New Products centerbox ...

You need to add that to the SELECT in the:
/includes/modules/pages/products_new/header_php.php

if you want them excluded from the New Products page ...

Also, check that the categories_id 319 is the actual master_categories_id for the Products you are trying to exclude ...

Is this suggestion to exclude the products from the new products page?
I am trying to exclude them from the centerbox.

14 Apr 2012, 2:18 PM
#4
ajeh avatar

ajeh

Oba-san

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

Re: Exclude 1 category from 'New Products for (month)' page

Yes, use your code for the New Product centerbox in:
/includes/modules/new_products.php

NOTE: using your templates and overrides for this file would be best ...

Make sure in the module for the new_products.php that you have added that exclusion to the WHERE to BOTH SELECT statements ...

Also, check that your Products are in fact using master_categories_id 319 ...

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!

15 Apr 2012, 9:40 AM
#5
sethf avatar

sethf

Zen Follower

Join Date:
Sep 2011
Posts:
228
Plugin Contributions:
0

Re: Exclude 1 category from 'New Products for (month)' page

Ajeh:

Yes, use your code for the New Product centerbox in:
/includes/modules/new_products.php

NOTE: using your templates and overrides for this file would be best ...

Make sure in the module for the new_products.php that you have added that exclusion to the WHERE to BOTH SELECT statements ...

Also, check that your Products are in fact using master_categories_id 319 ...

I am a little confused as to what you are saying, since I have already added this to /includes/modules/new_products.php

where p.products_id = pd.products_id
and p.master_categories_id != 319
and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'
and p.products_status = 1
and p.products_id in (" . $list_of_products . ")";

I don't understand what other changes there need to be..

Sorry if I am misunderstanding

15 Apr 2012, 12:59 PM
#6
ajeh avatar

ajeh

Oba-san

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

Re: Exclude 1 category from 'New Products for (month)' page

If you are trying to exclude this from the New Products page products_new ... you need to add that to:
/includes/modules/pages/products_new/header_php.php

in both of the SELECT statements ...

If you are trying to exclude it from the New Products centerbox then you need to add it to the:
/includes/modules/new_products.php

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!