Jump to content

Completely eliminate a category and its subcontent from the frontend


Recommended Posts

Hey.

What's the best way to eliminate a category and all its subcontent (subcategories, subitems, other) from the frontend completely? Basically, it should only be visible in the backend and there should be no trace of it in the frontend whatsoever. It should only be visible (and editable) in the backend.

Neither disabling a category or disconnecting it from all user groups did that.

If it's not possible to do via the backend, I will try to hardcode a skip-this-category clause directly in code, but would rather avoid doing that.

A permanently disabled "maintenance branch" of the category tree kind of feature would also do the trick.

Thank you.

Edited by asdasd2 (see edit history)
Link to comment
Share on other sites

Of course you can maintain shop and shop non-active categories for product administration for ex. (for to import all products first to non active category and then from there work-out your products).

You simply deactivate the category. I presume you are using PS 1.7. if not it's the same, tick the green check. Categories not active will have an red X:

grafik.thumb.png.1030dc87b8644e14407eeae9ecc65328.png

1 hour ago, asdasd2 said:

Neither disabling a category or disconnecting it from all user groups did that.

Why not ? It should do that what you want. You need to add the products added to this category to another main category, otherwise you will have problems with the disabled category. Main category should be always an active category.

Link to comment
Share on other sites

hace 1 hora, selectshop.at dijo:

Of course you can maintain shop and shop non-active categories for product administration for ex. (for to import all products first to non active category and then from there work-out your products).

You simply deactivate the category. I presume you are using PS 1.7. if not it's the same, tick the green check. Categories not active will have an red X:

grafik.thumb.png.1030dc87b8644e14407eeae9ecc65328.png

Why not ? It should do that what you want. You need to add the products added to this category to another main category, otherwise you will have problems with the disabled category. Main category should be always an active category.

I suppose that subcategories are displayed if you don't disable them one by one...

Link to comment
Share on other sites

3 hours ago, joseantgv said:

I suppose that subcategories are displayed if you don't disable them one by one...

Yes, that's the point.

I came up with a workaround: register_shutdown_function in which I make an update query in which I manually disable all categories, content etc. from the branch in question after every request to the backend. Still it's hardly elegant, so I hope there is a better solution.

Link to comment
Share on other sites

14 hours ago, joseantgv said:

I suppose that subcategories are displayed if you don't disable them one by one...

This should not be, because they are a parent of one main category. I didn't checked it for PS 1.7. but in PS 1.6. it works, if you disable the main category, so no parent category of this main category are shown in front-office as well. I was using this system for over 10 years with administrative and shop non-active categories for to maintain product imports and exports. Besides the categories which are shop active.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...