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

    Default Re: Change Catagories Layout

    i deleted all the <br>

    where do i insert the css coding?
    "History will be kind to me for I intend to write it." -Winston Churchill

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

    Default Re: Change Catagories Layout

    Probably anywhere in your stylesheet would work.

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

    Default Re: Change Catagories Layout

    ok hows this look-


    <?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=category-top'):
    // $new_style = 'category-holiday';
    // break;
    a.category-top {
    display: block;
    background: #2233ff;
    color: #ffffff;
    margin: 1px 0 0 0;
    }

    a.category-top:hover {
    background: #000044;
    }
    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 .= . "\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>' . . "\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>' . . "\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>' . . "\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

  4. #14
    Join Date
    Feb 2005
    Location
    Westerville, Ohio - USA
    Posts
    23
    Plugin Contributions
    0

    Default Re: Change Catagories Layout

    Quote Originally Posted by SalmonLikeTheFish View Post
    ok hows this look-
    Not quite what you want to do. The CSS goes in the CSS file not the tpl_categories.php file. So this...

    Quote Originally Posted by SalmonLikeTheFish View Post
    a.category-top {
    display: block;
    background: #2233ff;
    color: #ffffff;
    margin: 1px 0 0 0;
    }

    a.category-top:hover {
    background: #000044;
    }
    ... needs to go in this file:

    zencart root directory/includes/templates/classic/css/stylesheet.css

    Place your code at the end of the file, otherwise your styles will be overwritten by styles that appear elsewhere in the stylesheet. If you are feeling confident you can fine the entries for these items in the stylesheet.css file and modify them to your needs.

    HTH
    Rory Francis
    Web Design &amp; Development
    ----------------------------------------------------------------------------
    e: rfrancis AT euphoriagraphics DOT com
    w: http://www.euphoriagraphics.com
    ----------------------------------------------------------------------------
    &quot;I build web sites... and stuff.&quot;

  5. #15
    Join Date
    Feb 2005
    Location
    Westerville, Ohio - USA
    Posts
    23
    Plugin Contributions
    0

    Default Re: Change Catagories Layout

    Thanks for this! I was just getting ready to dig in and find where those <br /> tags were getting dropped in for a project I'm working on.
    Rory Francis
    Web Design &amp; Development
    ----------------------------------------------------------------------------
    e: rfrancis AT euphoriagraphics DOT com
    w: http://www.euphoriagraphics.com
    ----------------------------------------------------------------------------
    &quot;I build web sites... and stuff.&quot;

  6. #16
    Join Date
    Dec 2008
    Posts
    14
    Plugin Contributions
    0

    Default Re: Change Catagories Layout

    ok-

    ive tried everything..

    can anyone help!!

    i removed <br>

    i inserted the css coding in the style sheets for the default and the classic!

    why wont this work?

    please help zenners!

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

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

    Default Re: Change Catagories Layout

    Your categories sidebox still has a dropdown instead of the standard listing. The tpl_categories.php you show is not the file that is controlling the sidebox content layout; you have some mod that is controlling that, and we can't tell you what it is without being inside your site files.

 

 
Page 2 of 2 FirstFirst 12

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