Results 1 to 2 of 2

Hide Parent Category and Display only Child or Sub Category in a DHTML menu

This is a discussion on Hide Parent Category and Display only Child or Sub Category in a DHTML menu within the New osCommerce Contributions forums, part of the osCommerce 2.2 Forums category; If you want to display only the child (sub categories) in a dhtml menu , use this code. this will ...

      
  1. #1
    osCMax Developer

    michael_s's Avatar
    Join Date
    Jul 2002
    Location
    Phoenix, AZ
    Posts
    19,501
    Rep Power
    567


    Post Hide Parent Category and Display only Child or Sub Category in a DHTML menu

    If you want to display only the child (sub categories) in a dhtml menu , use this code. this will hide the parent category

    Use at your own risk and always back up

    Just change

    $categories_query_catmenu = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " .

    TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . $currentParID . "' and c.categories_id = cd.categories_id and cd.language_id='" . $languages_id

    ."' order by sort_order, cd.categories_name");

    to



    $categories_query_catmenu = tep_db_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 cd.language_id='" . $languages_id ."' order by sort_order,

    cd.categories_name");

    Thats all

    Easy and Simple

    Same instruction is in a text file to download..no other additions

    - Sarath

    More...
    Michael Sasek
    osCMax Developer


    osCmax installation service - Have our professionals install osCmax on your server - same day service!
    osCmax 2.0 User Manual - the must have beginners guide to osCmax v2.0

    Stay Up To Date with everything osCMax:
    Free osCMax Newsletters - Security notices, New Releases, osCMax News
    osCMax on Twitter - Up to the minute info as it happens. Know it first.

    osCmax Documentation

  2. #2
    New Member
    Join Date
    Mar 2005
    Location
    Prescott Arizona
    Posts
    5
    Rep Power
    0


    Default Re: Hide Parent Category and Display only Child or Sub Category in a DHTML menu

    Does this technique work with this contribution? I have successfully installed and activated the following:

    CSS Category just like dhtml but seo friendly

    --------------------------------

Similar Threads

  1. CSS Category just like dhtml but seo friendly
    By bkpie in forum osCmax v2 Customization/Mods
    Replies: 17
    Last Post: 03-29-2009, 04:42 PM
  2. Temporary hide a category
    By yulises in forum osCmax v2 Customization/Mods
    Replies: 2
    Last Post: 05-15-2008, 04:34 AM
  3. Specials & Products_new sort category & sub-category dropdown menu
    By michael_s in forum New osCommerce Contributions
    Replies: 0
    Last Post: 03-02-2008, 10:23 PM
  4. Dhtml Menu does not display.
    By Walter in forum osCMax v2 Features Discussion
    Replies: 8
    Last Post: 02-21-2007, 09:09 AM
  5. Dhtml category menu not working correctly
    By JohnW in forum osCommerce 2.2 Modification Help
    Replies: 10
    Last Post: 11-19-2004, 09:04 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
  •