Page 21 of 227 FirstFirst ... 1119202122233171121 ... LastLast
Results 201 to 210 of 2267
  1. #201
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Categories Dressing

    You will need to add either display: block; or display: list-item; to this declaration in your stylesheet:
    Code:
    a.category-top {
        font-family:  'arial', serif;
        font-weight: bold;
        font-size: 1.0em;
        color: navy; 
        padding: 0.0em 0.0em;
        }
    This will avoid the possibility of having two categories show up on one line after you remove the necessary <br />.

  2. #202
    Join Date
    Jun 2007
    Posts
    239
    Plugin Contributions
    0

    Default Re: Categories Dressing

    Hello,

    I have 2 questions

    1. How do I remove the link heaing in inforamtion sidebox?

    2. I want to put "footwear" title right underneath the "Men" title, how do i do that?

    www.trendsdepot.com

    Thanks in advance!

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

    Default Re: Categories Dressing

    I saw another site recently which did the same thing you are wanting, as a novel but logical extension of the Cat Dressing code.

    You want the ability to have two different headings for the same category, so duplicate this whole switch section immediately below the existing section:
    PHP Code:
          // categories dressing - add (divider and) heading above a cat
          
    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;
          } 
    You might best organize it by using the first set of cases for your big headings and the second set for the small headings. Then you can specify both kinds for any category you wish, and the big headings will be output first if they occur together.


    The example link heading can be disabled by commenting out this line
    PHP Code:
          $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 
    similar to the others
    PHP Code:
            //$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 

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

    Default Re: Categories Dressing

    Alternately, you could duplicate the $content .= line in the case where you want a second heading, since each case only deals with one category.
    PHP Code:
          // categories dressing - add (divider and) heading above a cat
          
    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>':'Big Heading</span>' $disp_block_head) . "\n"
            
    $content .= '<span class="catBoxHeading2">' . (file_exists(DIR_WS_TEMPLATE_IMAGES 'cathead' $current_path '.gif') ? zen_image(DIR_WS_TEMPLATE_IMAGES 'cathead' $current_path '.gif') . '</span>':'Small Heading</span>' $disp_block_head) . "\n"
          break;
          } 
    This would be simpler if you don't have a lot of overlapping headings to juggle.

  5. #205
    Join Date
    Jun 2007
    Posts
    239
    Plugin Contributions
    0

    Default Re: Categories Dressing

    This option worked perfectly. Thank you again for your help and prompt response!



    Quote Originally Posted by gjh42 View Post
    Alternately, you could duplicate the $content .= line in the case where you want a second heading, since each case only deals with one category.
    PHP Code:
          // categories dressing - add (divider and) heading above a cat
          
    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>':'Big Heading</span>' $disp_block_head) . "\n"
            
    $content .= '<span class="catBoxHeading2">' . (file_exists(DIR_WS_TEMPLATE_IMAGES 'cathead' $current_path '.gif') ? zen_image(DIR_WS_TEMPLATE_IMAGES 'cathead' $current_path '.gif') . '</span>':'Small Heading</span>' $disp_block_head) . "\n"
          break;
          } 
    This would be simpler if you don't have a lot of overlapping headings to juggle.

  6. #206
    Join Date
    Jan 2008
    Posts
    50
    Plugin Contributions
    0

    Default Re: Categories Dressing

    Than you for help

    I removed the <br/> in tpl_category_list_box.
    Resulted in one extra line removed between products on category listing. But can not find why other extra line is still there. Here is the code:

    // $disp_block = '<br/>';
    $disp_block = '';



    $content = "";
    $content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent">' . "\n";

    for ($i=0;$i<sizeof($box_categories_array);$i++) {

    //set selected style ($box_categories_array[$i]['current'] does not work)
    $div_class='';
    if ($products_id){
    if (($products_id)&&($box_categories_array[$i]['products_id']==$products_id)){
    $div_class='category-subs-selected';
    }
    }else{
    if(($current_category_id!=0)&&($box_categories_array[$i]['category_id']==$current_category_id)){
    $div_class='category-subs-selected';
    }
    }

    // set top style
    if ($box_categories_array[$i]['top'] == 'true'){
    $a_class = 'category-top';
    }elseif($box_categories_array[$i]['has_sub_cat']){
    $a_class = 'category-subs';
    }else{
    $a_class='category-products';
    }
    // link to cat or prod
    if ($box_categories_array[$i]['is_product'] == true){
    $link = zen_href_link(FILENAME_PRODUCT_INFO, $box_categories_array[$i]['path']);
    }
    else{
    $link = ''; //zen_href_link(FILENAME_DEFAULT);
    }
    //indent
    if($box_categories_array[$i]['is_product'] == true){
    $indent = str_repeat(CATEGORIES_SUBCATEGORIES_INDENT, $box_categories_array[$i]['level']+2);
    }else{
    $indent = str_repeat(CATEGORIES_SUBCATEGORIES_INDENT, $box_categories_array[$i]['level']);
    }
    //cat sub seperator
    if (($box_categories_array[$i]['level'] == 0)&&($box_categories_array[$i]['is_product'] == false)){
    $separator = '';
    }else{
    $separator = CATEGORIES_SEPARATOR_SUBS;
    }
    // count
    $count='';
    if (SHOW_COUNTS == 'true') {
    if($box_categories_array[$i]['is_product'] != true){
    $count = CATEGORIES_SEPARATOR.CATEGORIES_COUNT_PREFIX . $box_categories_array[$i]['count'] . CATEGORIES_COUNT_SUFFIX ;
    }
    }
    //add content
    $content .= '<span class="'. $div_class .'">'.
    $indent.$separator.'<a class="'. $a_class .'" href="'. $link .'">'. $box_categories_array[$i]['name'] .'</a>'. $count .
    '</span>';

    }


    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 />';
    }
    }
    if (SHOW_CATEGORIES_BOX_PRODUCTS_NEW == 'true') {
    switch (true) {
    case (SHOW_NEW_PRODUCTS_LIMIT == '0'):
    $display_limit = '';
    break;
    case (SHOW_NEW_PRODUCTS_LIMIT == '1'):
    $display_limit = " and date_format(p.products_date_added, '%Y%m') >= date_format(now(), '%Y%m')";
    break;
    case (SHOW_NEW_PRODUCTS_LIMIT == '30'):
    $display_limit = ' and TO_DAYS(NOW()) - TO_DAYS(p.products_date_added) <= 30';
    break;
    case (SHOW_NEW_PRODUCTS_LIMIT == '60'):
    $display_limit = ' and TO_DAYS(NOW()) - TO_DAYS(p.products_date_added) <= 60';
    break;
    case (SHOW_NEW_PRODUCTS_LIMIT == '90'):
    $display_limit = ' and TO_DAYS(NOW()) - TO_DAYS(p.products_date_added) <= 90';
    break;
    case (SHOW_NEW_PRODUCTS_LIMIT == '120'):
    $display_limit = ' and TO_DAYS(NOW()) - TO_DAYS(p.products_date_added) <= 120';
    break;
    }

    $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 />';
    }
    }
    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 />';
    }
    }
    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>';
    }
    }
    $content .= '</div>';

    ?>

  7. #207
    Join Date
    Jan 2008
    Posts
    50
    Plugin Contributions
    0

    Default Re: Categories Dressing

    Quote Originally Posted by gjh42 View Post
    tpl_category_list_box.php will be the tpl file for the expanded categories mod you are using. The file that Categories Dressing uploads when you install it is tpl_categories.php.

    You will need to compare the two files and, where tpl_categories.php has $disp_block and tpl_category_list_box.php has <br />, delete the <br />. There will be several of these.

    display: block; or display: list-item;
    will not be in the php files; they are in the stylesheet (stylesheet_categories_dressing.css if you have uploaded it correctly).
    You have put two declarations from stylesheet_categories_dressing.css into your main stylesheet and modified them to fit the stock class tags, which is fine. If the list-item markers are all you want, you only need to delete the <br /> tags as noted above. Test after each deletion to make sure you are not removing a necessary line break (you will not want to remove the <br /> tags after the specials/featured/new/all links.)

    You also need to upload either the bullet1.gif and similar images that came with Cat Dressing, or your own marker images, unless you want to use the default disc markers.

    --------------------------------------------------------------------------------
    Thank you for your help

    I removed the <br/> in tpl_category_list_box. (below) There was two extra lines on the product on category list.
    This Resulted in one extra line removed between products on category listing. But can not find why other extra line is still there. Here is the code:

    // $disp_block = '<br/>';
    $disp_block = '';



    $content = "";
    $content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent">' . "\n";

    for ($i=0;$i<sizeof($box_categories_array);$i++) {

    //set selected style ($box_categories_array[$i]['current'] does not work)
    $div_class='';
    if ($products_id){
    if (($products_id)&&($box_categories_array[$i]['products_id']==$products_id)){
    $div_class='category-subs-selected';
    }
    }else{
    if(($current_category_id!=0)&&($box_categories_arr ay[$i]['category_id']==$current_category_id)){
    $div_class='category-subs-selected';
    }
    }

    // set top style
    if ($box_categories_array[$i]['top'] == 'true'){
    $a_class = 'category-top';
    }elseif($box_categories_array[$i]['has_sub_cat']){
    $a_class = 'category-subs';
    }else{
    $a_class='category-products';
    }
    // link to cat or prod
    if ($box_categories_array[$i]['is_product'] == true){
    $link = zen_href_link(FILENAME_PRODUCT_INFO, $box_categories_array[$i]['path']);
    }
    else{
    $link = ''; //zen_href_link(FILENAME_DEFAULT);
    }
    //indent
    if($box_categories_array[$i]['is_product'] == true){
    $indent = str_repeat(CATEGORIES_SUBCATEGORIES_INDENT, $box_categories_array[$i]['level']+2);
    }else{
    $indent = str_repeat(CATEGORIES_SUBCATEGORIES_INDENT, $box_categories_array[$i]['level']);
    }
    //cat sub seperator
    if (($box_categories_array[$i]['level'] == 0)&&($box_categories_array[$i]['is_product'] == false)){
    $separator = '';
    }else{
    $separator = CATEGORIES_SEPARATOR_SUBS;
    }
    // count
    $count='';
    if (SHOW_COUNTS == 'true') {
    if($box_categories_array[$i]['is_product'] != true){
    $count = CATEGORIES_SEPARATOR.CATEGORIES_COUNT_PREFIX . $box_categories_array[$i]['count'] . CATEGORIES_COUNT_SUFFIX ;
    }
    }
    //add content
    $content .= '<span class="'. $div_class .'">'.
    $indent.$separator.'<a class="'. $a_class .'" href="'. $link .'">'. $box_categories_array[$i]['name'] .'</a>'. $count .
    '</span>';

    }


    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 />';
    }
    }
    if (SHOW_CATEGORIES_BOX_PRODUCTS_NEW == 'true') {
    switch (true) {
    case (SHOW_NEW_PRODUCTS_LIMIT == '0'):
    $display_limit = '';
    break;
    case (SHOW_NEW_PRODUCTS_LIMIT == '1'):
    $display_limit = " and date_format(p.products_date_added, '%Y%m') >= date_format(now(), '%Y%m')";
    break;
    case (SHOW_NEW_PRODUCTS_LIMIT == '30'):
    $display_limit = ' and TO_DAYS(NOW()) - TO_DAYS(p.products_date_added) <= 30';
    break;
    case (SHOW_NEW_PRODUCTS_LIMIT == '60'):
    $display_limit = ' and TO_DAYS(NOW()) - TO_DAYS(p.products_date_added) <= 60';
    break;
    case (SHOW_NEW_PRODUCTS_LIMIT == '90'):
    $display_limit = ' and TO_DAYS(NOW()) - TO_DAYS(p.products_date_added) <= 90';
    break;
    case (SHOW_NEW_PRODUCTS_LIMIT == '120'):
    $display_limit = ' and TO_DAYS(NOW()) - TO_DAYS(p.products_date_added) <= 120';
    break;
    }

    $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 />';
    }
    }
    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 />';
    }
    }
    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>';
    }
    }
    $content .= '</div>';

    ?>

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

    Default Re: Categories Dressing

    I don't see a reason in that file why you would be getting extra line spaces. The expanded category mod is not mine, so I'm not familiar with all aspects of its function.

    The stylesheet could also have an effect on the spacing.

  9. #209
    Join Date
    Dec 2007
    Location
    brighton UK
    Posts
    40
    Plugin Contributions
    0

    Default Re: Categories Dressing

    Hello

    I am a very new zenner and I have just installed categories dressing and I would like some help please! I want images next to each of my categories:

    http://peterreed.dev.whitehatmedia.com/

    I want them to look like this:
    http://peterreed.dev.whitehatmedia.c...ge-design2.jpg

    but have no idea where to place the category ids c_21,c_1,c_2,c_90,c_89,c_92,c_91 into tpl_categories.php

    any help would be greatly appreciated

    Thank You!

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

    Default Re: Categories Dressing

    This would be beyond the mod's current function; it is not designed to display both the standard text and an image.

    Fortunately, though, the stock tpl_categories.php has the identity of the category image available to it, and some code could be added to use the category image in front of each top cat name. I discovered this a while ago, but this is the first time I have seen a request for using it. I'll look into it and come back with the code to do this.

 

 

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