Thread: hideCategories

Results 1 to 10 of 487

Hybrid View

  1. #1
    Join Date
    Dec 2008
    Posts
    4
    Plugin Contributions
    0

    Default Re: hideCategories

    Love this mod Steven. This is exactly what I needed for my site.

    Like a couple others on this thread, I use the top category tab and wanted a way to hide the categories there as well. I came up with this solution that is working for me....

    copy: /includes/modules/categories_tab.php
    to: /includes/modules/YOURTEMPLATE/categories_tab.php

    around line 31, replace the code:
    PHP Code:
    $categories_tab_query "select c.categories_id, cd.categories_name from " .

    TABLE_CATEGORIES " c, " TABLE_CATEGORIES_DESCRIPTION " cd

                              where c.categories_id=cd.categories_id and c.parent_id= '0' and cd.language_id='" 
    . (int)$_SESSION['languages_id'] . "' and c.categories_status='1'" 

    with new code:
    PHP Code:
    $categories_tab_query "select c.categories_id, cd.categories_name from " .

    TABLE_CATEGORIES " c, " TABLE_CATEGORIES_DESCRIPTION " cd," TABLE_HIDE_CATEGORIES " cde

                              where c.categories_id=cd.categories_id and c.categories_id=cde.categories_id and c.parent_id= '0' and cd.language_id='" 
    . (int)$_SESSION['languages_id'] . "' and c.categories_status='1' and cde.visibility_status='0'" 
    This adds an argument to the query to check the visibility status and hide any category that is not set to normal.

    As with another post I read in this thread, this does require that all of your categories have a hide_categories value in the database. The other post noted this could be done through editing the database to add the value. Being a novice, I don't like to directly edit the database and found a different solution. For new categories, or categories that were created before installing the hide mod, edit the category to be hidden, save, then re-edit to normal. This creates the record needed in the database.

    Hope this helps.

  2. #2
    Join Date
    Jun 2005
    Location
    Kelowna, BC Canada
    Posts
    1,075
    Plugin Contributions
    6

    Default Re: hideCategories

    Great addition! Thanks Bumpspt.

  3. #3
    Join Date
    Feb 2009
    Posts
    4
    Plugin Contributions
    0

    Default Re: hideCategories

    This is the mod I have been looking for! I have installed (run the scripts and copied the files to the server) it but there is a little problem. After I edited the category to be "Hidden", in the admin panel the folder icon changes to a lighter colour, however, in the storefront the category is not hidden. I am using v1.3.8.

    Appreciate your help

  4. #4
    Join Date
    Feb 2009
    Posts
    4
    Plugin Contributions
    0

    Default Re: hideCategories

    ./includes/templates/YOUR_TEMPLATE/templates/tpl_products_all_default.php


    does YOUR_TEMPLATE means the name of my template? does it need to be changed for the mod to work?

    Thanks

  5. #5
    Join Date
    Feb 2009
    Posts
    4
    Plugin Contributions
    0

    Default Re: hideCategories

    yes! that was my problem!

    After pulling hair for 2 days, self-resolved

  6. #6
    Join Date
    Feb 2009
    Posts
    4
    Plugin Contributions
    0

    Default Re: hideCategories

    Quote Originally Posted by bumpspt View Post
    Love this mod Steven. This is exactly what I needed for my site.

    Like a couple others on this thread, I use the top category tab and wanted a way to hide the categories there as well. I came up with this solution that is working for me....

    copy: /includes/modules/categories_tab.php
    to: /includes/modules/YOURTEMPLATE/categories_tab.php

    around line 31, replace the code:
    PHP Code:
    $categories_tab_query "select c.categories_id, cd.categories_name from " .

    TABLE_CATEGORIES " c, " TABLE_CATEGORIES_DESCRIPTION " cd

                              where c.categories_id=cd.categories_id and c.parent_id= '0' and cd.language_id='" 
    . (int)$_SESSION['languages_id'] . "' and c.categories_status='1'" 

    with new code:
    PHP Code:
    $categories_tab_query "select c.categories_id, cd.categories_name from " .

    TABLE_CATEGORIES " c, " TABLE_CATEGORIES_DESCRIPTION " cd," TABLE_HIDE_CATEGORIES " cde

                              where c.categories_id=cd.categories_id and c.categories_id=cde.categories_id and c.parent_id= '0' and cd.language_id='" 
    . (int)$_SESSION['languages_id'] . "' and c.categories_status='1' and cde.visibility_status='0'" 
    This adds an argument to the query to check the visibility status and hide any category that is not set to normal.

    As with another post I read in this thread, this does require that all of your categories have a hide_categories value in the database. The other post noted this could be done through editing the database to add the value. Being a novice, I don't like to directly edit the database and found a different solution. For new categories, or categories that were created before installing the hide mod, edit the category to be hidden, save, then re-edit to normal. This creates the record needed in the database.

    Hope this helps.

    I installed the original hide categories mod alright. I followed the above instructions to install your mod, but the zen cart page become blank (only head banner is displayed) after the mod is installed, what might the problem be? Thanks

 

 

Similar Threads

  1. how to get hidecategories an dual pricing to work
    By davidweaver88 in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 4 Jun 2012, 03:35 PM
  2. anyone using HideCategories in 1.3.9d??
    By redheads in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 8 Jun 2010, 06:54 AM
  3. HideCategories problem...
    By ShadowAngel in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 10 Nov 2009, 10:17 PM
  4. hideCategories Module
    By marcusimages in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 25 Aug 2009, 06:31 PM

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