Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2008
    Posts
    150
    Plugin Contributions
    0

    Default Hide category links in CSS Flyout Menu without disabling them

    v157c with Bootstrap template.
    I've installed the CSS Flyout Menu, and it's working great. However, I need to remove or hide some of the main category links that are duplicates of those featured in my header navigation.
    How do I remove the unwanted categories from the CSS Flyout Menu without deactivating the categories in my shop?

  2. #2
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Hide category links in CSS Flyout Menu without disabling them

    It might work by editing the categories_ul_generator.php file by adding the additional AND statement as shown:
    Code:
        function __construct($load_from_database = true)
        {
            global $db;
            $this->data = array();
            $categories_query = "SELECT c.categories_id, cd.categories_name, c.parent_id
                                 FROM " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd
                                 WHERE c.categories_id = cd.categories_id
                                 AND c.categories_status = 1
                                 AND cd.language_id = " . (int)$_SESSION['languages_id'] . "
                         AND c.categories_id NOT IN (5,6,7,8)
                                 ORDER BY c.parent_id, c.sort_order, cd.categories_name";
            $categories = $db->Execute($categories_query);
    and substituting your own comma-separated list of category id numbers in place of 5,6,7,8
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Apr 2008
    Posts
    150
    Plugin Contributions
    0

    Default Re: Hide category links in CSS Flyout Menu without disabling them

    Quote Originally Posted by DrByte View Post
    It might work by editing the categories_ul_generator.php file by adding the additional AND statement as shown:
    Code:
        function __construct($load_from_database = true)
        {
            global $db;
            $this->data = array();
            $categories_query = "SELECT c.categories_id, cd.categories_name, c.parent_id
                                 FROM " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd
                                 WHERE c.categories_id = cd.categories_id
                                 AND c.categories_status = 1
                                 AND cd.language_id = " . (int)$_SESSION['languages_id'] . "
                         AND c.categories_id NOT IN (5,6,7,8)
                                 ORDER BY c.parent_id, c.sort_order, cd.categories_name";
            $categories = $db->Execute($categories_query);
    and substituting your own comma-separated list of category id numbers in place of 5,6,7,8
    Yes, that's it! It works better than I hoped since it can be applied to multiple level subcategories too. Brilliant, DrByte. Thank you!

 

 

Similar Threads

  1. Replies: 16
    Last Post: 2 May 2014, 10:07 PM
  2. Replies: 8
    Last Post: 30 Jul 2011, 03:54 PM

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