Zen Cart Logo
Forums / Addon Sideboxes / Categories Dressing

Categories Dressing

Views: 531,605

Results 1,861 to 1,880 of 2,268
9 Sep 2011, 3:23 PM
#1861
gjh42 avatar

gjh42

Black Belt

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

Categories Dressing

This is not a Categories Dressing issue; you can fix it by editing /includes/modules/sideboxes/your_template/categories.php (not a Cat Dressing file).```php

  • @version $Id: categories.php 2718 2005-12-28 06:42:39Z drbyte $
    */
    //add this line to turn sidebox off for non-category/product pages
    if ($cPath) {

    $main_category_tree = new category_tree;
    $row = 0;
    $box_categories_array = array();

// don't build a tree when no categories
$check_categories = $db->Execute("select categories_id from " . TABLE_CATEGORIES . " where categories_status=1 limit 1");
if ($check_categories->RecordCount() > 0) {
$box_categories_array = $main_category_tree->zen_category_tree();
}

require($template->get_template_dir('tpl_categories.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_categories.php');

$title = BOX_HEADING_CATEGORIES;
$title_link = false;

require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default);

//add this line to turn sidebox off for non-category/product pages
}
?>

There might possibly be a product page that doesn't involve a cPath for some kinds of display, so if you don't get the categories sidebox in a place you want it, post back and I'll take a look at adding the right extra condition.
10 Sep 2011, 8:06 AM
#1862
captaincarlton avatar

captaincarlton

New Zenner

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

Re: Categories Dressing

Thank you Glenn, that's perfect.

One of this reasons I wanted to disable the top category link is that I have not been able to format that resultant page (the page which loads after clicking the top category link) that way I want.

This resulting page loads the subcategories in a grid, and I can add a subcat image to each via admin, and all is good.

But I find I am not able to format these 'subcategory grid images' independently, without affecting other images. It looks like the overarching class is 'centerBoxWrapperContents". If I want to add an image border to these subcategory images in css using centerBoxWrapperContents img {border: etc... } then in doing so it applies the border to the Featured Product images, standard Product listing images etc. But what if I only want to format the subcat images with their own border. And further, being able to center the subcat grid, without centering the Product listsings etc which looks better floated left.

No big deal, but if you have any thoughts on this, I'd like to hear them.

Thanks again,

Adam.

10 Sep 2011, 11:33 AM
#1863
ray_the_otter avatar

ray_the_otter

Zen Follower

Join Date:
Jul 2010
Posts:
278
Plugin Contributions:
0

Re: Categories Dressing

That's awesome Sir. Thank you.
Worked perfectly!

gjh42:

This is not a Categories Dressing issue; you can fix it by editing /includes/modules/sideboxes/your_template/categories.php (not a Cat Dressing file).```php

  • @version $Id: categories.php 2718 2005-12-28 06:42:39Z drbyte $
    */
    //add this line to turn sidebox off for non-category/product pages
    if ($cPath) {

    $main_category_tree = new category_tree;
    $row = 0;
    $box_categories_array = array();

// don't build a tree when no categories
$check_categories = $db->Execute("select categories_id from " . TABLE_CATEGORIES . " where categories_status=1 limit 1");
if ($check_categories->RecordCount() > 0) {
$box_categories_array = $main_category_tree->zen_category_tree();
}

require($template->get_template_dir('tpl_categories.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_categories.php');

$title = BOX_HEADING_CATEGORIES;
$title_link = false;

require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default);

//add this line to turn sidebox off for non-category/product pages
}
?>

> There might possibly be a product page that doesn't involve a cPath for some kinds of display, so if you don't get the categories sidebox in a place you want it, post back and I'll take a look at adding the right extra condition.
10 Sep 2011, 11:48 AM
#1864
ray_the_otter avatar

ray_the_otter

Zen Follower

Join Date:
Jul 2010
Posts:
278
Plugin Contributions:
0

Re: Categories Dressing

BTW. I you click on a link from the New products or Featured products sidebox or centrebox, the Category Sidebox does not display, even though there is cPath in the URL

/index.php?main_page=product_info&cPath=0&products_id=523

I believe this is because of the value being '0'

But I can live without that! Thanks for the help!!

10 Sep 2011, 1:22 PM
#1865
gjh42 avatar

gjh42

Black Belt

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

Re: Categories Dressing

Well, if you have the sidebox set to show only subcategories of the active top cat, and there is no active top cat (cPath=0), what is going to display in the sidebox?
Unless you want all subcats to show when there is no active top cat, you already have the correct behavior.

11 Sep 2011, 11:01 AM
#1866
katyav avatar

katyav

New Zenner

Join Date:
Sep 2011
Posts:
6
Plugin Contributions:
0

Re: Categories Dressing

Hi, I'm quite new to zencart (and CSS and PHP...) so this might be a silly question, I tried to search on the forum but can't find an answer... :lookaroun

I have installed categories dressing, I switched to images instead of text and all is going well apart from when I try to have a hover effect - the 'main' image displays correctly but when I hover over it shows the default setting (light blue background with little yellow lines and no text).

I have uploaded the catbg2 (which works) and catbg2hover images and added the following to stylesheet_categories_dressing.css:

#categories li a.catBg2 {
background-image: url(../buttons/english/catbg2.gif);
height: 30px;
}

#categories li a.catBg2:hover {
background-image: url(../buttons/english/catbg2hover.gif);
}

Is there anything else I should be doing, or did I do something wrong? The website is here http://ic-blue.co.uk/kat/ (still very much work in progress so please ignore any weirdness!).
Thanks

11 Sep 2011, 3:01 PM
#1867
gjh42 avatar

gjh42

Black Belt

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

Re: Categories Dressing

You put the catbg2 rules in the wrong place, and the :hover is being overridden by a generic rule. Move them down to the place where the sample catbg rules are.```
#categories li a.catBg2 {
background-image: url(../buttons/english/catbg2.gif);
height: 30px;
}

#categories li a.catBg2:hover {
background-image: url(../buttons/english/catbg2hover.gif);
}

/change bullet when a category w/o bg image is open to subs:/
#categories li a.cat-parent-text {
list-style: square inside url(../images/bullet2.gif);/change to list-style: none; to remove bullet/
}

/change bullet when a category w/o bg image is open to products:/
#categories li a.cat-selected-text {
list-style: square inside url(../images/bullet3.gif);/change to list-style: none; to remove bullet/
}

/disable bullet for cats w/ image or bg image/
#categories li a.cat-parent, #categories li a.cat-selected, #categories li a.cat-not-selected {
list-style: none;
display: block;/fix IE6 margin-left bug/
}

/different bullet for links if desired/
/*
#categories li a.category-links {
list-style: disc inside url(../images/bullet4.gif);
}
*/

/* top category hover effects*/
#categories li.cat-top a:hover {
color: #dd6633;
background: #ddeeff url(../images/catbghover.gif);
}

/* subcategory hover effects*/
#categories li li.cat-subs a:hover, #categories li li.cat-products a:hover {
color: #aa9966;
background: #ffb9ff url(../images/catbghover.gif);
}

/individual page rules go after the general rules/
/example for individual category as bg image/
#categories li a.catBg25 {
background-image: url(../buttons/english/catbg25.gif);
height: 30px;
}

#categories li a.catBg25:hover {
background-image: url(../buttons/english/catbg25hover.gif);
}

#categories li a.catBg2 {
background-image: url(../buttons/english/catbg2.gif);
height: 30px;
}

#categories li a.catBg2:hover {
background-image: url(../buttons/english/catbg2hover.gif);
}

11 Sep 2011, 3:14 PM
#1868
katyav avatar

katyav

New Zenner

Join Date:
Sep 2011
Posts:
6
Plugin Contributions:
0

Re: Categories Dressing

Thank you so much, that's very helpful! I thought it was something to do with the stylesheet :blush:

11 Sep 2011, 3:31 PM
#1869
gjh42 avatar

gjh42

Black Belt

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

Re: Categories Dressing

CaptainCarlton - The different boxes have their own classes for box content, so you can address them individually.
The subcategory listing is .categoryListBoxContents {}, featured centerbox is .centerBoxContentsFeatured {} and the specials centerbox is .centerBoxContentsSpecials {}.

11 Sep 2011, 3:43 PM
#1870
gjh42 avatar

gjh42

Black Belt

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

Re: Categories Dressing

autoace:

@gjh42

I have categories dressing v2_8 installed. I have all my top cats and sub cats1 showing on the home page. A couple of my top cats have more than 10 sub cats1, is there a way to change it to where a max of 10 sub cats1 are displayed on the home page?
I said earlier that this would be fairly complex new coding, and it would be if done in PHP, but I just thought of a CSS workaround that may be acceptable for homepage use.

Something like```
#indexHomeBody #chcategories>ul>li+li+li+li+li+li+li+li+li+li+li {display: none;}

