Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1
    Join Date
    Jan 2008
    Posts
    74
    Plugin Contributions
    0

    Default How can I Customize Category Tabs Menu (names, bg color, size)

    New install of 1.5.5e and using template_default .

    How can I customize the category tabs menu? I want to change which categories are listed across the horizonal bar as well as limit the number of categories offered (we have a complete list of categories on the l.h. side, no need for all of them on the horizontal menu as well).

    I'd also like to change the height and background color (blue with a 1px red border on top and bottom). As well as make the font a bit larger.

    I've figured out where to turn the category tabs menu on and off (via admin/config/layout settings/categories-tabs menu ... but have not been able to find out how to edit/customize the menu.

    Thx.

  2. #2
    Join Date
    Jan 2008
    Posts
    74
    Plugin Contributions
    0

    Default Re: How can I Customize Category Tabs Menu (names, bg color, size)

    EDITED TO ADD: For those looking for instructions on how to change background color of Category Tabs Menu (the horizontal navigation bar on the main page), I changed my template css stylesheet (includes/templates/CUSTOM/css/stylesheet.css ) as follows:

    Search for #navCatTabsWrapper and customize as follows (separate out from navMainWrapper, etc):

    #navCatTabsWrapper {
    background-color:#1e458a;
    border-style: solid;
    border-color:#c02721;
    border-width:1px;
    }

    HOWEVER ... I STILL NEED help figuring out how to edit the names (and limit #) of categories listed horizontally in the Category Tabs Menu. Any help gratefully appreciated. I've search through style sheets and header files but am not familiar enough in PHP to know how to read/find where to change and also what code is neeeded once I find it. THX.

  3. #3
    Join Date
    Jan 2004
    Posts
    66,380
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: How can I Customize Category Tabs Menu (names, bg color, size)

    /includes/modules/YOUR_TEMPLATE/categories_tabs.php - contains the SQL query that retrieves which tabs to display
    (if you don't have one in your custom template folder, copy from /includes/modules, and customize)

    /includes/templates/YOUR_TEMPLATE/templates/tpl_modules_categories_tabs.php - outputs the tabs when asked to do so by the template (main page or nav).
    (if you don't have one in your custom template folder, copy from template_default, and customize)
    .

    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.

  4. #4
    Join Date
    Jan 2008
    Posts
    74
    Plugin Contributions
    0

    Default Re: How can I Customize Category Tabs Menu (names, bg color, size)

    Thanks, DrByte. I've copied the categories_tabs.php in my /includes/modules/CUSTOM/ directory. However, I do not know how to edit the SQL query. (This is a non-profit educational site and I'm pretty much all they have to get this store up ... and as you can tell, I certainly have my limitations.)

    Currently, the category tabs menu is showing waaaay too many categories:

    1) AATF Membership 2) Société honoraire de français 3) Saint Louis Convention 4) Jeunes Amis du Français 5) Promotional Materials 5) Pedagogical Materials 6) Merchandise 7) Publications 8) Awards 9) National French Week 10) Materials and 11) Contributions


    They would like to show only:
    AATF Membership
    Honor Societies
    Merchandise/Materials
    Publications
    Awards
    ("Honor Societies" link would go to "Société honoraire de français" category, and "Merchandise/Materials" would go to "Merchandise" category)

    How would I best accomplish this? Can you help me with the SQL query verbiage or is that outside the limits of the forum?

  5. #5
    Join Date
    Jan 2008
    Posts
    74
    Plugin Contributions
    0

    Default Re: How can I Customize Category Tabs Menu (names, bg color, size)

    Thanks DrByte. I have copied the categories_tabs.php file into the /includes/modules/CUSTOM/ folder. However, I am not conversant in SQL queries. (This is an educational non-profit and I'm pretty much all they have to get this store online ... and as you can see, I definitely have my limitations! )

    I think the tpl_modules_categories_tabs.php file is fine since the output DOES actually go where it's supposed to go (ie, the category tabs menu).

    Currently, the category tabs menu is showing waaaaaay too many categories:
    1) AATF Membership 2) Société honoraire de français 3) Saint Louis Convention 4) Jeunes Amis du Français 5) Promotional Materials 6) Pedagogical Materials 7) Merchandise 8) Publications 9) Awards 10) National French Week 11) Materials and 12) Contributions

    We would like it to show only:
    AATF MEMBERSHIP
    HONOR SOCIETIES
    MERCHANDISE/MATERIALS
    PUBLICATIONS
    AWARDS
    (with "Honor Societies" going to the Société honoraire de français category, and Merchandise/Materials going to the Merchandise category).

    How can we best accomplish this? Can you help with the SQL verbiage or is that beyond the scope of free (and much appreciated <g>) Zen Cart advice?

    Also, is there a way to have the category tabs in all caps? Or are we stuck with initial cap links?

    Thnks so much.

  6. #6
    Join Date
    Jan 2004
    Posts
    66,380
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: How can I Customize Category Tabs Menu (names, bg color, size)

    Well, with only the names to go by, it's a bit ugly to write a query for that.

    What are the category ID numbers for those?



    You can use CSS to transform the text to all caps.
    .

    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.

  7. #7
    Join Date
    Jan 2008
    Posts
    74
    Plugin Contributions
    0

    Default Re: How can I Customize Category Tabs Menu (names, bg color, size)

    Checking on category IDs and will post in a few moments .

    1 AATF Membership
    2 Société honoraire de français (will be HONOR SOCIETIES)
    9 Merchandise (will be Merchandise/Materials)
    5 Publications
    7 Awards

    Also, here is the site (so far) if that helps. (It is down for maintenance but I can turn it on if you need access).
    http://store.frenchteachers.org/inde...or_maintenance

    Re category IDs ... those are the numbers directly to the left when I access category/product page, yes? (Those are the numbers I put down above).

  8. #8
    Join Date
    Jan 2004
    Posts
    66,380
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: How can I Customize Category Tabs Menu (names, bg color, size)

    Add the line shown, including the trailing 'dot':
    Code:
    $order_by = " order by c.sort_order, cd.categories_name ";
    
    $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'" .
                              " and categories_id in (1,2,9,5,7) " . 
    $order_by;
    $categories_tab = $db->Execute($categories_tab_query);
    .

    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.

  9. #9
    Join Date
    Jan 2008
    Posts
    74
    Plugin Contributions
    0

    Default Re: How can I Customize Category Tabs Menu (names, bg color, size)

    Hrmmmm ... menu and bottom half of page disappear so I suspect I did something wrong. This is the entire categories_tabs.php file (including the line of code you gave me). I've double-checked that it was added to the includes/modules/aatf_template/ directory.

    Code:
    <?php
    /**
     * categories_tabs.php module
     *
     * @package templateSystem
     * @copyright Copyright 2003-2006 Zen Cart Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version $Id: categories_tabs.php 3018 2006-02-12 21:04:04Z wilt $
     */
    if (!defined('IS_ADMIN_FLAG')) {
      die('Illegal Access');
    }
    $order_by = " order by c.sort_order, cd.categories_name ";
    
    $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'" .
    					      " and categories_id in (1,2,9,5,7) " .
    $order_by;
    $categories_tab = $db->Execute($categories_tab_query);
    
    $links_list = array();
    while (!$categories_tab->EOF) {
    
      // currently selected category
      if ((int)$cPath == $categories_tab->fields['categories_id']) {
        $new_style = 'category-top';
        $categories_tab_current = '<span class="category-subs-selected">' . $categories_tab->fields['categories_name'] . '</span>';
      } else {
        $new_style = 'category-top';
        $categories_tab_current = $categories_tab->fields['categories_name'];
      }
    
      // create link to top level category
      $links_list[] = '<a class="' . $new_style . '" href="' . zen_href_link(FILENAME_DEFAULT, 'cPath=' . (int)$categories_tab->fields['categories_id']) . '">' . $categories_tab_current . '</a> ';
      $categories_tab->MoveNext();
    }
    
    ?>

  10. #10
    Join Date
    Jan 2008
    Posts
    74
    Plugin Contributions
    0

    Default Re: How can I Customize Category Tabs Menu (names, bg color, size)

    BTW, looked at error log (you guys are teaching me). I'm not sure what it means but here's what it says:

    Code:
    [07-Aug-2017 19:47:49 America/Chicago] Request URI: /index.php?main_page=down_for_maintenance, IP address: 73.2.80.244
    #1  trigger_error() called at [/home/french/www/store/includes/classes/db/mysql/query_factory.php:167]
    #2  queryFactory->show_error() called at [/home/french/www/store/includes/classes/db/mysql/query_factory.php:139]
    #3  queryFactory->set_error() called at [/home/french/www/store/includes/classes/db/mysql/query_factory.php:266]
    #4  queryFactory->Execute() called at [/home/french/www/store/includes/modules/aatf_template/categories_tabs.php:21]
    #5  include(/home/french/www/store/includes/modules/aatf_template/categories_tabs.php) called at [/home/french/www/store/includes/templates/aatf_template/templates/tpl_modules_categories_tabs.php:14]
    #6  require(/home/french/www/store/includes/templates/aatf_template/templates/tpl_modules_categories_tabs.php) called at [/home/french/www/store/includes/templates/aatf_template/common/tpl_header.php:97]
    #7  require(/home/french/www/store/includes/templates/aatf_template/common/tpl_header.php) called at [/home/french/www/store/includes/templates/template_default/common/tpl_main_page.php:84]
    #8  require(/home/french/www/store/includes/templates/template_default/common/tpl_main_page.php) called at [/home/french/www/store/index.php:97]
    
    [07-Aug-2017 19:47:49 America/Chicago] PHP Fatal error:  1052:Column 'categories_id' in where clause is ambiguous :: select c.categories_id, cd.categories_name from categories c, categories_description cd
                              where c.categories_id=cd.categories_id and c.parent_id= '0' and cd.language_id='1' and c.categories_status='1' and categories_id in (1,2,9,5,7)  order by c.sort_order, cd.categories_name  ==> (as called by) /home/french/www/store/includes/modules/aatf_template/categories_tabs.php on line 21 <== in /home/french/www/store/includes/classes/db/mysql/query_factory.php on line 167

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v151 How To Customize Categories-Tabs Menu?
    By erix in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 23 Sep 2012, 08:00 PM
  2. How to Customize Category Tabs with Image Buttons?
    By BlackOrchidCouture in forum Templates, Stylesheets, Page Layout
    Replies: 17
    Last Post: 24 Jul 2010, 05:45 PM
  3. Categories-Tabs? Can I customize?
    By danwebman in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 26 Nov 2008, 08:51 PM
  4. Category Tabs Menu - How to add a character between
    By fightthefourwalls in forum Setting Up Categories, Products, Attributes
    Replies: 3
    Last Post: 28 Mar 2008, 09:37 AM
  5. How can my Category Tabs be ON....when they're OFF??
    By NattyCat in forum Templates, Stylesheets, Page Layout
    Replies: 15
    Last Post: 1 Jun 2006, 11:22 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