Zen Cart Logo
Forums / Addon Sideboxes / Categories Dressing

Categories Dressing

Views: 531,461

Results 181 to 200 of 2,268
25 Feb 2008, 09:00
#181
gjh42 avatar

gjh42

Black Belt

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

Categories Dressing

And you see /includes/templates/12volt/sideboxes/tpl_categories.php and /includes/templates/12volt/css/stylesheet_categories_dressing.css in your test store?

25 Feb 2008, 18:11
#182
bumba000 avatar

bumba000

Totally Zenned

Join Date:
Feb 2007
Location:
Pennsylvania
Posts:
856
Plugin Contributions:
0

Re: Categories Dressing

Glenn,
I really want to say thank you for your time and help on this.
I figured out what the problem is.

My test store is semi broken. It seems as though anything I click on takes me to the original live store.

I installed this mod on the live store for just a few moments to verify that it works. It Does!

Thanks again,
John

25 Feb 2008, 18:43
#183
bumba000 avatar

bumba000

Totally Zenned

Join Date:
Feb 2007
Location:
Pennsylvania
Posts:
856
Plugin Contributions:
0

Re: Categories Dressing

I do have another question for you Glenn.

What is your best advice for using this mod with lots and lots of categories?

If the images are only 25px the site will go on for miles and that's only cat tops.

Thanks
John

26 Feb 2008, 08:02
#184
gjh42 avatar

gjh42

Black Belt

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

Re: Categories Dressing

The standard advice for information display is to have no more than 5 to 7 or so items in any one group, so they are easily comprehensible. With such a large total number of categories, instant legibility is critical.

Rather than making each category name an image, you might do best to use the heading function to break the list down into related groups of categories, or otherwise provide "anchor points" at intervals in the list so the customer's eyes don't slide around so much but are able to focus on chunks of navigation information. The divider function may also be useful.

The range of products in your site is such that it may be a challenge to make rational groupings, but that's where I would start working.

04 Mar 2008, 18:20
#185
7inter avatar

7inter

New Zenner

Join Date:
Mar 2005
Posts:
24
Plugin Contributions:
0

Re: Categories Dressing

Hi, I've installed categories dressing mod and for me it's great! But when I use a wide screen in the categories I can see a lines in different colour in cream in the end of each category button and subcategory as well.
Have any idea on how to solve this?
Thank you for reading my terrible english!

04 Mar 2008, 18:35
#186
gjh42 avatar

gjh42

Black Belt

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

Re: Categories Dressing

Can you give a link to see the problem?

04 Mar 2008, 22:56
#187
tinman0650 avatar

tinman0650

New Zenner

Join Date:
Dec 2007
Location:
Atlanta, Georgia
Posts:
23
Plugin Contributions:
0

Re: Categories Dressing

I have looked and overlooked but can't find how to remove (hide) the category test from the sidebox when no image is available. I put the categories in question in a center table as images with links to make the main page look more uniform. I want to be able to hide the text from the right sidebox.

Well-Grounded Kids

Thanks in advance for your advice.

tin

05 Mar 2008, 14:14
#188
tinman0650 avatar

tinman0650

New Zenner

Join Date:
Dec 2007
Location:
Atlanta, Georgia
Posts:
23
Plugin Contributions:
0

Re: Categories Dressing

Tinman0650:

how to remove (hide) the category test from the sidebox when no image is available.
tin

Sorry, the word test should have been TEXT.

Thanks,
tin

05 Mar 2008, 19:13
#189
gjh42 avatar

gjh42

Black Belt

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

Re: Categories Dressing

