Results 1 to 10 of 10
  1. #1
    Join Date
    Apr 2005
    Location
    Spokane, Washington
    Posts
    372
    Plugin Contributions
    0

    Default Category Separator

    How do I add a separator between links in an additional sidebox? Similiar to Easy Categories.

    Just knowledgeable enough to be dangerous.

  2. #2
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,690
    Plugin Contributions
    123

    Default Re: Category Separator

    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  3. #3
    Join Date
    Apr 2005
    Location
    Spokane, Washington
    Posts
    372
    Plugin Contributions
    0

    Default Re: Category Separator

    Awesome! Thank you!

    Jacque

    Just knowledgeable enough to be dangerous.

  4. #4
    Join Date
    Dec 2006
    Posts
    87
    Plugin Contributions
    0

    Default Re: Category Separator

    I want to try this too. Where would I place $content .= '<hr />' . "\n"; in order to spaces between my categories??

    this is my tpl file...
    Code:
    <?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>';
    ?>

  5. #5
    Join Date
    Dec 2006
    Posts
    23
    Plugin Contributions
    0

    Default Re: Category Separator

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



    Find that in your file and change it as mentioned above.

  6. #6
    Join Date
    Jan 2007
    Posts
    82
    Plugin Contributions
    0

    Default Re: Category Separator

    This is great, but how to add a dashed line instead of solid line, and how to reduce the space. Doing above introduce too much than I want.

  7. #7
    Join Date
    Nov 2005
    Location
    Colorado Springs, CO USA
    Posts
    7,033
    Plugin Contributions
    31

    Default Re: Category Separator

    try adding the following to your stylesheet.css

    .separator {
    margin:0;
    border-top: 1px dashed #000;
    height:1px;
    }
    then change

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

    as follows

    }
    $content .= '<hr class="separator" />' . "\n";
    }

  8. #8
    Join Date
    Jan 2007
    Posts
    82
    Plugin Contributions
    0

    Default Re: Category Separator

    [quote=clydejones;321581]try adding the following to your stylesheet.css

    .separator {
    margin:0;
    border-top: 1px dashed #000;
    height:1px;
    }
    quote]

    Where should it be? I changed as you said, no effect.

    More details please.
    http://www.hotdealspot.net/

  9. #9
    Join Date
    Nov 2005
    Location
    Colorado Springs, CO USA
    Posts
    7,033
    Plugin Contributions
    31

    Default Re: Category Separator

    Put it at the very bottom of the stylesheet.css.

    Save and upload to your server.

  10. #10
    Join Date
    Dec 2006
    Posts
    23
    Plugin Contributions
    0

    Default Re: Category Separator

    Humm this fix didn't seem to work for me.I still have solid lines.

 

 

Similar Threads

  1. Category Separator help needed please...
    By Convergence in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 5 Feb 2010, 06:09 AM
  2. Separator Line in Category Sidebox
    By charmedbytina2 in forum Basic Configuration
    Replies: 4
    Last Post: 21 Aug 2008, 07:08 AM
  3. Separator in category display
    By ckosloff in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 17 Jun 2008, 04:40 AM
  4. Category Separator
    By netmeg in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 31 Jan 2007, 10:21 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