Results 1 to 10 of 2267

Hybrid View

  1. #1
    Join Date
    Nov 2005
    Posts
    51
    Plugin Contributions
    0

    Default Re: Categories Dressing

    This is one of the most useful zencart mods for me, thanks for the great mod.
    I manage to get it working properly, except one thing.

    I like to add "non-linked heading" just above special, (or Featured Products ...
    All Products ...)

    This is how i did, for example, I have special link acitvated in the categories menu and link to the special is " http://xxxxxx.com/index.php?main_page=specials"
    so I cut and paste "special" into

    "case 'special': //replace number with your desired cPath"

    but the non-linked heading did not show up. I guess it should be numeric number instead of "special" text.

    Can you tell me the way to fix this problem?

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

    Default Re: Categories Dressing

    The test for displaying headings is in a loop that goes through the categories, but does not go through the all/featured/new/specials links. Those are separately output after the categories.

    The way to accomplish this will be to copy the heading code to the specials output area. I am away from my home computer now, but when I get back I will look at the files and post here with the necessary code.

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

    Default Re: Categories Dressing

    To get headings above links, add this (modified appropriately) to each desired link display block:
    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 
    Or simply replace the entire last section of tpl_categories.php with this:
    PHP Code:

      
    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 .= '<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 
            
    $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>';
    ?> 
    Replace "Link Heading" with your desired text.
    If you want images instead of text for these headings, name them like cathead-featured.gif and save them in /your_template/images/.

    This code will check to see if an appropriately-named file exists, and if so, display it; if not, display the heading text at the end of the statement.
    To disable any heading, comment out its line as noted.

    This and similar more robust and flexible code for category headings will be in the next release of Categories Dressing.

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

    Default Re: Categories Dressing

    Categories Dressing v2.0 is now available in Downloads.

    As noted above, the non-linked heading function is extended to the all/featured/specials/new links.

    All of the image replacement functions are now automated: the code looks for an image file named appropriately for the current category and uses it if found. If not found, it uses the text version - no lists needed there any more.

    This necessitated changes in the naming conventions used for files and CSS styles, so if you want to upgrade, be advised that you will need to rename some things to keep them working.

  5. #5
    Join Date
    Jul 2007
    Posts
    30
    Plugin Contributions
    0

    Default Re: Categories Dressing

    How can I change the background colour of each sub-category? I have all categories diferent using the back picture, but as a sub-categories I want it with text and only what I know haw to set up colour for sub-categories in common, but i need it separetly. Please, help!

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

    Default Re: Categories Dressing

    You will need to follow the directions in the comments near the top of tpl_categories.php (where it says "A.category-holiday") to make a new tag for each subcat you want to be different from standard, using the full cPath in the case.
    PHP Code:
    // 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; 
    For a subcat whose cPath is 3_42, make it
    PHP Code:
          case ($box_categories_array[$i]['path'] == 'cPath=3_42'):
            
    $new_style 'category-sub-3_42';
            break; 
    and then style

    .category-sub-3_42-text { background-color: #aabbcc;}

    or whatever you want.

  7. #7
    Join Date
    Jul 2007
    Posts
    30
    Plugin Contributions
    0

    Default Re: Categories Dressing

    But there is more then 1000 products on my database....is there anyhow posible to make it multiple...

 

 

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

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