Zen Cart Logo
Forums / Addon Sideboxes / Categories Dressing

Categories Dressing

Views: 531,613

Results 1,721 to 1,740 of 2,268
31 Mar 2011, 2:41 AM
#1721
mamakitty avatar

mamakitty

New Zenner

Join Date:
Aug 2006
Location:
Denver CO
Posts:
65
Plugin Contributions:
0

Categories Dressing

Solved the problem :)

I'm using the Images for Titles add-on to place the paw tracks farther down the left column. Added an image named in that mod's style and now have the little grey paw print instead of the word "categories".

I'd ask a mod to remove my post but maybe this will help someone else having similar problems.

Dorothy

7 May 2011, 4:12 AM
#1722
bonboncat avatar

bonboncat

New Zenner

Join Date:
May 2011
Posts:
7
Plugin Contributions:
0

Re: Categories Dressing

GREAT MOD!!!

i love it's hovering style :bigups:
just wondering if i can apply it to the other's sideboxes link such as ezpages link info link etc

this is my first time looking at codes :wacko:

9 May 2011, 12:21 AM
#1723
balihr avatar

balihr

Totally Zenned

Join Date:
Oct 2008
Location:
Croatia
Posts:
1,769
Plugin Contributions:
20

Re: Categories Dressing

Can't seem to figure it out... I've read this thread's last 30 pages or so and now my eyes hurt... :cry:

I'd like to show only the active category with it's subcategories and no other.
Meaning, if I have something like:

1
 -1a
   -1aa
   -1ab
   -1ac
 -1b
 -1c
2
 -2a
 -2b
 -2c
3
 -3a
 -3b

and I click 1a, i get only

 1a
  -1aa
  -1ab
  -1ac

and nothing else.

Can this even be done?

Thanks in advance!

9 May 2011, 1:19 AM
#1724
gjh42 avatar

gjh42

Black Belt

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

Re: Categories Dressing

So you want all top and first level subcats to show (or some other combination), until you click one, and then only the category you clicked and its subs are shown? How will users then go to another category?

9 May 2011, 1:25 AM
#1725
gjh42 avatar

gjh42

Black Belt

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

Re: Categories Dressing

bonboncat - You can style any link to change background or text characteristics etc. on hover, but switching individual images per link would require internal distinguishing code that other sideboxes don't have. The Ezpages Improved Menus mod will allow you to substitute an image for the link text in the ez-pages sidebox, but it doesn't have the background image hover switch capacity.

9 May 2011, 3:52 AM
#1726
balihr avatar

balihr

Totally Zenned

Join Date:
Oct 2008
Location:
Croatia
Posts:
1,769
Plugin Contributions:
20

Re: Categories Dressing

gjh42:

So you want all top and first level subcats to show (or some other combination), until you click one, and then only the category you clicked and its subs are shown? How will users then go to another category?

Yes, Glen, that's exactly what I want. I'm using cat tabs in the header and would like to keep my sidebox smaller and only display the current category's subs.
Can you help me with that, please? Thanks.

9 May 2011, 4:06 AM
#1727
gjh42 avatar

gjh42

Black Belt

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

Re: Categories Dressing

Do you not want the top cats to show in the sidebox at all? Try this:

define('CAT_BOX_ACTIVE_LEVEL', '5|1|9');//show active, no top, per levels; hide top cats

9 May 2011, 5:35 AM
#1728
balihr avatar

balihr

Totally Zenned

Join Date:
Oct 2008
Location:
Croatia
Posts:
1,769
Plugin Contributions:
20

Re: Categories Dressing

Thank you Glenn, but that's not it.

I'm still getting other subcategories displayed. What I want is to get ONLY the selected category displayed.

1a
  -1aa
  -1ab

and not

1a
  -1aa
  -11ab
1b
  -1ba
  -1bb

etc. Is that possible?

9 May 2011, 5:37 AM
#1729
bonboncat avatar

bonboncat

New Zenner

Join Date:
May 2011
Posts:
7
Plugin Contributions:
0

Re: Categories Dressing

WOOOOHOOOOOOOOO your code is a great
i manage to add hovering effect to my ezpages link with ezpages improved menu + your code and finally it worked
thanks for your great add on
but i realize something is missing in my test page
why the hovering effect is not affecting my all product link in category @.@
i guess there's something is missing >.<
it's background color is not changing but it's text color changed

9 May 2011, 12:05 PM
#1730
gjh42 avatar

gjh42

Black Belt

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

Re: Categories Dressing

balihr - I need to see what you have so far to fully understand how what you want can work. You can't select a subcat from the categories-tabs menu (unless you have a dropdown mod installed). How are you getting the subcats displayed in the first place to pick one? Do you want all of the subs of a top cat to display when you pick it, and only one subcat and its subs to display when you pick that? That leaves a situation where you can't easily move from one subcat to another in the same top cat.

bonboncat - Again, I need to see what you have to advise on how to finish getting your other links to behave as you want.

9 May 2011, 2:48 PM
#1731
balihr avatar

balihr

Totally Zenned

Join Date:
Oct 2008
Location:
Croatia
Posts:
1,769
Plugin Contributions:
20

Re: Categories Dressing

Hey Glen!
Uhm, my site is still on localhost so I can't show it to you, sorry.

What I had in mind is something quite similar to LightInTheBox site - when you enter a certain category, the sidebox displays only that category's subs and parent cat on top.
I have categories in three levels. First level is in cat tabs. When you select that category, sidebox should display only that category's subcats (level 2). Then, you can select a sub-subcat and the sidebox should show level 3 subcats only from the selected level 2 category. If the parent level 2 category can show on top, it would be perfect.

