Results 1 to 7 of 7
  1. #1
    Join Date
    May 2016
    Location
    Ohio
    Posts
    410
    Plugin Contributions
    0

    Default Hiding Categories

    Sometimes we get so busy that I want to have a catch-up week where only consignment category is showing and the rest of the categories are hidden... is this possible?


    That way I wouldn't have to put the whole site in maintenance which would really help my consignment partners.

    Thanks!

  2. #2
    Join Date
    Jul 2012
    Posts
    16,734
    Plugin Contributions
    17

    Default Re: Hiding Categories

    Quote Originally Posted by jmberman View Post
    Sometimes we get so busy that I want to have a catch-up week where only consignment category is showing and the rest of the categories are hidden... is this possible?


    That way I wouldn't have to put the whole site in maintenance which would really help my consignment partners.

    Thanks!
    Absolutely this is possible, just need to disable all of the other categories (and accompanying product unless there is some expectation that the disabled product are linked to your "consignment" category and they are still to be seen). There are also some potential considerations such as it would be ideal if the consignment category was immediately off of the main store and not a sub-category of one of the categories to be disabled...

    Disabling just the category(ies) without disabling the product will easily permit access to the product (bookmark or webpage link) while should prevent simple navigation through category menus.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #3
    Join Date
    May 2016
    Location
    Ohio
    Posts
    410
    Plugin Contributions
    0

    Default Re: Hiding Categories

    You say I can but not how.

    How do I disable a category? I was hoping that'd be in the category settings, but it's not.

  4. #4
    Join Date
    Dec 2009
    Location
    Amersfoort, The Netherlands
    Posts
    2,846
    Plugin Contributions
    25

    Default Re: Hiding Categories

    Quote Originally Posted by jmberman View Post
    You say I can but not how.

    How do I disable a category? I was hoping that'd be in the category settings, but it's not.
    In the categories listing in the admin, press the green button on the row of the category you want to disable.

  5. #5
    Join Date
    May 2016
    Location
    Ohio
    Posts
    410
    Plugin Contributions
    0

    Default Re: Hiding Categories

    Quote Originally Posted by Design75 View Post
    In the categories listing in the admin, press the green button on the row of the category you want to disable.
    Omg, lol so simply, thank you.

  6. #6
    Join Date
    May 2016
    Location
    Ohio
    Posts
    410
    Plugin Contributions
    0

    Default Re: Hiding Categories

    Once I re-enable a category, I seem to have to re-enable all the products within it individually, is there a faster way so where I enable the category it re-enables all the products too?

  7. #7
    Join Date
    Jul 2012
    Posts
    16,734
    Plugin Contributions
    17

    Default Re: Hiding Categories

    Quote Originally Posted by jmberman View Post
    Once I re-enable a category, I seem to have to re-enable all the products within it individually, is there a faster way so where I enable the category it re-enables all the products too?
    I thought that was something presented to the user when re-enabling the category, much like when disabling the category. It might be something that has recently been added to ZC 1.5.7, but regardless the categories template has been rewritten to hide the selection button when on a mobile device (small screen resolution which could also occur if the screen width for the browser is shrunk down) and my current install hasn't been modified to support seeing the buttons and therefore I'm having difficulty confirming that additional operation.

    Now, it is possible to execute a sql query to cause this, but playing with database data manually comes with its own concerns...

    There are two queries that come to mind. One is to enable all product that are "rooted" in the category, meaning the master_categories_id is that of the category being enabled. The other is any product that is to be visible in the category (this includes those with a master_categories_id of as well as those linked to the category being re-enabled). Taking a step back further though, it is possible that a category has other sub-categories that were disabled which also may need to be re-enabled, but that would be yet another set of queries compared to the two I would generate from the above.

    So, the one where the product are rooted in the category. First for either of these, need to identify the categories id which is the number to the left of the categories name.

    Code:
    UPDATE products SET products_status = 1 WHERE master_categories_id = N AND products_status = 0;
    Where N is the value of the categories_id that has the product to be enabled.

    The second which affects linked product as well:
    Code:
    UPDATE products p SET p.products_status = 1 WHERE p.products_id IN (SELECT p2c.products_id FROM products_to_categories p2c WHERE p2c.categories_id = N) AND p.products_status = 0;
    Again where N is the categories_id as previously discovered.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

 

 

Similar Threads

  1. Hiding Categories
    By Ally71 in forum Setting Up Categories, Products, Attributes
    Replies: 26
    Last Post: 26 Jan 2011, 07:28 AM
  2. hiding categories
    By ian healy in forum General Questions
    Replies: 2
    Last Post: 28 Apr 2008, 04:44 AM
  3. Hiding the top categories
    By maclancer in forum General Questions
    Replies: 0
    Last Post: 23 Jul 2007, 11:35 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR