Page 1 of 15 12311 ... 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

    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.

  2. #2
    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>';
    ?>

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

    Default Re: Categories Dressing

    You have replaced all of TM's code in this file, except for the opening
    $content_tm .= '<ul class="ul2">
    ';
    which is now not closed. This would cause an error if $content_tm were being applied at the end.. TM uses $content_tm to accumulate the list instead of $content, so the heading code will need to be modified to work with this.
    Also, the <ul> is not going to play nice with a non-list item tossed in the middle, so we will have to end the list, add the heading and start another list.

    You need to go back to the original TM file, and add just the heading code, as shown here in its modified form.

    Immediately after this bit:
    PHP Code:
    // skip if this is for the document box (==3)
    } else { 
    add this:
    PHP Code:
    // categories dressing - add (divider and) heading above a cat
    if ($box_categories_array[$i]['path'] == 'cPath=26') { //replace number with your desired cPath
    $content_tm .= '</ul>';
    $content_tm .= '<br>' "\n"// to add divider uncomment this line
    $content_tm .= '<span class="catBoxHeading1"><strong>Room</strong></span><br />' "\n";
    $content_tm .= '<ul class="ul2" >' "\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_tm .= '</ul>';
    $content_tm .= '<br>' "\n"// to add divider uncomment this line
    $content_tm .= '<span class="catBoxHeading1"><strong>Categories</strong></span><br />' "\n";
    $content_tm .= '<ul class="ul2" >' "\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_tm .= '</ul>';
    $content_tm .= '<br>' "\n"// to add divider uncomment this line
    $content_tm .= '<span class="catBoxHeading1"><strong>Prices</strong></span><br />' "\n";
    $content_tm .= '<ul class="ul2" >' "\n";


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

    Default Re: Categories Dressing

    I'm already confused.... This code you sent.

    // skip if this is for the document box (==3)
    } else {

    Does not exist in the orignal code I sent you.......

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

    Default Re: Categories Dressing

    alright nevermind, I found it, and it worked! Thanks!

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

    Default Re: Categories Dressing

    Categories Dressing version 1.1 is now available in Downloads.

    Added two new functions, example files, and more directions for use of built-in functions.

    - You can replace any desired category names with background image links which swap on hover.
    - You can add a custom bullet to top categories, which changes when a cat opens to subs.

    The examples are configured to display with Zen Cart demo products to quickly illustrate their use. A sample stylesheet is included, from which to copy CSS code for your main stylesheet.

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

    Default Re: Categories Dressing

    Do you have an example Site for the hover Images? This is exactly what i'ver requested!
    The only problem is the lack of Documentation...

    Anyway Thanks

  8. #8
    Join Date
    Apr 2007
    Location
    Ontario, Canada
    Posts
    97
    Plugin Contributions
    0

    red flag Re: Categories Dressing

    PLEASE can you help me - I am going blind from looking at code and I'm sure the answer is right in front of me but I am missing it.
    I am reinstalling my site and have update my version of Zen cart to the latest (did this 2 days ago).
    I added this mod categories_dressing_2-7-3 and have managed to do some customizing but am stumped at something.
    Here is my site (under construction)
    http://ljgdesign.com
    You will see my categories on the left side.

    - I only want the one divider line above the link heading - how do i remove the other's?

    - Also, where do I find the text "Link Heading" to modify it - I have looked all over the place and can't find it.

    - one last thing...see the arrow that I put in that points to the sub categories? I did that last year - Any idea where that is? I would love to remove it lol

    Thanks so much for any help you can offer. I really appreciate it and am sorry to bother you.

  9. #9
    Join Date
    Apr 2007
    Location
    Ontario, Canada
    Posts
    97
    Plugin Contributions
    0

    Default Re: Categories Dressing

    My includes/languages/english/extra definitions/my folder/categories_dressing_defines.php
    file looks like this

    <?php
    /**
    *
    * @copyright Copyright 2009 Glenn Herbert
    * @copyright Portions Copyright 2003-2006 Zen Cart Development Team
    * @copyright Portions Copyright 2003 osCommerce
    * @license http://www.gnu.org/licenses/ GNU Public License V3.0
    * Categories Dressing v2.7.3 - Glenn Herbert (gjh42) - 20090505
    * includes/languages/english/extra_definitions/your_template/categories_dressing_defines.php
    */


    //example defines - copy & modify for each category desired
    define ('CAT_BOX_HEADING_#','group|divider/class|[imgname]|[imgalt][|headcontent|headclass][|headcontent|headclass]...');
    define ('CAT_BOX_HEADING_1','1|0||');//new list - no headings
    //define ('CAT_BOX_HEADING_3','1|0|||Major Heading|1|Minor Heading|2');//new list - text headings - multiple levels - styles 1 & 2
    //define ('CAT_BOX_HEADING_23','0|0|||Another Heading|2');//no list break - divider and text heading - style 2
    //define ('CAT_BOX_HEADING_33_34','0|0|||Subcat Heading|3');//simple text heading - style 3
    //define ('CAT_BOX_HEADING_48','1|0|cathead48.gif|Cat 48 Heading|Buy Now...|3');//image heading and alt text - can be followed by text heading(s)
    //define ('CAT_BOX_HEADING_52','0|1||');//divider only - style 1
    //define ('CAT_BOX_HEADING_53','0|2||');//divider only - style 2
    //define ('CAT_BOX_HEADING_FEATURED','0|0|||Featured Heading|3');//no list break - text heading


    //
    //display only the active top category and its subs, hide top cats, hide sub-subcats, or any combination.
    //only uncomment and set this define if you want to hide cats based on active tree or level
    // 'active|highest_level|deepest_level'
    //active: 0=all tops/1=full active tree only/2=active only (all tops when no cat selected)/
    //3=full active tree, others per level/4=like 3, active branches only/5=like 1, no tops|
    //highest_level: 0=all levels/1=no topcats/etc.|
    //deepest_level: 1=only first subcats/2=first & second subcats/etc.
    //
    //define('CAT_BOX_ACTIVE_LEVEL', '0|1|9');//hide top cats
    //define('CAT_BOX_ACTIVE_LEVEL', '1|0|1');//show only active cats, to first subcat level
    ?>





    Quote Originally Posted by lj111970 View Post
    PLEASE can you help me - I am going blind from looking at code and I'm sure the answer is right in front of me but I am missing it.
    I am reinstalling my site and have update my version of Zen cart to the latest (did this 2 days ago).
    I added this mod categories_dressing_2-7-3 and have managed to do some customizing but am stumped at something.
    Here is my site (under construction)
    http://ljgdesign.com
    You will see my categories on the left side.

    - I only want the one divider line above the link heading - how do i remove the other's?

    - Also, where do I find the text "Link Heading" to modify it - I have looked all over the place and can't find it.

    - one last thing...see the arrow that I put in that points to the sub categories? I did that last year - Any idea where that is? I would love to remove it lol

    Thanks so much for any help you can offer. I really appreciate it and am sorry to bother you.

  10. #10
    Join Date
    Apr 2007
    Location
    Ontario, Canada
    Posts
    97
    Plugin Contributions
    0

    Default Re: Categories Dressing

    ok - I managed to remove the divider lines but still wondering about the stupid arrow and the text "Link Heading "

    Thanks

 

 
Page 1 of 15 12311 ... 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