Page 5 of 227 FirstFirst ... 345671555105 ... LastLast
Results 41 to 50 of 2267
  1. #41
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Categories Dressing

    If there is a method you can use to distinguish between subcats you want in different colors, you can replace the selection code ($box_categories_array[$i]['path'] == 'cPath=3_42') with that.
    I can't be any more specific without knowing exactly how you want to change colors.

    You say "1000 products", but how many subcats do you have?
    You don't need to specify every subcat; make a spec that covers them generally, and then specify the exceptions with the code above...
    Last edited by gjh42; 27 Aug 2007 at 04:29 PM.

  2. #42
    Join Date
    Jul 2007
    Posts
    30
    Plugin Contributions
    0

    Default Re: Categories Dressing

    I have 17 categories and there are 17 subcats inside so..i need only this 17 subcats to have diferent.

    Categorie 1 green(picture)...subcategories will be GREEN
    Categorie 2 blue(picture)...subcategorie will be BLUE
    etc.

    Thank U for you interest!

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

    Default Re: Categories Dressing

    So are there 17 different colors you want for subcats? And if you have 17 top cats and 17 subcats, how many subcats are in each topcat?

  4. #44
    Join Date
    Jul 2007
    Posts
    30
    Plugin Contributions
    0

    Default Re: Categories Dressing

    I have 17 TOPcat and they have lots of subcategories.

    For example TOPcat ONE has 2 subcategories which all of them I need to have green.

    TOPcat TWO has only products inside (40 products) - this background colour I need to have blue

    TOPcat THREE has 7 subcategories which I need to have Black...etc etc.

    Simply said...I need to have every subcategory the same colour as have its TOPcategorie.


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

    Default Re: Categories Dressing

    OK then, a filter for subs of a particular topcat will do the trick. Give me a few minutes.

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

    Default Re: Categories Dressing

    I couldn't locate the exampe I had previously worked out like this, so had to redo it...
    You will modify this section of tpl_categories.php:
    PHP Code:
      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';
        } 
    This code will return just the top category id for whatever the current cat is:
    PHP Code:
    $current_top str_replace(strstr("_",$box_categories_array[$i]['path']),"",str_replace("cPath=","",$box_categories_array[$i]['path'])); 
    Insert this between the "for" and "switch" statements.
    PHP Code:
        case ($current_top == '3'):
            
    $new_style 'category-subof3';
            break; 
    Insert one of these for each top cat you wish to distinguish, in the spot noted. They must be in exactly this location to work correctly.
    PHP Code:
      for ($i=0;$i<sizeof($box_categories_array);$i++) {
        
    $current_top str_replace(strstr("_",$box_categories_array[$i]['path']),"",str_replace("cPath=","",$box_categories_array[$i]['path']));
        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;
          
    /* add all individual subcat cases here*/
          
    case ($current_top == '3'):
            
    $new_style 'category-subof3';
            break;  
          case (
    $box_categories_array[$i]['has_sub_cat']):
            
    $new_style 'category-subs';
            break;
          default:
            
    $new_style 'category-products';
        } 
    Style these like

    a.category-subof3-text {background-color: #112233;}

    a.category-subof4-text {background-color: #223344;}
    Last edited by gjh42; 27 Aug 2007 at 07:26 PM.

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

    Default Re: Categories Dressing

    Erratum: the strstr() function is laid out differently from the functions I am used to, so the $current_top statement will need to be changed to this:
    PHP Code:
    $current_top str_replace(strstr($box_categories_array[$i]['path'],"_"),"",str_replace("cPath=","",$box_categories_array[$i]['path'])); 
    I have not tested this whole setup, and it is possible that strstr() may cause an error in top cats. This error may or may not matter in execution; please post with any results, and I will debug if needed.

  8. #48
    Join Date
    Jul 2007
    Posts
    30
    Plugin Contributions
    0

    Default Re: Categories Dressing

    I don't know how to say it but....YOU ARE GENIUS
    Oh man...I am so happy! You helped a lot!

  9. #49
    Join Date
    Aug 2007
    Posts
    12
    Plugin Contributions
    0

    Default Re: Categories Dressing

    I was wondering if you were limited by button size to the size of the sample buttons or can you use any size buttons you want to use?

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

    Default Re: Categories Dressing

    Category and heading images can be any size you want.

    Be careful not to make them wider than the column/sidebox width is set for, *accounting for padding/margins*.

    If you are using background images, you will of course have to specify the element width and height in the stylesheet, as the background does not take up space by itself.

 

 
Page 5 of 227 FirstFirst ... 345671555105 ... 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