Forums / Setting Up Categories, Products, Attributes / Disable/Hide Category and not the products

Disable/Hide Category and not the products

Views: 7,517

Results 1 to 12 of 12
10 Feb 2009, 3:11 PM
#1
ivogue avatar

ivogue

New Zenner

Join Date:
Nov 2008
Posts:
16
Plugin Contributions:
0

Disable/Hide Category and not the products

I want to disable / hide category and not the products.

Let's say I sell flowers
Categories are 40 colors, red, blue, etc.

But I also sell clay pots but I don't want it listed on the same Nav. I want to disable it but NOT the products.

cause I want to make a ezpage, and link to it.

Plus if the categories nav is call "flower by colors" it wouldn't make sense to put clay pot in there.

Anyways, I tried to click on the green button to disable the category but it will disable its products too.

Any other ways i could do that?

10 Feb 2009, 11:49 PM
#2
ells avatar

ells

New Zenner

Join Date:
Nov 2008
Location:
Pacific Northwest
Posts:
24
Plugin Contributions:
0

Re: Disable/Hide Category and not the products

Have you tried disableing the category, but then re-enabling each product individualy? I THINK that would hide it from the menu, but still allow you to link to each product. Just take note of the URLs you'll need before disabling the category.

11 Feb 2009, 4:07 AM
#3
ajeh avatar

ajeh

Oba-san

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

Re: Disable/Hide Category and not the products

You could also run a quick SQL command in the Tools ... Install SQL Patches ...

UPDATE categories SET categories_status = 0 where categories_id = XX;

where XX is the categories_id you want to set to disabled ... :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!

24 May 2010, 1:49 PM
#4
swordfish avatar

swordfish

New Zenner

Join Date:
Feb 2010
Location:
Australia
Posts:
5
Plugin Contributions:
0

Re: Disable/Hide Category and not the products

GREAT!! Thanks Ajeh, that worked a dream! So, anyone else needing the same thing, use:

UPDATE categories SET categories_status = 0 where categories_id = XX;
as recommended by Ajeh!!

Just one point... I'm no wizz in databases, so how do I RE-ENABLE should I want to?

Thanks.

24 May 2010, 2:55 PM
#5
g1smd avatar

g1smd

Zen Follower

Join Date:
Mar 2010
Location:
UK
Posts:
449
Plugin Contributions:
0

Re: Disable/Hide Category and not the products

I assume that ```
UPDATE categories SET categories_status = [b]1[/b] where categories_id = XX;

Online since 1995.

24 May 2010, 10:26 PM
#6
ajeh avatar

ajeh

Oba-san

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

Re: Disable/Hide Category and not the products

That should work for you ... test it out and see ... :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!

3 Sep 2010, 10:11 PM
#7
friedrich72 avatar

friedrich72

New Zenner

Join Date:
May 2009
Location:
Kansas
Posts:
39
Plugin Contributions:
0

Re: Disable/Hide Category and not the products

Thanks for your advice on this thread!

Another way to do it is this:
Create a new category titled "HIDE", deactivate it, then create whatever active categories you want inside of it as subcategories.

...which is pretty much what Ajeh said but you'd use the cool little red and green buttons instead of the sql.:smile:

21 Oct 2010, 7:23 AM
#8
piscean29 avatar

piscean29

New Zenner

Join Date:
Oct 2010
Location:
Australia
Posts:
4
Plugin Contributions:
0

Re: Disable/Hide Category and not the products

Ells:

Have you tried disableing the category, but then re-enabling each product individualy? I THINK that would hide it from the menu, but still allow you to link to each product. Just take note of the URLs you'll need before disabling the category.

Awesome! Just what I need! Didn't realise that was possible.

Cheers!

1 Feb 2011, 5:00 PM
#9
rudolphcorporative1 avatar

rudolphcorporative1

New Zenner

Join Date:
Jan 2011
Posts:
2
Plugin Contributions:
0

Re: Disable/Hide Category and not the products

:clap::clap::clap: Cool, it worked fine, thanks buddy!

15 Jul 2013, 11:08 PM
#10
leilanddale avatar

leilanddale

New Zenner

Join Date:
Jan 2010
Posts:
69
Plugin Contributions:
0

Re: Disable/Hide Category and not the products

This is very similar to what I'm looking for but not exactly it either.

I'm wanting to disable a category from showing up in the sidebox...the actual link. I have a sidebox specifically for that category. It's almost like a sub-sidebox if that makes sense. I just don't want that category link showing up in the categories sidebox.

Any suggestions?

16 Aug 2014, 7:52 PM
#11
yikki77 avatar

yikki77

New Zenner

Join Date:
Jun 2012
Posts:
2
Plugin Contributions:
0

Re: Disable/Hide Category and not the products

Hello all,

For a more definitive and simple solution, you could also open the file
admin\categories.php

and replace the ligne
$contents[] = array('text' => '<br />' . TEXT_PRODUCTS_STATUS_INFO . ' ' . TEXT_PRODUCTS_STATUS_OFF . zen_draw_hidden_field('set_products_status_off', true));

by this code:
$contents[] = array('text' => '<br />' . TEXT_PRODUCTS_STATUS_INFO . '<br />' .
zen_draw_radio_field('set_products_status', 'set_products_status_on', true) . ' ' . TEXT_PRODUCTS_STATUS_ON . '<br />' .
zen_draw_radio_field('set_products_status', 'set_products_status_off') . ' ' . TEXT_PRODUCTS_STATUS_OFF . '<br />' .
zen_draw_radio_field('set_products_status', 'set_products_status_nochange') . ' ' . TEXT_PRODUCTS_STATUS_NOCHANGE);

It will ask you each time you want to disable the category if you want to hide the products, then simply choose "unchanged" :)

See you,

Py

20 Dec 2018, 6:41 PM
#12
linuxguy2 avatar

linuxguy2

Zen Follower

Join Date:
Sep 2013
Location:
Texas
Posts:
315
Plugin Contributions:
0

Re: Disable/Hide Category and not the products

I've used this built in approach to manipulate categories in side boxes.
However it does not affect the Categories Tabs menu

 
/includes/templates/template_default/sideboxes/tpl_categories.php
// to make a specific category stand out define a new class in the stylesheet example: A.category-holiday
// uncomment the select below and set the cPath=3 to the cPath= your_categories_id
// [B]many variations of this can be done[/B]
//      case ($box_categories_array[$i]['path'] == 'cPath=3'):
//        $new_style = 'category-holiday';
//        break;

    case ($box_categories_array[$i]['path'] == 'cPath=2'):
        $new_style = 'category_hide';
        break;
    case ($box_categories_array[$i]['path'] == 'cPath=1'):
        $new_style = 'category_hide1';
        break;
   case ($box_categories_array[$i]['path'] == 'cPath=3'):
        $new_style = 'category_hide2';
        break;
CSS:
includes/templates/template_default/css/stylesheet.css
/* Hide Categories but space is clickable (adjust font size) */
A.category_hide {
	color: #000000;
	font-size:14px;
	text-decoration: none;
	padding-left:0px;
	padding-right:0px;
	padding-bottom:0px;
}
/* Disable specific categories (Make unclickable) */
A.category_hide1, A.category_hide2, A.category_hide3 {
	cursor: pointer;
	font-size: 14px;
	font-weight: normal;
	line-height: 175%;
	pointer-events: none;
	text-decoration: none;
	display: inline-block;
}