Page 1 of 3 123 LastLast
Results 1 to 10 of 2267

Hybrid View

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

    Default Re: Categories Dressing

    Rollover image swapping is something I haven't worked on yet. One way to accomplish it would be with Javascript code, which I know very little about.

    Another way would be to modify the "catimgxx.gif" generator to create a custom id tag instead. This could then have a background image assigned to each category in the stylesheet, which could be swapped on hover.
    I'll work on this, but no promises on timetable.

  2. #2
    Join Date
    Jun 2007
    Posts
    7
    Plugin Contributions
    0

    Default Re: Categories Dressing

    Quote Originally Posted by gjh42 View Post
    Rollover image swapping is something I haven't worked on yet. One way to accomplish it would be with Javascript code, which I know very little about.

    Another way would be to modify the "catimgxx.gif" generator to create a custom id tag instead. This could then have a background image assigned to each category in the stylesheet, which could be swapped on hover.
    I'll work on this, but no promises on timetable.
    Sounds great. Hope this feature request will get into the modification.
    Really hope so

  3. #3
    Join Date
    Jun 2007
    Posts
    16
    Plugin Contributions
    0

    Default Re: Categories Dressing

    I need help got the Category Dressing working pretty well, but theres a couple of issues.

    1) Now all my icons next to each category has disappeared?

    I have more, but lets attack one at a time, please help, this is urgent!

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

    Default Re: Categories Dressing

    Do you have BetterCategories installed? It modifies some of the same code as this, so they would need to be carefully integrated, and might not be completely compatible.

    What method/code did you use to get the icons?

  5. #5
    Join Date
    Jun 2007
    Posts
    16
    Plugin Contributions
    0

    Default Re: Categories Dressing

    no I don' thave better cat installed, here is the orignal code that had the icons next to each cat for tpl_categories.php Let me know what you think. THanks for your help!

    <?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 3157 2006-03-10 23:24:22Z drbyte $
    */
    //$content_tm = '';
    //$content_head = tm_box_head(BOX_HEADING_CATEGORIES,'','style3');
    $content_tm .= '<ul class="ul2">
    ';

    for ($i=0;$i<sizeof($box_categories_array);$i++) {
    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_tm .= '<li><a 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_tm .= '<span class="category-subs-parent">' . $box_categories_array[$i]['name'] . '</span>';
    } else {
    $content_tm .= '<span class="category-subs-selected">' . $box_categories_array[$i]['name'] . '</span>';
    }
    } else {
    $content_tm .= $box_categories_array[$i]['name'];
    }

    if ($box_categories_array[$i]['has_sub_cat']) {
    $content_tm .= CATEGORIES_SEPARATOR;
    }

    if (SHOW_COUNTS == 'true') {
    if ((CATEGORIES_COUNT_ZERO == '1' and $box_categories_array[$i]['count'] == 0) or $box_categories_array[$i]['count'] >= 1) {
    $content_tm .= CATEGORIES_COUNT_PREFIX . $box_categories_array[$i]['count'] . CATEGORIES_COUNT_SUFFIX;
    }
    }

    $content_tm .= '</a></li>';



    // if($i + 1 != sizeof($box_categories_array))
    // $content_tm .= '<br /><div class="cat_separator"></div>' . "\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_tm .= '</ul>
    <br style="line-height:10px;">
    <div class="h_l"><img alt="" src="images/spacer.gif" width="1" height="1"></div>
    <br style="line-height:6px;">
    <ul class="ul2" >' . "\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_tm .= '<li><a class="category-links" href="' . zen_href_link(FILENAME_SPECIALS) . '">' . CATEGORIES_BOX_HEADING_SPECIALS . '</a>' . '</li>' . "\n";
    }
    }
    if (SHOW_CATEGORIES_BOX_PRODUCTS_NEW == 'true') {
    // display limits
    $display_limit = zen_get_products_new_timelimit();

    $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_tm .= '<li><a class="category-links" href="' . zen_href_link(FILENAME_PRODUCTS_NEW) . '">' . CATEGORIES_BOX_HEADING_WHATS_NEW . '</a>' . '</li>' . "\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_tm .= '<li><a class="category-links" href="' . zen_href_link(FILENAME_FEATURED_PRODUCTS) . '">' . CATEGORIES_BOX_HEADING_FEATURED_PRODUCTS . '</a>' . '</li>' . "\n";
    }
    }
    if (SHOW_CATEGORIES_BOX_PRODUCTS_ALL == 'true') {
    $content_tm .= '<li><a class="category-links" href="' . zen_href_link(FILENAME_PRODUCTS_ALL) . '">' . CATEGORIES_BOX_HEADING_PRODUCTS_ALL . '</a></li>' . "\n";
    }
    }

    $content_tm .= '</ul>';
    //$content_cont = tm_box_cont($content_tm);
    //$content = $content_head.$content_cont;
    $content = $content_tm;



    ?>

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

    Default Re: Categories Dressing

    Ok, you have a Template Monster template, which has added a bunch of code to the stock file, and changed how the contents are built.

    If you tell me which Categories Dressing feature you are trying to use, I can probably tell you how to integrate it with this template.

    I think the issue is that TM has modified the categories to display as an unordered list, and when you merged/replaced code that got eliminated.

  7. #7
    Join Date
    Jun 2007
    Posts
    16
    Plugin Contributions
    0

    Default Re: Categories Dressing

    sorry about that, here is my code for the code for the modified tpl_categories.php file, i'm using the non linked headers, let mek now what you think.


    <?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 v1.0 by Glenn Herbert (gjh42) 2007-06-06
    */
    //$content_tm = '';
    //$content_head = tm_box_head(BOX_HEADING_CATEGORIES,'','style3');
    $content_tm .= '<ul class="ul2">
    ';

    $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 {

    // categories dressing - add (divider and) heading above a cat
    if ($box_categories_array[$i]['path'] == 'cPath=26') { //replace number with your desired cPath
    $content .= '<br>' . "\n"; // to add divider uncomment this line
    $content .= '<span class="catBoxHeading1"><strong>Room</strong></span><br />' . "\n";
    }
    // categories dressing - add (divider and) heading above a cat
    if ($box_categories_array[$i]['path'] == 'cPath=19') { //replace number with your desired cPath
    $content .= '<br>' . "\n"; // to add divider uncomment this line
    $content .= '<span class="catBoxHeading1"><strong>Categories</strong></span><br />' . "\n";
    }
    // categories dressing - add (divider and) heading above a cat
    if ($box_categories_array[$i]['path'] == 'cPath=31') { //replace number with your desired cPath
    $content .= '<br>' . "\n"; // to add divider uncomment this line
    $content .= '<span class="catBoxHeading1"><strong>Prices</strong></span><br />' . "\n";
    }
    $content .= '<a class="' . $new_style . '" href="' . zen_href_link(FILENAME_DEFAULT, $box_categories_array[$i]['path']) . '">';

    // categories dressing - display images for category names
    $cat_name_display = $box_categories_array[$i]['name'];
    if(in_array(str_replace("cPath=","",$box_categories_array[$i]['path']), explode(",",''))) { //replace numbers with your cat ids separated by commas
    $cat_name_display = '<img src="' . HTTP_SERVER . DIR_WS_CATALOG . DIR_WS_TEMPLATE . 'images/catimg' . str_replace("cPath=","",$box_categories_array[$i]['path']) . '.gif" alt="Category ' . str_replace("cPath=","",$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 .= $cat_name_display;
    } // images for category names

    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>';
    ?>

  8. #8
    Join Date
    Aug 2004
    Location
    Fountain Hills, AZ
    Posts
    515
    Plugin Contributions
    1

    Default Re: Categories Dressing

    Finally got it working... LOL..not sure how, but its working now.

    On template monster - ARGH!!! No this is mine - When a customer comes to me with one of those templates I look at the design - and save nothing but the images if that is appropriate and throw the rest away. I don't even try to make their templates work by hacking them up.... just way to much work. No I started with the basic classic without any images as is typical and started making my modifications.

    I really once again have to thank you. One last question... for some reason the customer wants the categories open all the time. I "believe" I read that the mod "Category List Box" does that. Is that correct and will it work with your modification. I want all the same just for the menu to not collapse.

    Thanks again... you saved me soooooooo much work now and in the future.


    Ruth

  9. #9
    Join Date
    Jul 2007
    Posts
    83
    Plugin Contributions
    0

    Default Re: Categories Dressing

    Hi gjh42, I have a question for you, I am using your mod in my cetegories sidebox. I want to use your mod with ezpages links in the same sidebox but does not work, how I can add your mod using ezpages links? Thanks a lot!

  10. #10
    Join Date
    Jan 2008
    Posts
    89
    Plugin Contributions
    0

    Default Re: Categories Dressing

    Quote Originally Posted by gjh42 View Post
    Ok, you have a Template Monster template, which has added a bunch of code to the stock file, and changed how the contents are built.

    If you tell me which Categories Dressing feature you are trying to use, I can probably tell you how to integrate it with this template.

    I think the issue is that TM has modified the categories to display as an unordered list, and when you merged/replaced code that got eliminated.
    Thank you for your response.

    I am looking for something similiar to : the attached screenshot

    1. a dotted line between each category (as shown)
    2. a custom made arrow beside each category ( as shown)
    3. to be able to hover over the category and the text becomes red

    thats it :) and disable everything else.
    Attached Images Attached Images  

 

 
Page 1 of 3 123 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

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