Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1
    Join Date
    Aug 2006
    Posts
    134
    Plugin Contributions
    0

    Default 'Hide' a category rather than 'Disable' it?

    I would like to 'hide' a category from visitors rather than 'disable' it in admin - the items in the category are linked to other categories but I would like them to be active in the store and visible to visitors only in the 'linked' category and for the 'main' category to not visible to visitors - so the items only appear once in the store.

    If this is possible, can anyone advise me how to do it??

    ---------

    Background Reason.
    I have a number of items which are too heavy to ship and require collection only, but each item is from a different 'category' - eg exercise equipment or tooling.

    I have seen a mod by AJEH which will allow me to only have 'store pickup' as an option for a specific category (using a hard code of the category ID).
    However this requires all 'collection only' items to be in the same category (eg 'Store Pickup') rather than in their 'real' categories.

    My thought was to add all collection only items to the same category ('Store Pickup') then to 'link' them to their correct categories for viewing - BUT to hide the 'Store Pickup' category so they don't appear twice in the store.

  2. #2
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,021
    Plugin Contributions
    3

    Default Re: 'Hide' a category rather than 'Disable' it?


  3. #3
    Join Date
    Jul 2012
    Posts
    16,817
    Plugin Contributions
    17

    Default Re: 'Hide' a category rather than 'Disable' it?

    Quote Originally Posted by pewe View Post
    I would like to 'hide' a category from visitors rather than 'disable' it in admin - the items in the category are linked to other categories but I would like them to be active in the store and visible to visitors only in the 'linked' category and for the 'main' category to not visible to visitors - so the items only appear once in the store.

    If this is possible, can anyone advise me how to do it??

    ---------

    Background Reason.
    I have a number of items which are too heavy to ship and require collection only, but each item is from a different 'category' - eg exercise equipment or tooling.

    I have seen a mod by AJEH which will allow me to only have 'store pickup' as an option for a specific category (using a hard code of the category ID).
    However this requires all 'collection only' items to be in the same category (eg 'Store Pickup') rather than in their 'real' categories.

    My thought was to add all collection only items to the same category ('Store Pickup') then to 'link' them to their correct categories for viewing - BUT to hide the 'Store Pickup' category so they don't appear twice in the store.
    Are you sure that it "requires" the product to have a master category of this "collection only" category and that it can not be the linked item? That way after some other changes possibly, the collection only category may be turned off without any effect? Depending on what is needed through the process path, a link is generated in another table when a product is linked and therefore it could be looked up with a slight change of the SQL that was provided to solve the problem; however, if later SQL statements (core related) must be changed, I would stick with the path of trying to hide the category rather than do too much custom coding.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  4. #4
    Join Date
    Aug 2006
    Posts
    134
    Plugin Contributions
    0

    Default Re: 'Hide' a category rather than 'Disable' it?

    Quote Originally Posted by mc12345678 View Post
    Are you sure that it "requires" the product to have a master category of this "collection only" category and that it can not be the linked item?
    I need for the master category of the product to be the one that is hidden, and the product to be linked to the 'real' category - but when I disable the master category in admin the products are disabled too - so they no longer appear in their 'real' category.

    I have found a way to do what I need.

    I manually set the 'status' for the required category to hidden (0) in the sql database. This disables the category from viewing in the store. However, because the products in the category still have a status of 'not disabled' (1), they still appear in the 'real' categories in the store.
    So my needs are satisfied for present - unless I find this manual alteration to the category status affects something else too.

    So obviously the way the 'disable' function is written for categories it also sets the 'disabled' fag for the products in the category, but I guess for a coder it would be a simple enough mod to add an option in admin such that when disabling the category it allowed for the possibility to NOT disable the linked products - but not being a coder I may be mistaken on that.

  5. #5
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,021
    Plugin Contributions
    32

    Default Re: 'Hide' a category rather than 'Disable' it?

    Quote Originally Posted by stevesh View Post
    I have.. hideCategories will do exactly what the OP is after..
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

  6. #6
    Join Date
    Aug 2006
    Posts
    134
    Plugin Contributions
    0

    Default Re: 'Hide' a category rather than 'Disable' it?

    Quote Originally Posted by DivaVocals View Post
    I have.. hideCategories will do exactly what the OP is after..
    Thanks Diva.
    I looked at that plugin and there seemed to be a lot of files to upload/modify, so when I discovered that manually altering the database 'status' field did the job I thought I'd try that first - and it seems to work.

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

    Default Re: 'Hide' a category rather than 'Disable' it?

    Quote Originally Posted by pewe View Post
    I need for the master category of the product to be the one that is hidden, and the product to be linked to the 'real' category - but when I disable the master category in admin the products are disabled too - so they no longer appear in their 'real' category.

    I have found a way to do what I need.

    I manually set the 'status' for the required category to hidden (0) in the sql database. This disables the category from viewing in the store. However, because the products in the category still have a status of 'not disabled' (1), they still appear in the 'real' categories in the store.
    So my needs are satisfied for present - unless I find this manual alteration to the category status affects something else too.

    So obviously the way the 'disable' function is written for categories it also sets the 'disabled' fag for the products in the category, but I guess for a coder it would be a simple enough mod to add an option in admin such that when disabling the category it allowed for the possibility to NOT disable the linked products - but not being a coder I may be mistaken on that.
    So, again not knowing the spcific change(s) made to get the concept to work, my thought was to see if the information could be gathered through the use of the product_to_categories table in such a way that the product's master category would be the original and it would be linked to the "special" category. That way the special category could be disabled, which would leave the original category and its product(s) active, and that possibly the unique code to handle the special category would ignore the disabled status.
    I state this also without knowing the affect of disabling a category that has a product linked to it, whether. The link is removed from the table, or anything else that would require a manual change like described above. (Make sure you leave yourself some good documentation about that process, never know how often or little you may need to use it and maybe one day will go a route that is controlled more than manually making changes.)
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  8. #8
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,021
    Plugin Contributions
    32

    Default Re: 'Hide' a category rather than 'Disable' it?

    Quote Originally Posted by pewe View Post
    Thanks Diva.
    I looked at that plugin and there seemed to be a lot of files to upload/modify, so when I discovered that manually altering the database 'status' field did the job I thought I'd try that first - and it seems to work.
    It's a lot of files because products and categories appear in MANY places.. hideCategories makes sure that hidden products and categories don't "accidentally" appear where you don't want them to appear. (site maps, search results, etc..)
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

  9. #9
    Join Date
    Aug 2006
    Posts
    134
    Plugin Contributions
    0

    Default Re: 'Hide' a category rather than 'Disable' it?

    Quote Originally Posted by DivaVocals View Post
    It's a lot of files because products and categories appear in MANY places.. hideCategories makes sure that hidden products and categories don't "accidentally" appear where you don't want them to appear. (site maps, search results, etc..)
    Once again, thanks for the input guys.

    Diva.

    I am not too concerned about the category showing up elsewhere - as long as it does not appear in the store pages.
    In my situation I am not trying to keep anything from my visitors as all the items in the hidden category (now named 'Collection Only') are visible elsewhere - I am just keeping the category from view to avoid confusion in the store as the same product (and there is only one of each) would appear twice.

    Strangely though , when I view the Site Map all the other categories show - except the Collection Only, and if I do a search on the name of the category, the only items showing up are those which have 'collection only' in their description - which is as I want.

    So it appears my 'method' appears to be working for me - although it may not be for others for the reasons you mention.

    Thanks again.

  10. #10
    Join Date
    Nov 2007
    Location
    Sunny Coast, Australia
    Posts
    3,378
    Plugin Contributions
    9

    Default Re: 'Hide' a category rather than 'Disable' it?

    Quote Originally Posted by pewe View Post
    ..............I have a number of items which are too heavy to ship and require collection only, but each item is from a different 'category' - eg exercise equipment or tooling.

    I have seen a mod by AJEH which will allow me to only have 'store pickup' as an option for a specific category (using a hard code of the category ID).
    However this requires all 'collection only' items to be in the same category (eg 'Store Pickup') rather than in their 'real' categories.

    My thought was to add all collection only items to the same category ('Store Pickup') then to 'link' them to their correct categories for viewing - BUT to hide the 'Store Pickup' category so they don't appear twice in the store.
    No need to go through all that hassle in setting up a cat and then hiding it etc etc

    My PDP mod (see http://www.zen-cart.com/downloads.php?do=file&id=1702 ) lets you configure individual items as Store Pickup / Local Delivery Only. Just make sure you uninstall Store Pickup before uploading the modified files and then re-install it after the mod is installed.

    Cheers / Frank

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Disable/Hide Category and not the products
    By ivogue in forum Setting Up Categories, Products, Attributes
    Replies: 11
    Last Post: 20 Dec 2018, 07:41 PM
  2. view rather than downlaod video
    By vwebworld in forum Setting Up Categories, Products, Attributes
    Replies: 3
    Last Post: 12 May 2010, 12:51 PM
  3. A thank you rather than a question
    By Simonuk in forum General Questions
    Replies: 3
    Last Post: 1 Aug 2008, 04:10 PM
  4. Sending to Fax Rather than Email
    By innovafire in forum General Questions
    Replies: 1
    Last Post: 15 Jan 2008, 05:14 AM

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