I hope this makes sense... Maybe it would make more sense if my English was better... :smile:

9 May 2011, 5:07 PM
#1732
gjh42 avatar

gjh42

Black Belt

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

Re: Categories Dressing

Your example is a very complex and custom-built categories menu group.
You could achieve the basic functionality of showing only the active branches of the active tree by modifying case 4 in categories_dressing_functions.php. Call it case 7:```php
case 7://like 3, active branches only, no tops, no collateral first subs
if($cPath_top == $path_top){
$path_ids = explode('',$path);
if ($cat_depth == 0){ $skip_cat = 1; //no top cats
}elseif ($cat_depth ==1){//hide first subcats unless active or none selected
$cpath_depth = substr_count($GET['cPath'],'');
$path_current = $path_ids[count($path_ids)-1];
if (!in_array($path_current,explode('
',$GET['cPath'])) and $cpath_depth >= 1) $skip_cat = 1;//show only subcats w parent in $cPath
}elseif ($cat_depth >= 2){//only test sub-subcats+
$path_parent = $path_ids[count($path_ids)-2];
if (!in_array($path_parent,explode('
',$_GET['cPath']))) $skip_cat = 1;//show only subcats w parent in $cPath
}
} else {//skip if not in active top
$skip_cat = 1;
}
break;

10 May 2011, 1:05 PM
#1733
balihr avatar

balihr

Totally Zenned

Join Date:
Oct 2008
Location:
Croatia
Posts:
1,769
Plugin Contributions:
20

Re: Categories Dressing

Man, that's awesome! It works exactly as I want it. Thank you so very much!

Now, I'll just have to figure out how to add a link to all top level categories on top of the sidebox. Been thinking about what you've said and there should be something there, although I have cat tabs. Would you happen to know what code would call for all top level categories listing?

10 May 2011, 1:29 PM
#1734
gjh42 avatar

gjh42

Black Belt

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

Re: Categories Dressing

Glad it's working!
A link for all top cats would be like
<a href="index.php?main_page=index&cPath=0">All Main Categories</a>

There are easy ways to add a link in the Categories Dressing box, but since you have so many different possible displays there, they won't work correctly in every instance. You will need to hard-code it in tpl_categories.php. Find this at the top of the file```php
$content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent">' . "\n";


 $content .= '<a id="topLink" href="index.php?main_page=index&cPath=0">All Main Categories</a>';

to get```php
  $content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent">' . "\n";
  $content .= '<a id="topLink" href="index.php?main_page=index&cPath=0">All Main Categories</a>';

Then add to your stylesheet

#chcategories #topLink {}

with any styling you need.
Change the All Main Categories text as desired.

10 May 2011, 5:58 PM
#1735
balihr avatar

balihr

Totally Zenned

Join Date:
Oct 2008
Location:
Croatia
Posts:
1,769
Plugin Contributions:
20

Re: Categories Dressing

Hm... Adding it is not a problem, but it doesn't work with Simple SEO URLs. I did know the direct link (cPath=0), but I've tested it on my other live site which uses SSU and it just took me to the home page (as in page not found). Is there any other way to access all categories (zen_href link) so it works with SSU since I plan on using it on this site...

11 May 2011, 5:18 AM
#1736
gjh42 avatar

gjh42

Black Belt

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

Re: Categories Dressing

You should be able to use zen_href_link() for that... I don't have the exact format you would need off the top of my head.

11 May 2011, 4:29 PM
#1737
balihr avatar

balihr

Totally Zenned

Join Date:
Oct 2008
Location:
Croatia
Posts:
1,769
Plugin Contributions:
20

Re: Categories Dressing

Glenn, thank you very much for all your effort and help provided, I really appreciate it. If I find the solution for the zen_href_link and going to top level categories, I'll make sure to post it here.

Once again, thank you.

13 May 2011, 11:22 PM
#1738
design75 avatar

design75

Totally Zenned

Join Date:
Dec 2009
Location:
Amersfoort, The Netherlands
Posts:
2,862
Plugin Contributions:
5

Re: Categories Dressing

At first I was a little overwhelmed by the possibilities of this mod, but now... I just love it :clap:

13 May 2011, 11:33 PM
#1739
gjh42 avatar

gjh42

Black Belt

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

Re: Categories Dressing

Thanks! It can be overkill for some small requirements, but it would have been much more complicated to build a bunch of different small mods that could all work together instead of bundling the whole smorgasbord of options into one mod.

20 May 2011, 3:48 AM
#1740
artjewl avatar

artjewl

New Zenner

Join Date:
Oct 2010
Posts:
21
Plugin Contributions:
0

Re: Categories Dressing

I'm really sorry if this has already been addressed. I've tried searching, but short of reading all 170+ pages in this forum alone, I'm stuck as to where to go next.

Anyhow, what I'm trying to do is to display one of my groups of categories as inline. In other words, I have categories for each letter, and I'd rather them appear as one block than each on its own line.

I had no problem before I added the categories dressing (simply removed the < br > from the tpl_categories.php for my theme). But now, with Categories Dressing, I can't figure out what to do. It seems that my group is only including the first category in it rather than all 26.

Any thoughts?

Another more specific question: in the categories_dressing_defines.php, does it matter what order the define statements are in? My categories don't appear in numerical order, so my define statements reflect that. ie:

define ('CAT_BOX_HEADING_61','1|0||');
define ('CAT_BOX_HEADING_41','1|0||');
define ('CAT_BOX_HEADING_33','1|0||');
define ('CAT_BOX_HEADING_1','1|0||');

Thanks in advance for the help!