Find this near the top of your tpl_categories.php:```php
$current_path = str_replace("cPath=","",$box_categories_array[$i]['path']);
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 {


$current_path == 15 or $current_path == 16 or 

to get:```php
	$current_path = str_replace("cPath=","",$box_categories_array[$i]['path']);
    if ($current_path == 15 or $current_path == 16 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 {
```This will skip those categories in the sidebox output.

You may need to add a bit of code to hide subcategories of those top cats. If this is the case, one thing that may work correctly is to use (int)$current_path in place of $current_path.
If that does not do the right job, there is another method thai I know will work.
05 Mar 2008, 19:41
#190
tinman0650 avatar

tinman0650

New Zenner

Join Date:
Dec 2007
Location:
Atlanta, Georgia
Posts:
23
Plugin Contributions:
0

Re: Categories Dressing

Glenn you are a giant and a genius. It worked perfectly! I have been racking my tiny brain for a couple days over this. Your categories dressing contrib is the best.

Thank you,

tin

06 Mar 2008, 04:45
#191
candylea avatar

candylea

New Zenner

Join Date:
Jun 2007
Posts:
54
Plugin Contributions:
0

Re: Categories Dressing

I think this is the mod I'm looking for but have no idea how to get it to work for me.

If anyone could help greatly thankful, What I would like it to do is I have 3 catergories and I would like each caterory with it's own heading as a image and then the list of products under it. Like each catergory has it's own side box.

Is is the mod I need and how would I do It.

06 Mar 2008, 15:40
#192
gjh42 avatar

gjh42

Black Belt

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

Re: Categories Dressing

Categories Dressing does not deal with the products, only the category/subcategory list. You would need something like the Expanded Category Tree mod which displays all categories, subs and products, and then apply some of the Categories Dressing code to that mod's tpl_ file.

08 Mar 2008, 10:02
#193
candylea avatar

candylea

New Zenner

Join Date:
Jun 2007
Posts:
54
Plugin Contributions:
0

Re: Categories Dressing

Thank you I'll give it a go

11 Mar 2008, 17:24
#194
tinman0650 avatar

tinman0650

New Zenner

Join Date:
Dec 2007
Location:
Atlanta, Georgia
Posts:
23
Plugin Contributions:
0

Re: Categories Dressing

Glenn, with your infinite wisdom would you show me how to hide a categorie from the Nav Categories Tab? I am assuming this is the correct file to edit: includes/templates/your_template/templates/tpl_modules_categories_tabs.php
hide $current_path == 16 from the navcattabs?
Thanks,
tin

11 Mar 2008, 18:47
#195
gjh42 avatar

gjh42

Black Belt

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

Re: Categories Dressing

That file would be difficult to modify to single out one category for hiding. A better place would be /includes/modules/your_template/categories_tabs.php, where the output is built. Find this:```php
$links_list = array();
while (!$categories_tab->EOF) {

// currently selected category
if ((int)$cPath == $categories_tab->fields['categories_id']) {
$new_style = 'category-top';
$categories_tab_current = '<span class="category-subs-selected">' . $categories_tab->fields['categories_name'] . '</span>';
} else {
$new_style = 'category-top';
$categories_tab_current = $categories_tab->fields['categories_name'];
}

// create link to top level category
$links_list[] = '<a class="' . $new_style . '" href="' . zen_href_link(FILENAME_DEFAULT, 'cPath=' . (int)$categories_tab->fields['categories_id']) . '">' . $categories_tab_current . '</a> ';
$categories_tab->MoveNext();
}

and add a test to get this:
```php
$links_list = array();
while (!$categories_tab->EOF) {
  if ((int)$cPath != 16) {//skip cat id 16
  // currently selected category
  if ((int)$cPath == $categories_tab->fields['categories_id']) {
    $new_style = 'category-top';
    $categories_tab_current = '<span class="category-subs-selected">' . $categories_tab->fields['categories_name'] . '</span>';
  } else {
    $new_style = 'category-top';
    $categories_tab_current = $categories_tab->fields['categories_name'];
  }

  // create link to top level category
  $links_list[] = '<a class="' . $new_style . '" href="' . zen_href_link(FILENAME_DEFAULT, 'cPath=' . (int)$categories_tab->fields['categories_id']) . '">' . $categories_tab_current . '</a> ';
  }//skip cat id 16
  $categories_tab->MoveNext();
}

I haven't tested this and can't guarantee it will be free from oddities, but I think it will work ok.

11 Mar 2008, 19:23
#196
tinman0650 avatar

tinman0650

New Zenner

Join Date:
Dec 2007
Location:
Atlanta, Georgia
Posts:
23
Plugin Contributions:
0

Re: Categories Dressing

Glenn, I made the changes but no effect. I tried adding } here and there but just ending up not seeing anything on the page. Set it back to the mod above. cpath 16 still there.

Any other options you can think of?

Thanks,
tin

11 Mar 2008, 19:55
#197
gjh42 avatar

gjh42

Black Belt

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

Re: Categories Dressing

I was testing the wrong variable. This will work:```php
$links_list = array();
while (!$categories_tab->EOF) {
if ($categories_tab->fields['categories_id'] != 16) {//skip cat id 16
// currently selected category
if ((int)$cPath == $categories_tab->fields['categories_id']) {
$new_style = 'category-top';
$categories_tab_current = '<span class="category-subs-selected">' . $categories_tab->fields['categories_name'] . '</span>';
} else {
$new_style = 'category-top';
$categories_tab_current = $categories_tab->fields['categories_name'];
}

// create link to top level category
$links_list[] = '<a class="' . $new_style . '" href="' . zen_href_link(FILENAME_DEFAULT, 'cPath=' . (int)$categories_tab->fields['categories_id']) . '">' . $categories_tab_current . '</a> ';
}//skip cat id 16
$categories_tab->MoveNext();
}

11 Mar 2008, 20:42
#198
tinman0650 avatar

tinman0650

New Zenner

Join Date:
Dec 2007
Location:
Atlanta, Georgia
Posts:
23
Plugin Contributions:
0

Re: Categories Dressing

Brilliant! Again!
Thank you Glenn!
Your humble follower,
tin

16 Mar 2008, 13:07
#199
zafer avatar

zafer

New Zenner

Join Date:
Jan 2008
Posts:
50
Plugin Contributions:
0

Re: Categories Dressing

I am fairly new and setting up a site;
https://www.pillownpillows.com
I have a questions in the sent up:

My expanded categories skips 2 lines for each product when I dress categories

reply:

Specifically, when using display: block; or display: list-item;, the <br /> after each category link needs to be deleted. Compare the tpl_categories.php file and the expanded tpl_ file to see the difference in that spot (marked by $disp_block in tpl_categories.php).

I could not locate expanded tpl_ file
there is only : tpl_category_list_box.php

which does contain display: block; or display: list-item;

Please advise
thank you

16 Mar 2008, 16:49
#200
gjh42 avatar

gjh42

Black Belt

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

Re: Categories Dressing

tpl_category_list_box.php will be the tpl file for the expanded categories mod you are using. The file that Categories Dressing uploads when you install it is tpl_categories.php.

You will need to compare the two files and, where tpl_categories.php has $disp_block and tpl_category_list_box.php has <br />, delete the <br />. There will be several of these.

display: block; or display: list-item;
will not be in the php files; they are in the stylesheet (stylesheet_categories_dressing.css if you have uploaded it correctly).
You have put two declarations from stylesheet_categories_dressing.css into your main stylesheet and modified them to fit the stock class tags, which is fine. If the list-item markers are all you want, you only need to delete the <br /> tags as noted above. Test after each deletion to make sure you are not removing a necessary line break (you will not want to remove the <br /> tags after the specials/featured/new/all links.)

You also need to upload either the bullet1.gif and similar images that came with Cat Dressing, or your own marker images, unless you want to use the default disc markers.