Page 8 of 227 FirstFirst ... 6789101858108 ... LastLast
Results 71 to 80 of 2267
  1. #71
    Join Date
    Jun 2007
    Posts
    195
    Plugin Contributions
    0

    Default Re: Categories Dressing

    Okay thanks Glenn

  2. #72
    Join Date
    Sep 2007
    Location
    UK
    Posts
    26
    Plugin Contributions
    0

    Default Re: Categories Dressing

    Hi, I am a newbie to Zen and have used your great Dressing mod. I have it working nicely but was hoping someone could tell me how to replace the default 'Categories' text above the list of cats with an image?

    Not sure whether I should be looking in the css or tpl_categories code

    Thanks in advance.

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

    Default Re: Categories Dressing

    The box heading is not connected at all with tpl_categories.php.

    To do this, see the Hiding the sidebox heading fonts/links.... thread.

  4. #74
    Join Date
    Sep 2007
    Location
    UK
    Posts
    26
    Plugin Contributions
    0

    Default Re: Categories Dressing

    Thanks for your reply Glenn, I'll take a look over there

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

    Default Re: Categories Dressing

    A few bits of code for reference, to modify /includes/templates/your_template/sideboxes/tpl_categories.php...

    First, the Image Titles mod is now available in Downloads to address the question above.

    To skip a certain category (or group of categories) from displaying in the list, find this line near the top of the file:
    PHP Code:
        if (zen_get_product_types_to_category($box_categories_array[$i]['path']) == or ($box_categories_array[$i]['top'] != 'true' and SHOW_CATEGORIES_SUBCATEGORIES_ALWAYS != 1)) {
          
    // skip if this is for the document box (==3) 
        
    } else { 
    and add

    ($box_categories_array[$i]['path'] == 'cPath=23') or

    to the beginning to get
    PHP Code:
        if (($box_categories_array[$i]['path'] == 'cPath=23') or zen_get_product_types_to_category($box_categories_array[$i]['path']) == or ($box_categories_array[$i]['top'] != 'true' and SHOW_CATEGORIES_SUBCATEGORIES_ALWAYS != 1)) {
          
    // skip if this is for the document box (==3), or category 23
        
    } else { 
    If using Cat Dressing, you can replace
    ($box_categories_array[$i]['path'] == 'cPath=23')
    with
    ($current_path == '23')

    Replace the 23 with the correct cPath for your category so it reads (say) 'cPath=4_37'.
    ----------------------------------------------------

    To restrict the display to only certain levels of subcategories, this can be modified as desired:
    To only show one level of subcategories, find
    PHP Code:
         if (zen_get_product_types_to_category($box_categories_array[$i]['path']) == or ($box_categories_array[$i]['top'] != 'true' and SHOW_CATEGORIES_SUBCATEGORIES_ALWAYS != 1)) {
            
    // skip if this is for the document box (==3)
          
    } else { 
    and add

    ereg("_.*_", $box_categories_array[$i]['path']) or

    to get
    PHP Code:
         if (ereg("_.*_"$box_categories_array[$i]['path']) or zen_get_product_types_to_category($box_categories_array[$i]['path']) == or ($box_categories_array[$i]['top'] != 'true' and SHOW_CATEGORIES_SUBCATEGORIES_ALWAYS != 1)) {
            
    // skip if this is for the document box (==3)
          
    } else { 
    Again, if using Cat Dressing, you can replace
    ereg("_.*_", $box_categories_array[$i]['path'])
    with
    ereg("_.*_", $current_path)

    This skips the item display if there are two or more _ in the cPath.

  6. #76
    Join Date
    Sep 2007
    Posts
    56
    Plugin Contributions
    0

    Default Re: Categories Dressing

    There are 3 files in Category Dressing Mod,
    1= css, 2= images, 3= sideboxes
    Can I save, and remove images from this mod, [no images in my Headings]
    or are they all necessary for proper installation.
    Relentless

  7. #77
    Join Date
    Mar 2007
    Posts
    104
    Plugin Contributions
    0

    Default Re: Categories Dressing

    3 things I would like to do...

    This is the site: www.starzbodyjewelry.com

    1. Make my Top Categories 'non-linked' *(un-clickable). But you can click on the sub-categories below the category heading.

    2. Is there anyway to 'hide' the subcategories of a sub-category on the main menu?

    3. The top nav bar is not ez-pages, its cat-tabs. How can I put 'Home' on the far left, and 'Contact Us' on the far right?

    Here's the code for my tpl_categories.php file.

    <?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 $
    * Modified for Categories Dressing v2.0 by Glenn Herbert (gjh42) 2007-07-13
    */
    $disp_block = '';
    $disp_block = '<br />'; //if not using display: block; in stylesheet, uncomment this line
    $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-bodyjewelry';
    break;
    case ($box_categories_array[$i]['path'] == 'cPath=4'):
    $new_style = 'category-hiphopjewelry';
    break;
    case ($box_categories_array[$i]['path'] == 'cPath=5'):
    $new_style = 'category-misc.';
    break;
    case ($box_categories_array[$i]['path'] == 'cPath=1'):
    $new_style = 'category-newarrivals';
    break;
    case ($box_categories_array[$i]['path'] == 'cPath=36'):
    $new_style = 'category-packagedeals';
    break;
    case ($box_categories_array[$i]['path'] == 'cPath=2'):
    $new_style = 'category-closeout';
    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';
    }
    $current_path = str_replace("cPath=","",$box_categories_array[$i]['path']);
    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 {
    // categories dressing - add divider above specified cats
    if(in_array($current_path, explode(",",'3,22,21_56'))) { //replace numbers with your cat ids separated by commas
    $content .= '<hr class="catBoxDivider" />' . "\n";
    }
    //categories dressing - add (divider and) heading above a cat
    $disp_block_head = '';
    //$disp_block_head = '<br />'; // for heading not block uncomment this line
    switch ($current_path) {
    case '23': //replace number with your desired cPath
    //$content .= '<hr class="catBoxDivider" />' . "\n"; // to add divider uncomment this line
    $content .= '<span class="catBoxHeading1">' . (file_exists(DIR_WS_TEMPLATE_IMAGES . 'cathead' . $current_path . '.gif') ? zen_image(DIR_WS_TEMPLATE_IMAGES . 'cathead' . $current_path . '.gif') . '</span>':'Heading 1</span>' . $disp_block_head) . "\n";
    break;
    }
    // categories dressing - category name mods
    $cat_name_display = $box_categories_array[$i]['name'];
    $cat_img_bg = '';
    // categories dressing - display image if exists for category name
    if (file_exists(DIR_WS_TEMPLATE_IMAGES . 'catimg' . $current_path . '.gif')) {
    $cat_name_display = zen_image(DIR_WS_TEMPLATE_IMAGES . 'catimg' . $current_path . '.gif');
    // categories dressing - display background image if exists for category name
    } elseif (file_exists(DIR_WS_TEMPLATE_IMAGES . 'catbg' . $current_path . '.gif')) {
    $cat_name_display = '';
    $cat_img_bg = ' catBg' . $current_path;
    } else {
    $cat_img_bg = '-text';//append to main classname
    }
    $content .= '<a class="' . $new_style . $cat_img_bg . '" 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">' . $cat_name_display . '</span>';
    } else {
    $content .= '<span class="category-subs-selected">' . $cat_name_display . '</span>';
    }
    } else {
    $content .= '<span class="category-not-selected">' . $cat_name_display . '</span>';
    } // category name mods

    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 .= $disp_block . "\n";

    // categories dressing - add subtext below a cat
    switch ($current_path) {
    case '23': //replace number with your desired cPath
    $content .= '<span class="catBoxSubtext">Subtext for cat 23 escape apostrophe\'s</span>' . $disp_block . "\n";
    break;
    } // subtext
    }
    }

    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') {
    //$content .= '<span class="catBoxHeading1">' . (file_exists(DIR_WS_TEMPLATE_IMAGES . 'cathead-specials.gif') ? zen_image(DIR_WS_TEMPLATE_IMAGES . 'cathead-specials.gif') . '</span>':'Link Heading</span>' . $disp_block_head) . "\n";// categories dressing - uncomment this line for heading above link
    $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>' . $disp_block . "\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 .= '<span class="catBoxHeading1">' . (file_exists(DIR_WS_TEMPLATE_IMAGES . 'cathead-new.gif') ? zen_image(DIR_WS_TEMPLATE_IMAGES . 'cathead-new.gif') . '</span>':'Link Heading</span>' . $disp_block_head) . "\n";// categories dressing - uncomment this line for heading above link
    $content .= '<a class="category-links" href="' . zen_href_link(FILENAME_PRODUCTS_NEW) . '">' . CATEGORIES_BOX_HEADING_WHATS_NEW . '</a>' . $disp_block . "\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 .= '<span class="catBoxHeading1">' . (file_exists(DIR_WS_TEMPLATE_IMAGES . 'cathead-featured.gif') ? zen_image(DIR_WS_TEMPLATE_IMAGES . 'cathead-featured.gif') . '</span>':'Link Heading</span>' . $disp_block_head) . "\n";// categories dressing - uncomment this line for heading above link
    $content .= '<a class="category-links" href="' . zen_href_link(FILENAME_FEATURED_PRODUCTS) . '">' . CATEGORIES_BOX_HEADING_FEATURED_PRODUCTS . '</a>' . $disp_block . "\n";
    }
    }
    if (SHOW_CATEGORIES_BOX_PRODUCTS_ALL == 'true') {
    $content .= '<span class="catBoxHeading1">' . (file_exists(DIR_WS_TEMPLATE_IMAGES . 'cathead-all.gif') ? zen_image(DIR_WS_TEMPLATE_IMAGES . 'cathead-all.gif') . '</span>':'Link Heading</span>' . $disp_block_head) . "\n";// categories dressing - uncomment this line for heading above link
    $content .= '<a class="category-links" href="' . zen_href_link(FILENAME_PRODUCTS_ALL) . '">' . CATEGORIES_BOX_HEADING_PRODUCTS_ALL . '</a>' . "\n";
    }
    }
    $content .= '</div>';
    ?>


    Thanks in Advance!
    LMW1

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

    Default Re: Categories Dressing

    The images are purely examples and can be deleted, though if you want the arrows (bulletx.gif) for list markers you should keep them.

    The CSS should ideally be modified as desired and the parts to be used copied into your main stylesheet. Then stylesheet_categories_dressing.css can be deleted. There are more pieces there than any one site is likely to use.

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

    Default Re: Categories Dressing

    Lmw1,

    1) I already answered this question in one of your other threads.

    2) See post #75 above.

    3) You would copy the link code from tpl_header.php to the file that builds the cat-tabs menu content. The details are not relevant to this thread.

  10. #80
    Join Date
    Sep 2007
    Posts
    56
    Plugin Contributions
    0

    Default Re: Categories Dressing

    Re: Categories Dressing
    Is this all the css I need,
    for, text only, no images,
    no display: block, for all headings in sideboxes.
    --------------------------------
    Catrgory Heading.
    .catBoxHeading1 {
    font-family: arial,verdana,helvetica, sans-serif;
    font-weight: bold;
    font-size: 1em;
    color: #00FF00;
    background-color: #transparent;
    /*background-image: url(../images/catheadbg1.gif); */ /*uncomment to use background image with or without coded text*/
    /*height: 23px; */ /*uncomment to use background image without coded text*/
    /* display: block;*/
    /*padding: 0.3em 0.4em;*/
    margin-top: 2px;
    margin-bottom: 2px;
    }
    Thank you for the whole css, not needed tip, I missed that one.

 

 
Page 8 of 227 FirstFirst ... 6789101858108 ... LastLast

Similar Threads

  1. categories dressing
    By fw541c in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 19 Nov 2010, 09:29 PM
  2. Categories Dressing
    By wotnow in forum Addon Sideboxes
    Replies: 10
    Last Post: 7 Apr 2010, 03:06 AM
  3. Categories Dressing issue
    By Maynards in forum Addon Sideboxes
    Replies: 0
    Last Post: 13 Mar 2010, 10:51 PM
  4. Categories Dressing
    By Maynards in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 12 Mar 2010, 11:05 PM
  5. Categories Dressing
    By PGlad in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 7 Aug 2007, 07:05 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