Zen Cart Logo
Forums / Addon Sideboxes / Categories Dressing

Categories Dressing

Views: 531,621

Results 1,601 to 1,620 of 2,268
15 Jan 2011, 2:08 AM
#1601
viper75 avatar

viper75

New Zenner

Join Date:
Jan 2011
Posts:
11
Plugin Contributions:
0

Categories Dressing

Hi! I've installed this mod.
Good!
I've a problem.
this is my uncollapsed menu:
CATEGORY ONE
|_SUB CATEGORY
|__SUB-SUB CATEGORY
then...
I wish that the word "category one" had a background (for example black, and now I've resolved with

"define ('CAT_BOX_HEADING_65','0|1|||category one|1');//no list break - divider and text heading - style 2)

but the word "category one" now is not clickable!

How can I do?
sorry for my bad english!!!!! :wacko:

15 Jan 2011, 2:45 AM
#1602
gjh42 avatar

gjh42

Black Belt

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

Re: Categories Dressing

The define ('CAT_BOX_HEADING_xx... is not for styling the categories themselves, but for adding a heading above a category.

Do you want all of the top categories styled the same with a black background, or just this one?

15 Jan 2011, 6:46 AM
#1603
berserker avatar

berserker

Totally Zenned

Join Date:
May 2006
Posts:
712
Plugin Contributions:
0

Re: Categories Dressing

gjh42:

The full set of categories is only displayed on the circuitcity site when you go deeper than the first subcategories you get from the dropdown menu.

If you don't want other than top categories displaying in the sidebox outside of the active tree, you don't need chcategories. On the other hand, using chcategories can get you two sideboxes, one for top cats and one for the current tree. CSS can hide the unwanted levels in each sidebox, or you can code a special "case" for the active/level control function as I have shown here several times for different situations.

Thanks for the reply.
Got it the way we want now :)

Question regarding the subtext, is it possible to have a hardcoded link below it? We need to have links to several faqs regarding the products in the selected category and I think this is the only way to do it. Tried several setting combinations but cant get it to work.

15 Jan 2011, 2:57 PM
#1604
viper75 avatar

viper75

New Zenner

Join Date:
Jan 2011
Posts:
11
Plugin Contributions:
0

Re: Categories Dressing

gjh42:

The define ('CAT_BOX_HEADING_xx... is not for styling the categories themselves, but for adding a heading above a category.

Do you want all of the top categories styled the same with a black background, or just this one?

exact! :bigups:

17 Jan 2011, 5:31 PM
#1605
gjh42 avatar

gjh42

Black Belt

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

Re: Categories Dressing

The "subtext" can include one or more hardcoded links. Pretty much anything you can put in HTML in the define can be displayed there. You can even use PHP in the define if you know what you are doing with it.

17 Jan 2011, 8:13 PM
#1606
berserker avatar

berserker

Totally Zenned

Join Date:
May 2006
Posts:
712
Plugin Contributions:
0

Re: Categories Dressing

gjh42:

The "subtext" can include one or more hardcoded links. Pretty much anything you can put in HTML in the define can be displayed there. You can even use PHP in the define if you know what you are doing with it.

How? Could you please tell me what to put in to have at least 2 hardcoded links.
I tried the same setup we have for adding hardcoded links in the heading but it doesnt work for the subtext. It sorts of breaks it or only shows 1 link.

17 Jan 2011, 11:59 PM
#1607
berserker avatar

berserker

Totally Zenned

Join Date:
May 2006
Posts:
712
Plugin Contributions:
0

Re: Categories Dressing

Got several links now on the subtext but im unable to style them individually. When I add |1 or |1| at the end of each link, it breaks it.

18 Jan 2011, 2:48 PM
#1608
gjh42 avatar

gjh42

Black Belt

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

Re: Categories Dressing

The built-in styling system will only handle the subtext for one category as a single group; however, there is nothing stopping you from including spans or divs with ids in the subtext HTML, and styling those ids. Alternatively, you could give ids directly to the <a> tags, avoiding the necessity for more HTML markup.

21 Jan 2011, 8:28 PM
#1609
gjh42 avatar

gjh42

Black Belt

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

Re: Categories Dressing

Just for information, I have considered the possibility of using Categories Dressing as a flyout menu, and it will work (with the chcategories option installed) just by adding the lines in red to stylesheet_chcategories_dressing.css:```
#chcategories ul ul a {/subcategories/
display: list-item;
list-style: circle inside url(../images/bullet1.gif);/change to list-style: none; to remove bullet/
background: #ffddbb;
border: none;
margin: 0;
padding: 0;
}

#chcategories ul ul {display: none;}

#chcategories li:hover {position: relative;}

#chcategories li:hover>ul {display: block; position: absolute; left: 130px; top: 0; z-index: 100; width: 140px;}

Adjust the values to fit your conditions.
21 Jan 2011, 10:47 PM
#1610
joyjoy avatar

joyjoy

Totally Zenned

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

Re: Categories Dressing

Hello I have a quck question.

I am using your mod with the simple text headings. Is there a way that I can create one of these headings a different color for specials?

I know I use the css file to change the details but I don't know how I would make it work for a specified category. Does that make sense?

22 Jan 2011, 1:38 AM
#1611
gjh42 avatar

gjh42

Black Belt

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

Re: Categories Dressing

More information: I have finally found a workaround for the IE7 list-style bug. It required changing the entire organization of stylesheet category rules and making them a bit more complicated, but it now works.

I still need to test a refinement of ul/li nesting function for an obscure set of possible situations; when I am satisfied that that works correctly, I will finally be able to release v2.8.

22 Jan 2011, 1:50 AM
#1612
gjh42 avatar

gjh42

Black Belt

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

Re: Categories Dressing

If you mean the "Specials" link at the bottom of the sidebox, you can make a heading above that with a define like this:

define ('CAT_BOX_HEADING_SPECIALS','0|0|||Specials Heading|3');//no list break - text heading - style 3

The "3" says to use the stylesheet rule .catBoxHeading3 {. You can make a new rule 4 if you want for this case.

22 Jan 2011, 1:51 AM
#1613
joyjoy avatar

joyjoy

Totally Zenned

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

Re: Categories Dressing

Thank you for clarifying. I just figured that out. =)

I thought the "3" was something to do with the show/hide levels. Can't wait for the update. Thank you!

27 Jan 2011, 3:52 AM
#1614
sph avatar

sph

Totally Zenned

Join Date:
Jan 2006
Posts:
1,556
Plugin Contributions:
0

Re: Categories Dressing

My test site:
http://www.prom-mart.com/

Looking at only using the ch open categories. Everything seems to work (only two subcats on this test site).

ISSUE: How to make the open categories box heading black background image, while leaving rest of headings the tan image, as per my template.

Here's pic of what I wish:

http://www.prom-mart.com/images/cat-open-pic.jpg

Currently not using any cat dress/ch dressing style sheet, as everything looks like what I wish...except for black heading for cats. I did try the ch stylesheet to solve problem.

My template style sheet controls the black cat heading with (apparently two images comprise heading) copied below.

Looks like it should be simple, but I've been unsuccessful so far.

Thanks for any help.

SPH

.main-sidebox-header-left {
background: url("../images/main_sidebox_left.gif") no-repeat left top !important;
padding: 0 0 0 0.3em;
}
.main-sidebox-header-right {
background: url("../images/main_sidebox_right.gif") no-repeat right top !important;
color: #ffffff !important;
padding: 0 0 0 0.3em;
}

27 Jan 2011, 4:46 AM
#1615
gjh42 avatar

gjh42

Black Belt

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

Re: Categories Dressing

I'm not sure exactly what custom code is putting the .main-sidebox-header-left and .main-sidebox-header-right classes on the regular categories sidebox, but you don't need custom classes; you can just use the box id combined with the standard (for your template) class, and the standard box head id:

#chcategories .sidebox-header-left {
background: url("../images/main_sidebox_left.gif") no-repeat left top !important;
padding: 0 0 0 0.3em;
}

#chcategoriesHeading {
background: url("../images/main_sidebox_right.gif") no-repeat right top !important;
color: #ffffff !important;
padding: 0 0 0 0.3em;
}

27 Jan 2011, 6:29 AM
#1616
sph avatar

sph

Totally Zenned

Join Date:
Jan 2006
Posts:
1,556
Plugin Contributions:
0

Re: Categories Dressing

It worked, thanks!

http://www.prom-mart.com/

I pasted your code at botom of ch stylesheet.

sph

27 Jan 2011, 6:38 AM
#1617
sph avatar

sph

Totally Zenned

Join Date:
Jan 2006
Posts:
1,556
Plugin Contributions:
0

Re: Categories Dressing

Now testing on main site:

http://www.prommart.com/

Thanks!

SPH

29 Jan 2011, 12:15 PM
#1618
nummell avatar

nummell

New Zenner

Join Date:
May 2010
Location:
Portugal
Posts:
17
Plugin Contributions:
0

Re: Categories Dressing

Hi,

I´m having a little problem with the subcategories not showing hover images on Internet Explorer and I can´t fix this...
It works great on Firefox and Safari but on IE it only works on main categories... on the sub categories it just goes blank when the buttons are hovered...

here´s the problem
http://pedradatattoosupplies.com
Try the inks (tintas) for example...

Anyone knows the solution for this?

Thx in advance

29 Jan 2011, 6:27 PM
#1619
twitchtoo avatar

twitchtoo

Totally Zenned

Join Date:
Apr 2007
Location:
Ontario, Canada
Posts:
1,733
Plugin Contributions:
14

Re: Categories Dressing

I just found a couple bugs in the tpl_categories.php while trying to install and modify ch_category bundled with categories dressing... using ZenCart 1.3.9h

includes/templates/YOUR_TEMPLATE/sideboxes/tpl_categories.php

1 - You will want to **add **this line:
$content .= "\n" . '<ul style="margin: 0; padding: 0; list-style-type: none;">' . "\n";

**below **this line (18):
$content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent">' . "\n";

2 - You will then need to **add **a <li> in front of the <div class= around line (41) to make it look like this:

  $content .= '**<li>**<div class="betterCategories"><a class="' . $new_style . '" href="' . zen_href_link(FILENAME_DEFAULT, $box_categories_array[$i]['path']) . '">';

3 - Then find this line (60):
$content .= '<br />' . "\n";

and replace it with this line:
$content .= '</div></li>' . "\n";

that will close the div container and close the li.

4 - Finally add this line:
** $content .= '</ul>' . "\n";**
**
above** this line:
$content .= '</div>';

at the end of the file around line (96).

This will close the ul and keep the whole category box contained properly.

I am aware that the stock tpl_categories.php doesn't wrap each link with a div (notice 'betterCategories' has been added to my links) but once you do, you can further control each link!

Side note about line numbers: Line breaks have been removed from my stock tpl_categories.php remove the empty space in your file and line numbers will match.

Twitch.

29 Jan 2011, 7:03 PM
#1620
gjh42 avatar

gjh42

Black Belt

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

Re: Categories Dressing

How does this relate to Categories Dressing? Its <ul><li> processing happens in a function, not directly in tpl_categories.php. The ch_categories /includes/ folder by itself only provides the expanded set of categories and subs - all the list/level processing happens in the functions called by the main tpl_categories.php in the Categories Dressing /includes/ folder. If you installed the ch_categories by itself, you would be getting none of the <ul> code. Adjusting the stock tpl_categories file is (partially) duplicating the function that CD already does, and is not necessary - just use the whole package as built.