Page 1 of 2 12 LastLast
Results 1 to 10 of 17
  1. #1
    Join Date
    Dec 2008
    Posts
    14
    Plugin Contributions
    0

    Default Change Catagories Layout

    Im trying to make the categories tab look like my manufacturers tab.

    Ive been looking for 2 weeks and cant find this info anywhere.. eek

    PLEASE PLEASE HELP!!

    THANKS ZENNERS

    here is my site-
    getsupps.com
    "History will be kind to me for I intend to write it." -Winston Churchill

  2. #2
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,021
    Plugin Contributions
    3

    Default Re: Change Catagories Layout

    Sorry, I don't know the answer to your question, but I wonder why you would have the categories listing (or the manufacturers listing, for that matter) configured as a dropdown if they aren't going to 'drop down'. The stock Zencart categories listing will give you a long list.

  3. #3
    Join Date
    Dec 2008
    Posts
    14
    Plugin Contributions
    0

    Default Re: Change Catagories Layout

    its easier for people to see all the categories when its always visible.

    some one please help!!!
    "History will be kind to me for I intend to write it." -Winston Churchill

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

    Default Re: Change Catagories Layout

    If it looks like a dropdown but is always expanded, you get the worst of both worlds: it always takes up the maximum space, but can't be styled for best readability.

    Also, the current dropdown you have for categories doesn't work unless javascript is enabled. This means you are needlessly hampering free navigation on your site, and I think people who use alternate displays like screenreaders will not be able to navigate at all. Of course, maybe a muscle supplements store doesn't care about the less-than-full-mobility types... ;)
    Last edited by gjh42; 11 Jan 2009 at 09:11 AM.

  5. #5
    Join Date
    Dec 2008
    Posts
    14
    Plugin Contributions
    0

    Default Re: Change Catagories Layout

    im trying to style the side similair to this page-
    tfsupplements.com

    is there a way to do this
    "History will be kind to me for I intend to write it." -Winston Churchill

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

    Default Re: Change Catagories Layout

    Of course! That is pretty much standard CSS styling techniques. You would style

    Code:
    a.category-top {
        display: block;
        background: #2233ff;
        color: #ffffff;
        margin: 1px 0 0 0;
        }
    
    a.category-top:hover {
        background: #000044;
        }
    to get the full-width blocks of color which change on hover (adjust the colors to taste).

    You also need to delete a few <br /> tags in /includes/templates/your_template/sideboxes/tpl_categories.php, as it is set by default to work only with inline <a> elements, not block elements. Categories Dressing has all the setups you need for this and other custom styling.

  7. #7
    Join Date
    Dec 2008
    Posts
    14
    Plugin Contributions
    0

    Default Re: Change Catagories Layout

    im such a newbie at this eek! please tell me where to insert & what to delete if you could

    here is my html-

    <?php
    /**
    * Side Box Template
    *
    * @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: tpl_categories.php 4162 2006-08-17 03:55:02Z ajeh $
    */
    $content = "";

    $content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent">' . "\n";
    for ($i=0;$i<sizeof($box_categories_array);$i++) {
    switch(true) {
    // to make a specific category stand out define a new class in the stylesheet example: A.category-holiday
    // uncomment the select below and set the cPath=3 to the cPath= your_categories_id
    // many variations of this can be done
    // case ($box_categories_array[$i]['path'] == 'cPath=3'):
    // $new_style = 'category-holiday';
    // break;
    case ($box_categories_array[$i]['top'] == 'true'):
    $new_style = 'category-top';
    break;
    case ($box_categories_array[$i]['has_sub_cat']):
    $new_style = 'category-subs';
    break;
    default:
    $new_style = 'category-products';
    }
    if (zen_get_product_types_to_category($box_categories_array[$i]['path']) == 3 or ($box_categories_array[$i]['top'] != 'true' and SHOW_CATEGORIES_SUBCATEGORIES_ALWAYS != 1)) {
    // skip if this is for the document box (==3)
    } else {
    $content .= '<a class="' . $new_style . '" href="' . zen_href_link(FILENAME_DEFAULT, $box_categories_array[$i]['path']) . '">';

    if ($box_categories_array[$i]['current']) {
    if ($box_categories_array[$i]['has_sub_cat']) {
    $content .= '<span class="category-subs-parent">' . $box_categories_array[$i]['name'] . '</span>';
    } else {
    $content .= '<span class="category-subs-selected">' . $box_categories_array[$i]['name'] . '</span>';
    }
    } else {
    $content .= $box_categories_array[$i]['name'];
    }

    if ($box_categories_array[$i]['has_sub_cat']) {
    $content .= CATEGORIES_SEPARATOR;
    }
    $content .= '</a>';

    if (SHOW_COUNTS == 'true') {
    if ((CATEGORIES_COUNT_ZERO == '1' and $box_categories_array[$i]['count'] == 0) or $box_categories_array[$i]['count'] >= 1) {
    $content .= CATEGORIES_COUNT_PREFIX . $box_categories_array[$i]['count'] . CATEGORIES_COUNT_SUFFIX;
    }
    }

    $content .= '<br />' . "\n";
    }
    }

    if (SHOW_CATEGORIES_BOX_SPECIALS == 'true' or SHOW_CATEGORIES_BOX_PRODUCTS_NEW == 'true' or SHOW_CATEGORIES_BOX_FEATURED_PRODUCTS == 'true' or SHOW_CATEGORIES_BOX_PRODUCTS_ALL == 'true') {
    // display a separator between categories and links
    if (SHOW_CATEGORIES_SEPARATOR_LINK == '1') {
    $content .= '<hr id="catBoxDivider" />' . "\n";
    }
    if (SHOW_CATEGORIES_BOX_SPECIALS == 'true') {
    $show_this = $db->Execute("select s.products_id from " . TABLE_SPECIALS . " s where s.status= 1 limit 1");
    if ($show_this->RecordCount() > 0) {
    $content .= '<a class="category-links" href="' . zen_href_link(FILENAME_SPECIALS) . '">' . CATEGORIES_BOX_HEADING_SPECIALS . '</a>' . '<br />' . "\n";
    }
    }
    if (SHOW_CATEGORIES_BOX_PRODUCTS_NEW == 'true') {
    // display limits
    // $display_limit = zen_get_products_new_timelimit();
    $display_limit = zen_get_new_date_range();

    $show_this = $db->Execute("select p.products_id
    from " . TABLE_PRODUCTS . " p
    where p.products_status = 1 " . $display_limit . " limit 1");
    if ($show_this->RecordCount() > 0) {
    $content .= '<a class="category-links" href="' . zen_href_link(FILENAME_PRODUCTS_NEW) . '">' . CATEGORIES_BOX_HEADING_WHATS_NEW . '</a>' . '<br />' . "\n";
    }
    }
    if (SHOW_CATEGORIES_BOX_FEATURED_PRODUCTS == 'true') {
    $show_this = $db->Execute("select products_id from " . TABLE_FEATURED . " where status= 1 limit 1");
    if ($show_this->RecordCount() > 0) {
    $content .= '<a class="category-links" href="' . zen_href_link(FILENAME_FEATURED_PRODUCTS) . '">' . CATEGORIES_BOX_HEADING_FEATURED_PRODUCTS . '</a>' . '<br />' . "\n";
    }
    }
    if (SHOW_CATEGORIES_BOX_PRODUCTS_ALL == 'true') {
    $content .= '<a class="category-links" href="' . zen_href_link(FILENAME_PRODUCTS_ALL) . '">' . CATEGORIES_BOX_HEADING_PRODUCTS_ALL . '</a>' . "\n";
    }
    }
    $content .= '</div>';
    ?>
    "History will be kind to me for I intend to write it." -Winston Churchill

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

    Default Re: Change Catagories Layout

    Remove exactly this
    '<br />' .
    from these four locations:

    ...
    CATEGORIES_COUNT_SUFFIX;
    }
    }

    $content .= '<br />' . "\n";
    }
    }

    if (SHOW_CATEGORIES_BOX_SPECIALS == 'true' or
    ...

    $content .= '<a class="category-links" href="' . zen_href_link(FILENAME_SPECIALS) . '">' . CATEGORIES_BOX_HEADING_SPECIALS . '</a>' . '<br />' . "\n";
    ...

    $content .= '<a class="category-links" href="' . zen_href_link(FILENAME_PRODUCTS_NEW) . '">' . CATEGORIES_BOX_HEADING_WHATS_NEW . '</a>' . '<br />' . "\n";
    ...

    $content .= '<a class="category-links" href="' . zen_href_link(FILENAME_FEATURED_PRODUCTS) . '">' . CATEGORIES_BOX_HEADING_FEATURED_PRODUCTS . '</a>' . '<br />' . "\n";


    You will also need to have in your stylesheet

    a.category-links {display: block;}

  9. #9
    Join Date
    Dec 2008
    Posts
    14
    Plugin Contributions
    0

    red flag Re: Change Catagories Layout

    So ive been tryn to do this for the last 4 hours and no success.

    please some one help me..

    i need this idiot proof..

    because i am an idiot. we all now know this.
    "History will be kind to me for I intend to write it." -Winston Churchill

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

    Default Re: Change Catagories Layout

    Sorry, I don't know how I can make it simpler. Can you find the four locations in your file? Are you deleting exactly the characters I mention above, no more, no less?

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Change the Catagories Menu look?
    By rcavalear4852 in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 7 Jan 2009, 04:15 AM
  2. New products and current catagories layout
    By Natural Tone in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 25 Jun 2008, 08:46 AM
  3. View catagories layout
    By crabdance in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 27 Oct 2007, 12:00 PM
  4. Change Catagories to ????
    By Graphicman in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 16 Oct 2007, 10:08 PM
  5. Changing layout of Catagories Sidebox
    By jefrat72 in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 22 Aug 2007, 05:01 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