Zen Cart Logo
Forums / Addon Sideboxes / Categories Dressing

Categories Dressing

Views: 531,636

Results 1,521 to 1,540 of 2,268
19 Oct 2010, 10:17 PM
#1521
danatswift avatar

danatswift

New Zenner

Join Date:
Aug 2010
Location:
Norwich, CT
Posts:
26
Plugin Contributions:
0

Categories Dressing

Awesome, I'll start the install of the add-on now then. I wasn't sure if this was possible without the Categories Dressing add-on or not. I got the Image for Title addon working last night, now it's time to make the categories match up. Thank-you, hopefully you'll not have to hear more from me.

20 Oct 2010, 2:50 AM
#1522
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Categories Dressing

autoace - I have been looking at the cat_active_level_manage() function, and the feature you want is built into version 2.8 (not yet released - it has one IE bug I haven't been able to correct yet).

Add a new case to the switch in the function:```php
case 6://like 2, active branches only
if($cPath_top == 0){//test
$test_level = 1;
} elseif ($cPath_top == $path_top){
if ($cat_depth >= 2){//only test sub-subcats+
if (!in_array(cat_path_parent($path),explode('_',$_GET['cPath']))) $skip_cat = 1;//show only subcats w parent in $cPath
}
} else {//if not active test for level
$test_level = 1;
}
break;



Mmm... this function now depends on one or two functions/variables that are not in the current v2.7.3. If you would like to try v2.8, let me know and I'll post a zip for you. It does have an issue with replaced category images shifting to the right in IE7, but otherwise works fine as far as I can tell.
23 Oct 2010, 8:02 PM
#1523
autoace avatar

autoace

Totally Zenned

Join Date:
Jun 2009
Posts:
618
Plugin Contributions:
0

Re: Categories Dressing

gjh42 - Yeah, I'll try the new version! I have a test site that I can install it on and test out.

Let me know when that zip will be available, thanks.

27 Oct 2010, 8:36 AM
#1524
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Categories Dressing

I've been away - will post the zip later today after I get some sleep:)

27 Oct 2010, 12:25 PM
#1525
autoace avatar

autoace

Totally Zenned

Join Date:
Jun 2009
Posts:
618
Plugin Contributions:
0

Re: Categories Dressing

k, sounds good, sleep well :)

3 Nov 2010, 6:22 PM
#1526
joyjoy avatar

joyjoy

Totally Zenned

Join Date:
Sep 2010
Posts:
611
Plugin Contributions:
0

Re: Categories Dressing

Hello, I have a question about your mod...

I would like to HIDE the TOP category, SHOW the 1st subcategories (always) and SHOW the additional subcategories ONLY when the 1st subcategories are selected...

Is this possible? Am I being clear with my request?

Thank you!!

3 Nov 2010, 6:34 PM
#1527
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Categories Dressing

Yes, you would uncomment and set this in categories_dressing_defines.php:

define('CAT_BOX_ACTIVE_LEVEL', '4|1|1');

3 Nov 2010, 6:36 PM
#1528
joyjoy avatar

joyjoy

Totally Zenned

Join Date:
Sep 2010
Posts:
611
Plugin Contributions:
0

Re: Categories Dressing

COOL!!

Which one do I use? You've suggested two? Should I just try them both out? Thank you for the prompt response!

3 Nov 2010, 7:09 PM
#1529
joyjoy avatar

joyjoy

Totally Zenned

Join Date:
Sep 2010
Posts:
611
Plugin Contributions:
0

Re: Categories Dressing

Hello, it's me again.

So this adjustment made my 2nd, etc. subcategories visible when the first categories are selected...

However, for the TOP categories, instead of being hidden, it's popping up with a total: example: Gift Certificates (5) now.

I want the TOP category to stay hidden. Always.

3 Nov 2010, 7:19 PM
#1530
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Categories Dressing

Try option 5 instead of 4 - I think that will get what you want here.

'5|1|1'

3 Nov 2010, 7:43 PM
#1531
joyjoy avatar

joyjoy

Totally Zenned

Join Date:
Sep 2010
Posts:
611
Plugin Contributions:
0

Re: Categories Dressing

Uh oh...with that option my entire sidebox goes blank...any other ideas?

3 Nov 2010, 7:50 PM
#1532
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Categories Dressing

Not at the moment - I have to run. I'll look at it later.

4 Nov 2010, 11:22 PM
#1533
joyjoy avatar

joyjoy

Totally Zenned

Join Date:
Sep 2010
Posts:
611
Plugin Contributions:
0

Re: Categories Dressing

Does anyone know the solution to this??

Top Categories are hidden, but if you select a sub category, the top category is then visible.

https://www.funhn.com/shop

5 Nov 2010, 9:05 AM
#1534
coxdabd avatar

coxdabd

New Zenner

Join Date:
Aug 2010
Posts:
77
Plugin Contributions:
0

Re: Categories Dressing

Hi, I just want to add a couple of non-linking headers in my categories, how can this be done? Not sure where I need to insert the code in the tpl_categories.php? Any help would be greatly appreciated.

<?php /** * Side Box Template * * @package templateSystem * @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 * @version $Id: tpl_categories.php 4162 2006-08-17 03:55:02Z ajeh $ * Modified for Categories Dressing v2.7.3 by Glenn Herbert (gjh42) - 20090505 * * Referenced files: * includes/functions/extra_functions/categories_dressing_functions.php * includes/languages/english/extra_definitions/your_template/categories_dressing_defines.php - make user settings here */ $content = ""; $prev_cat_depth = -1;//do not alter $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: #categories li.cat-holiday a {} // 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 = 'holiday'; // break; case ($box_categories_array[$i]['top'] == 'true'): $new_style = 'top'; break; case ($box_categories_array[$i]['has_sub_cat']): $new_style = 'subs'; break; default: $new_style = 'products'; } $current_path = str_replace("cPath=","",$box_categories_array[$i]['path']); $skip_cat = 0; $skip_cat = cat_active_level_manage($current_path); if ($skip_cat or 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 { $cat_box_heading = cat_box_heading($current_path); $cat_ul = cat_ul_manage($current_path, $prev_cat_depth, $cat_box_heading[0]); $content .= $cat_ul; $content .= $cat_box_heading[1]; $cat_name_display = cat_name_display($box_categories_array[$i]['name'], $current_path); $active_class = ($box_categories_array[$i]['current'])? ($box_categories_array[$i]['has_sub_cat']? 'parent': 'selected'): 'not-selected'; $content .= ' <li class="cat-' . $new_style . '"><a class="cat-' . $active_class . $cat_name_display[0] . '" href="' . zen_href_link(FILENAME_DEFAULT, $box_categories_array[$i]['path']) . '">'; $content .= $cat_name_display[1]; if ($box_categories_array[$i]['has_sub_cat'] and $cat_name_display[0] == '-text') { $content .= CATEGORIES_SEPARATOR; } if (SHOW_COUNTS == 'true' and $cat_name_display[0] == '-text') { if ((CATEGORIES_COUNT_ZERO == '1' and $box_categories_array[$i]['count'] == 0) or $box_categories_array[$i]['count'] >= 1) { $content .= '<span class="catCount">' . CATEGORIES_COUNT_PREFIX . $box_categories_array[$i]['count'] . CATEGORIES_COUNT_SUFFIX . '</span>'; } } $content .= '</a>'; $content .= cat_box_subtext($current_path); } } $content .= cat_ul_manage(0, $prev_cat_depth, 0) . '</ul>' . "\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"; } $content .= '<ul class="catLinks">' . "\n"; if (SHOW_CATEGORIES_BOX_SPECIALS == 'true') { $cat_box_link_head = cat_box_heading('SPECIALS'); $content .= $cat_box_link_head[1]; $show_this = $db->Execute("select s.products_id from " . TABLE_SPECIALS . " s where s.status= 1 limit 1"); if ($show_this->RecordCount() > 0) { $content .= '<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(); $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) { $cat_box_link_head = cat_box_heading('NEW'); $content .= $cat_box_link_head[1]; $content .= ' <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) { $cat_box_link_head = cat_box_heading('FEATURED'); $content .= $cat_box_link_head[1]; $content .= ' <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') { $cat_box_link_head = cat_box_heading('ALL'); $content .= $cat_box_link_head[1]; $content .= ' <li><a class="category-links" href="' . zen_href_link(FILENAME_PRODUCTS_ALL) . '">' . CATEGORIES_BOX_HEADING_PRODUCTS_ALL . '</a>' . '</li>' . "\n"; } $content .= '</ul>' . "\n"; } $content .= '</div>'; ?>
6 Nov 2010, 3:26 PM
#1535
joyasfashiondotcom avatar

joyasfashiondotcom

New Zenner

Join Date:
Nov 2010
Posts:
2
Plugin Contributions:
0

Re: Categories Dressing

joyjoy:

Does anyone know the solution to this??

Top Categories are hidden, but if you select a sub category, the top category is then visible.

https://www.funhn.com/shop

I don´t think I can help you with that, cause I´m also new, but I would like to know how to show the image of the products when category is selected, that´s why I entered this thread.
http://edeflated.com/index.php?main_page=index&cPath=1[/QUOTE]
In this link as you can see it only shows the description of the product. I want it to show a little image too, like I saw on your site, when category is selected.

6 Nov 2010, 6:38 PM
#1536
joyasfashiondotcom avatar

joyasfashiondotcom

New Zenner

Join Date:
Nov 2010
Posts:
2
Plugin Contributions:
0

Re: Categories Dressing

never mind I found it. Admin.. Config.. Product listing.:yes:

6 Nov 2010, 11:19 PM
#1537
autoace avatar

autoace

Totally Zenned

Join Date:
Jun 2009
Posts:
618
Plugin Contributions:
0

Re: Categories Dressing

gjh42:

I've been away - will post the zip later today after I get some sleep:)

gjh42, almost ready with the zip?

7 Nov 2010, 9:14 PM
#1539
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Categories Dressing

coxdabd - You don't touch tpl_categories.php for this or any other Cat Dressing setup.
The readme describes how to edit categories_dressing_defines.php to add headings above desired categories. You need to know the category path (cPath) for the categories.

8 Nov 2010, 8:59 PM
#1540
finlander avatar

finlander

Zen Follower

Join Date:
Oct 2010
Location:
Idaho
Posts:
293
Plugin Contributions:
0

Re: Categories Dressing

I just installed this mod, and removed the example items from displaying, but what is the deal with the red bar next to one of my categories, when the rest the categories have a little red arrow? All of the categories are on the same level, and I populated one category with a couple of products to see if that would cause it change to a red bar, but it stayed a red arrow. Could someone point me in the right direction on this one? Thanks!

http://www.vintage-adventures.com/