Page 1 of 3 123 LastLast
Results 1 to 10 of 21
  1. #1
    Join Date
    Mar 2011
    Location
    Europe
    Posts
    11
    Plugin Contributions
    0

    Default Include a tab for "Home" page in the Categories tabs?

    I want to have a tab for "Home" page in the horizontal Categories Tabs.

    Please see my website: www.fashionlabelstore.com

    I want the first tab to be "home" and then "women's fashion", "mens clothing" etc.


    Can someone help me to do it...

  2. #2
    Join Date
    Mar 2011
    Location
    Europe
    Posts
    11
    Plugin Contributions
    0

    Default Re: Include a tab for "Home" page in the Categories tabs?

    Code from my tpl_modules_categories_tab.php

    ?>


    <?php
    echo '<div id="navCatTabsWrapper">';
    echo '<div id="navCatTabs">';
    echo '<div id="navCatDropdown">';
    echo '<ul class="ul-wrapper">';


    $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' ORDER BY c.sort_order, cd.categories_name;";
    $categories_tab = $db->Execute($categories_tab_query);

    while (!$categories_tab->EOF)
    {
    echo '<li class="root-cat">';
    if((int)$cPath == $categories_tab->fields['categories_id'])
    echo '<a class="tab-category-top selected-cat" href="'.zen_href_link(FILENAME_DEFAULT,'cPath=' . (int)$categories_tab->fields['categories_id']).'">' . $categories_tab->fields['categories_name'];
    //echo '<span class="">'.$categories_tab->fields['categories_name'].'</span>';
    else
    echo '<a class="tab-category-top" href="'.zen_href_link(FILENAME_DEFAULT,'cPath=' . (int)$categories_tab->fields['categories_id']).'">' . $categories_tab->fields['categories_name'];
    //echo $categories_tab->fields['categories_name'];

    echo '</a>';
    $subcategories_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= '".(int)$categories_tab->fields['categories_id']."' AND cd.language_id='" . (int)$_SESSION['languages_id'] . "' AND c.categories_status='1' ORDER BY c.sort_order, cd.categories_name;";
    $subcategories_tab=$db->Execute($subcategories_tab_query);
    if($subcategories_tab->RecordCount()>0)
    {
    echo '<ul>';
    while (!$subcategories_tab->EOF)
    {
    $cPath_new='cPath=' . $categories_tab->fields['categories_id'] . '_' . $subcategories_tab->fields['categories_id'];
    $cPath_new=str_replace('=0_', '=', $cPath_new);
    echo '<li class="sub-cat">'.'<a href="' . zen_href_link(FILENAME_DEFAULT, $cPath_new) . '">'.$subcategories_tab->fields['categories_name'].'</a></li>';
    $subcategories_tab->MoveNext();
    }
    echo '</ul>';
    }

    echo '</li>';
    $categories_tab->MoveNext();

    }

    echo '</ul>';
    echo '<div class="clearBoth" style="font-size: 0;"></div>';
    echo '</div>';
    echo '</div>';
    echo '</div>';

    ?>

  3. #3
    Join Date
    Apr 2006
    Location
    Ohio
    Posts
    6,162
    Plugin Contributions
    0

    Default Re: Include a tab for "Home" page in the Categories tabs?

    Logging into your website from the link above I can't see your site...
    Mark
    Hare Do

  4. #4
    Join Date
    Mar 2011
    Location
    Europe
    Posts
    11
    Plugin Contributions
    0

    Default Re: Include a tab for "Home" page in the Categories tabs?

    Quote Originally Posted by haredo View Post
    Logging into your website from the link above I can't see your site...
    please try now.

    thanks

  5. #5
    Join Date
    Apr 2006
    Location
    Ohio
    Posts
    6,162
    Plugin Contributions
    0

    Default Re: Include a tab for "Home" page in the Categories tabs?

    Take time and compare these two .php files with the original from zen cart with the template you are using...
    includes/templates/template_default/common/tpl_header.php
    includes/templates/<your_template>/common/tpl_header.php
    Mark
    Hare Do

  6. #6
    Join Date
    Apr 2006
    Location
    Ohio
    Posts
    6,162
    Plugin Contributions
    0

    Default Re: Include a tab for "Home" page in the Categories tabs?

    Quote Originally Posted by haredo View Post
    Take time and compare these two .php files with the original from zen cart with the template you are using...
    I believe the template you have purchased is missing this code..
    HTML Code:
    <li><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">'; ?><?php echo HEADER_TITLE_CATALOG; ?></a></li>
    Here is a tutorial to read on the issue..
    Last edited by haredo; 1 May 2011 at 04:38 PM.
    Mark
    Hare Do

  7. #7
    Join Date
    Feb 2008
    Posts
    1,336
    Plugin Contributions
    1

    Default Re: Include a tab for "Home" page in the Categories tabs?

    I believe this code should be the first line after the
    PHP Code:
    echo '<ul class="ul-wrapper">'
    PHP Code:
    <li><?php echo '<a href="' HTTP_SERVER DIR_WS_CATALOG '">'?><?php echo HEADER_TITLE_CATALOG?></a></li>

  8. #8
    Join Date
    Mar 2011
    Location
    Europe
    Posts
    11
    Plugin Contributions
    0

    Default Re: Include a tab for "Home" page in the Categories tabs?

    Quote Originally Posted by haredo View Post
    I believe the template you have purchased is missing this code..
    HTML Code:
    <li><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">'; ?><?php echo HEADER_TITLE_CATALOG; ?></a></li>
    Here is a tutorial to read on the issue..
    When I followed this instruction it places the link above the Category Tabs.

    I want the a tab for Home page in the grey colour Categories tab.

    I believe i have to tweak the code in this file (posted above) tpl_modules_categories_tab.php

    Has someone got a clue??

    thanks
    Last edited by blonde; 2 May 2011 at 09:06 PM.

  9. #9
    Join Date
    Mar 2011
    Location
    Europe
    Posts
    11
    Plugin Contributions
    0

    Default Re: Include a tab for "Home" page in the Categories tabs?

    Quote Originally Posted by CoolCarPartsOnline View Post
    I believe this code should be the first line after the
    PHP Code:
    echo '<ul class="ul-wrapper">'
    PHP Code:
    <li><?php echo '<a href="' HTTP_SERVER DIR_WS_CATALOG '">'?><?php echo HEADER_TITLE_CATALOG?></a></li>
    I tried this but no luck

    Category tab just did load at all..

  10. #10
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Include a tab for "Home" page in the Categories tabs?

    Both of the suggestions above would display the right output, but need to be altered to work in the specific setting you have. It is already in a PHP environment so doesn't need the <?php and ?>
    PHP Code:
    echo '<ul class="ul-wrapper">'

    echo 
    '<li><a href="' HTTP_SERVER DIR_WS_CATALOG '">' HEADER_TITLE_CATALOG '</a></li>' "\n"

 

 
Page 1 of 3 123 LastLast

Similar Threads

  1. v151 Removing "Featured" "New" Tabs Entirely From Index Page
    By dinohaven in forum General Questions
    Replies: 2
    Last Post: 4 Nov 2014, 03:33 PM
  2. v139h Removing "Contact Us" in the price tab under categories
    By gotyed in forum General Questions
    Replies: 1
    Last Post: 13 Mar 2012, 01:04 AM
  3. How to remove ellipses ("...") after "All Products" and "New Products" on home page?
    By jthurman in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 18 May 2010, 03:30 PM
  4. How to add additional link beside the "home" and "Login" page above logo?
    By corditreasures in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 8 Apr 2010, 03:54 PM
  5. putting "tabs" to the catagories tab
    By shopyoungway in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 23 May 2007, 06:20 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