Page 5 of 15 FirstFirst ... 34567 ... LastLast
Results 41 to 50 of 143
  1. #41
    Join Date
    Jan 2005
    Location
    USA, St. Louis
    Posts
    3,710
    Plugin Contributions
    9

    Default Re: Category Drop Down SELECT Menu Sidebox Mod.

    Quote Originally Posted by Rookie gone MAD! View Post
    Hi!
    i want to use the categories_select side box module but would like to know how to add the new products, all products, featured products and specials, ect links like on the standard catagories list?

    also i want to be able to switch the subcatagories off?

    can anyone help PLEASE?
    I've got the fix for people who want NO SUB CATEGORIES showing in their drop down menu.

    First, open up includes/functions/functions_categories.php

    Save a backup, as this is a core override, and there is no override folder for function files.

    Then add this new function:

    Code:
    function zen_get_categories_no_sub($categories_array = '', $parent_id = '0', $indent = '', $status_setting = '') {
        global $db;
    
        if (!is_array($categories_array)) $categories_array = array();
    
        // show based on status
        if ($status_setting != '') {
          $zc_status = " c.categories_status='" . (int)$status_setting . "' and ";
        } else {
          $zc_status = '';
        }
    
        $categories_query = "select c.categories_id, cd.categories_name, c.categories_status
                             from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd
                             where " . $zc_status . "
                             parent_id = '" . (int)$parent_id . "'
                             and c.categories_id = cd.categories_id
                             and cd.language_id = '" . (int)$_SESSION['languages_id'] . "'
                             order by sort_order, cd.categories_name";
    
        $categories = $db->Execute($categories_query);
    
        while (!$categories->EOF) {
          $categories_array[] = array('id' => $categories->fields['categories_id'],
                                      'text' => $indent . $categories->fields['categories_name']);
          
          $categories->MoveNext();
        }
    
        return $categories_array;
      }
    
    ////
    You can add it wherever you want, I added it right after the code for function zen_get_categories.

    Now open up includes/templates/YOUR_TEMPLATE/sideboxes/tpl_categories_select.php

    and change:

    zen_get_categories

    to

    zen_get_categories_no_sub

    VOILA!

  2. #42
    Join Date
    Aug 2007
    Posts
    37
    Plugin Contributions
    0

    Default Re: Category Drop Down SELECT Menu Sidebox Mod.



    i havnt had time to try this yet but if it works . . . . oh. . . i could kiss you

    WOOOOOOooooooooooooo! GOD im happy NOW

  3. #43
    Join Date
    Jan 2005
    Location
    USA, St. Louis
    Posts
    3,710
    Plugin Contributions
    9

    Default Re: Category Drop Down SELECT Menu Sidebox Mod.

    Quote Originally Posted by Rookie gone MAD! View Post


    i havnt had time to try this yet but if it works . . . . oh. . . i could kiss you

    WOOOOOOooooooooooooo! GOD im happy NOW
    Just let me know how it works for you, it worked on my test site.

  4. #44
    Join Date
    Aug 2007
    Posts
    37
    Plugin Contributions
    0

    red flag Re: Category Drop Down SELECT Menu Sidebox Mod.

    Quote Originally Posted by jettrue View Post
    Just let me know how it works for you, it worked on my test site.
    THANKS
    its worked amazingly

    YOU'RE AWSOME!

    THANKS AGAIN

  5. #45
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    163
    Plugin Contributions
    0

    Default Re: Category Drop Down SELECT Menu Sidebox Mod.

    Does the above remove ALL subcategories? I actually just want to display parent, and subcategories, but not any of the sub categories child categories. Any thoughts?

  6. #46
    Join Date
    Jan 2005
    Location
    USA, St. Louis
    Posts
    3,710
    Plugin Contributions
    9

    Default Re: Category Drop Down SELECT Menu Sidebox Mod.

    Quote Originally Posted by magneteye View Post
    Does the above remove ALL subcategories? I actually just want to display parent, and subcategories, but not any of the sub categories child categories. Any thoughts?
    Sorry, its either one or the other....

  7. #47
    Join Date
    Aug 2006
    Posts
    15
    Plugin Contributions
    0

    Default Re: Category Drop Down SELECT Menu Sidebox Mod.

    Hi!

    I have tried searching for this, but i get no matches. So i'm sorry if this is a second request...

    Do you have a sulotion for highlighting the selected parent category? So when i am at the home page, the home "button" stays selected and when i browse a category, the top level category stays selected in the menu?

    THanks!

    Grtz Lenny

  8. #48
    Join Date
    Aug 2006
    Posts
    15
    Plugin Contributions
    0

    Default Re: Category Drop Down SELECT Menu Sidebox Mod.

    Quote Originally Posted by magneteye View Post
    Does the above remove ALL subcategories? I actually just want to display parent, and subcategories, but not any of the sub categories child categories. Any thoughts?
    You could try this:

    in tpl_drop_menu.php

    comment out in this section:

    PHP Code:
     require_once (DIR_WS_CLASSES 'categories_ul_generator.php');
     
    $zen_CategoriesUL = new zen_categories_ul_generator;
     
    $menulist $zen_CategoriesUL->buildTree(true);
     
    $menulist str_replace('"level4"','"level5"',$menulist);
     
    $menulist str_replace('"level3"','"level4"',$menulist);
     
    $menulist str_replace('"level2"','"level3"',$menulist);
     
    $menulist str_replace('"level1"','"level2"',$menulist); 
    these lines:

    PHP Code:
     require_once (DIR_WS_CLASSES 'categories_ul_generator.php');
     
    $zen_CategoriesUL = new zen_categories_ul_generator;
     
    $menulist $zen_CategoriesUL->buildTree(true);
     
    //$menulist = str_replace('"level4"','"level5"',$menulist);
     //$menulist = str_replace('"level3"','"level4"',$menulist);
     //$menulist = str_replace('"level2"','"level3"',$menulist);
     
    $menulist str_replace('"level1"','"level2"',$menulist); 
    If this is a subcategory to many, remove the //from the lowest of 3 lines.

    Works for me.

    just a note: this is without the new function. Just the original files.
    Last edited by lenny; 4 Nov 2007 at 09:59 PM. Reason: just a note: this is without the new function. Just the original files.

  9. #49
    Join Date
    Jan 2005
    Location
    USA, St. Louis
    Posts
    3,710
    Plugin Contributions
    9

    Default Re: Category Drop Down SELECT Menu Sidebox Mod.

    Quote Originally Posted by lenny View Post
    Hi!

    I have tried searching for this, but i get no matches. So i'm sorry if this is a second request...

    Do you have a sulotion for highlighting the selected parent category? So when i am at the home page, the home "button" stays selected and when i browse a category, the top level category stays selected in the menu?

    THanks!

    Grtz Lenny
    No, sorry, I don't.

  10. #50
    Join Date
    Jan 2006
    Location
    UK
    Posts
    43
    Plugin Contributions
    0

    bug Re: Category Drop Down SELECT Menu Sidebox Mod. HELP NEEDED for Firefox error

    This mod is absoutely fab and really easy to install so firstly thankyou very much!

    i have installed it fine and in internet exploder7 it looks great, however if i test it on my mac or my pc using firefox, the css formatting is completely ignored for the menu and it blows the layout all over the place

    i saw a post where a user seemed to have a simliar problem - but there was no reply. apologies if this has already been asnwered -

    www.ppekit.co.uk.

    I'd be really grateful for your help on this, hoping to get the site live shortly and i'd like to iron out all the blips before i present to my client.

    thanks

    sarah

 

 
Page 5 of 15 FirstFirst ... 34567 ... LastLast

Similar Threads

  1. Select an accessory drop-down menu
    By DML73 in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 24 Nov 2013, 06:40 PM
  2. How do I change the music genre select sidebar to use a drop down menu???
    By vicariousk in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 1 Apr 2011, 10:04 PM
  3. Adding a drop down menu to a sidebox
    By BigNath in forum Basic Configuration
    Replies: 2
    Last Post: 17 Jul 2008, 06:15 PM
  4. Mod CC month drop down menu?
    By re_active in forum Built-in Shipping and Payment Modules
    Replies: 2
    Last Post: 9 Sep 2006, 08:21 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