12 Sep 2011, 10:28 AM
#1871
bonnit avatar

bonnit

Zen Follower

Join Date:
Jun 2009
Location:
Kent, UK
Posts:
350
Plugin Contributions:
0

Re: Categories Dressing

hello, in danger of sounding like a wally.... ive seen a few references to version 2.8, the only version i have found in the addons area is 2.73 (last update May 31 2009) is there a link to the newest version or is it a private release?

im using ZC 1.3.9h if this is of any relevance :)

thanks

Edit: Ive found the mod - bah! sorry! :)

13 Sep 2011, 4:16 PM
#1872
gjh42 avatar

gjh42

Black Belt

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

Re: Categories Dressing

Yes, it's in post 1542, for anyone else who wants to know.

15 Sep 2011, 6:19 PM
#1873
r1formetoo avatar

r1formetoo

Zen Follower

Join Date:
Sep 2008
Posts:
429
Plugin Contributions:
0

Re: Categories Dressing

Could someone please link me to a site that uses "display images in place of selected category names?" I'd like to see what this looks like........

15 Sep 2011, 6:51 PM
#1874
r1formetoo avatar

r1formetoo

Zen Follower

Join Date:
Sep 2008
Posts:
429
Plugin Contributions:
0

Re: Categories Dressing

Ok, I've concocted questions. I've installed this mod on examplecart.com and the first thing I wish to do is set the first level of subcats to display. I see in the readme file that I can replace the "deepest_level" text of my categories_dressing_defines.php with a simple 0 through 9; however, I can't even seen to find this statement below in that file. I feel like I'm missing a major part of the picture here.

define('CAT_BOX_ACTIVE_LEVEL', 'active|highest_level|deepest_level');

15 Sep 2011, 6:55 PM
#1875
r1formetoo avatar

r1formetoo

Zen Follower

Join Date:
Sep 2008
Posts:
429
Plugin Contributions:
0

Re: Categories Dressing

Ahhh crap. I was looking in the wrong file.........

15 Sep 2011, 7:13 PM
#1876
r1formetoo avatar

r1formetoo

Zen Follower

Join Date:
Sep 2008
Posts:
429
Plugin Contributions:
0

Re: Categories Dressing

And the saga continues... I've made the last two numbers here 2's but still no subcategories are displaying when hovering with my mouse.

//define('CAT_BOX_ACTIVE_LEVEL', '0|1|2');//hide top cats
//define('CAT_BOX_ACTIVE_LEVEL', '1|0|2');//show only active cats, to first subcat level

15 Sep 2011, 7:49 PM
#1877
gjh42 avatar

gjh42

Black Belt

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

Re: Categories Dressing

You can only have one define for this constant. Did you remove the comment marks // before the define you want to activate?
Exactly what kinds of categories do you want to show and when?

15 Sep 2011, 8:22 PM
#1878
r1formetoo avatar

r1formetoo

Zen Follower

Join Date:
Sep 2008
Posts:
429
Plugin Contributions:
0

Re: Categories Dressing

I did learn to remove the // marks to make the statement take effect. I want all of the top level categories to display all the time and the 1st level of subcategories to pop up when the user hovers over one of the top level categories

17 Sep 2011, 3:17 PM
#1879
nummell avatar

nummell

New Zenner

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

Re: Categories Dressing

Hi,

I´m having some problems with categories dressing... Rolover doesn´t work on sub-cats... triple checked everything and can´t fix it. Can someone help please?

The site is online @ http://www.pedradatattoosupplies.com

Best regards

18 Sep 2011, 10:40 PM
#1880
r1formetoo avatar

r1formetoo

Zen Follower

Join Date:
Sep 2008
Posts:
429
Plugin Contributions:
0

Re: Categories Dressing

Glenn, are you there?