Forums / Addon Sideboxes / Categories Dressing

Categories Dressing

Views: 532,557

Results 121 to 140 of 2,268
15 Nov 2007, 9:15 PM
#121
countingsheep avatar

countingsheep

Zen Follower

Join Date:
Sep 2006
Posts:
154
Plugin Contributions:
0

Categories Dressing

Please accept my huge thank you! :clap: You saved me hours of searching! I am learning, slowly!! :unsure:
I have a few tweaks to do and I think I am set to have products added!
Off to search for instructions on those! :)

19 Nov 2007, 3:36 AM
#122
boggled avatar

boggled

Zen Follower

Join Date:
Mar 2006
Location:
Tennessee
Posts:
286
Plugin Contributions:
0

Re: Categories Dressing

This may have been asked and answered, if so, I do apologize, but I've gone thru the whole thread and can't find the answer to my problem.

I'm having trouble positioning my Non-Linked Headings.

I want a Non-Linked Heading to be the first thing in my category menu. My first top category is cpath 4. When I put cpath 4 in the code, the heading is showing up BELOW my top category instead of above it.

You can see what it's doing here: https://www.nybwholesale.com
The Xelement Men's Boots should be under the Heading Motorcycle Boots.

What am I doing wrong? :frusty:

Thanks!

I'll finish that project tomorrow, I've made enough mistakes today!

19 Nov 2007, 4:10 AM
#123
gjh42 avatar

gjh42

Black Belt

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

Re: Categories Dressing

Very strange. I don't see a cause for this. I do notice that Men's Boots is not the first category; category 15, which has no name, comes first. It shows as a sliver of space above Men's Boots.

Can you paste the section of tpl_categories.php for say 10 lines above and below your header code? Use ```
[php] and [/php]

19 Nov 2007, 4:25 AM
#124
boggled avatar

boggled

Zen Follower

Join Date:
Mar 2006
Location:
Tennessee
Posts:
286
Plugin Contributions:
0

Re: Categories Dressing

gjh42:

Very strange. I don't see a cause for this. I do notice that Men's Boots is not the first category; category 15, which has no name, comes first. It shows as a sliver of space above Men's Boots.

Can you paste the section of tpl_categories.php for say 10 lines above and below your header code? Use ```
[php] and [/php]



Thanks for checking it Glenn!

No Men's Boots is not the first category.  It was originally a subcategory I moved up.  Would that make a difference?  The #1 category was the original top category Motorcycle Biker Boots.  It's still there, just turned off.

The Boots are categories 4 (Men's) & 5 (Ladies).
I just installed this mod on another site and it did the same thing, but luckily on it, there was a category above it so it still worked.

Here is my code lines 80 - 129:

```php
      if (SHOW_COUNTS == 'true') {
        if ((CATEGORIES_COUNT_ZERO == '1' and $box_categories_array[$i]['count'] == 0) or $box_categories_array[$i]['count'] >= 1) {
          $content .= CATEGORIES_COUNT_PREFIX . $box_categories_array[$i]['count'] . CATEGORIES_COUNT_SUFFIX;
        }
      }

      $content .= $disp_block . "\n";

      // categories dressing - add subtext below a cat
	  switch ($current_path) {
	  case '23': //replace number with your desired cPath
        $content .= '<span class="catBoxSubtext">Subtext for cat 23 escape apostrophe\'s</span>' . $disp_block . "\n"; 
	  break;
	  } // subtext
    }
	

      // categories dressing - add (divider and) heading above a cat
      $disp_block_head = '';
      //$disp_block_head = '<br />';  // for heading not block uncomment this line
      switch (str_replace("cPath=","",$box_categories_array[$i]['path'])) {
      case '4': //replace number with your desired cPath
        //$content .= '<hr class="catBoxDivider" />' . "\n";  // to add divider uncomment this line
        $content .= '<span class="catBoxHeading1">' . (file_exists(DIR_WS_TEMPLATE_IMAGES . 'cathead' . $current_path . '.gif') ? zen_image(DIR_WS_TEMPLATE_IMAGES . 'cathead' . $current_path . '.gif') . '</span>':'Motorcycle Boots</span>' . $disp_block_head) . "\n"; 
      break;
      } 
	  
	        // categories dressing - add (divider and) heading above a cat
      $disp_block_head = '';
      //$disp_block_head = '<br />';  // for heading not block uncomment this line
      switch (str_replace("cPath=","",$box_categories_array[$i]['path'])) {
      case '5': //replace number with your desired cPath
        //$content .= '<hr class="catBoxDivider" />' . "\n";  // to add divider uncomment this line
        $content .= '<span class="catBoxHeading1">' . (file_exists(DIR_WS_TEMPLATE_IMAGES . 'cathead' . $current_path . '.gif') ? zen_image(DIR_WS_TEMPLATE_IMAGES . 'cathead' . $current_path . '.gif') . '</span>':'Motorcycle Gear</span>' . $disp_block_head) . "\n"; 
      break;
      }  
  }

  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";
    }
    if (SHOW_CATEGORIES_BOX_SPECIALS == 'true') {
      //$content .= '<span class="catBoxHeading1">' . (file_exists(DIR_WS_TEMPLATE_IMAGES . 'cathead-specials.gif') ? zen_image(DIR_WS_TEMPLATE_IMAGES . 'cathead-specials.gif') . '</span>':'Link Heading</span>' . $disp_block_head) . "\n";// categories dressing - uncomment this line for heading above link 
      $show_this = $db->Execute("select s.products_id from " . TABLE_SPECIALS . " s where s.status= 1 limit 1");
      if ($show_this->RecordCount() > 0) {
        $content .= '<a class="category-links" href="' . zen_href_link(FILENAME_SPECIALS) . '">' . CATEGORIES_BOX_HEADING_SPECIALS . '</a>' . $disp_block . "\n";
      }
    }

The #15 and 16 categories you saw with no names, I had just added and my ISP timed out before they were saved. LOL Sorry about that.

I'll finish that project tomorrow, I've made enough mistakes today!

19 Nov 2007, 5:28 AM
#125
gjh42 avatar

gjh42

Black Belt

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

Re: Categories Dressing

You have duplicated the whole switch block; what you should have duplicated is just the case block:```php
// categories dressing - add (divider and) heading above a cat
$disp_block_head = '';
//$disp_block_head = '<br />'; // for heading not block uncomment this line
switch (str_replace("cPath=","",$box_categories_array[$i]['path'])) {
case '4': //replace number with your desired cPath
//$content .= '<hr class="catBoxDivider" />' . "\n"; // to add divider uncomment this line
$content .= '<span class="catBoxHeading1">' . (file_exists(DIR_WS_TEMPLATE_IMAGES . 'cathead' . $current_path . '.gif') ? zen_image(DIR_WS_TEMPLATE_IMAGES . 'cathead' . $current_path . '.gif') . '</span>':'Motorcycle Boots</span>' . $disp_block_head) . "\n";
break;

  case '5': //replace number with your desired cPath
    //$content .= '<hr class="catBoxDivider" />' . "\n";  // to add divider uncomment this line
    $content .= '<span class="catBoxHeading1">' . (file_exists(DIR_WS_TEMPLATE_IMAGES . 'cathead' . $current_path . '.gif') ? zen_image(DIR_WS_TEMPLATE_IMAGES . 'cathead' . $current_path . '.gif') . '</span>':'Motorcycle Gear</span>' . $disp_block_head) . "\n"; 
  break;
  }   

The positioning problem is caused by the location where you put your duplicates. They come after the category name in the code, so they will display after it.

You need to put that code block back up where it originally was.
19 Nov 2007, 6:07 PM
#126
birdoasis avatar

birdoasis

Inactive

Join Date:
Jun 2005
Location:
Cheney WA
Posts:
1,123
Plugin Contributions:
0

Re: Categories Dressing

Hey,

Where do I comment out the "Link Heading"? I want it to go away.

Thanks,

JP

John Patrick
A Zen Cart Advocate!

20 Nov 2007, 8:58 AM
#127
gjh42 avatar

gjh42

Black Belt

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

Re: Categories Dressing

Around line 130 in tpl_categories.php:```php
if (SHOW_CATEGORIES_BOX_PRODUCTS_ALL == 'true') {
/here/ $content .= '<span class="catBoxHeading1">' . (file_exists(DIR_WS_TEMPLATE_IMAGES . 'cathead-all.gif') ? zen_image(DIR_WS_TEMPLATE_IMAGES . 'cathead-all.gif') . '</span>':'Link Heading</span>' . $disp_block_head) . "\n";// categories dressing - uncomment this line for heading above link
$content .= '<a class="category-links" href="' . zen_href_link(FILENAME_PRODUCTS_ALL) . '">' . CATEGORIES_BOX_HEADING_PRODUCTS_ALL . '</a>' . "\n";
}

20 Nov 2007, 6:05 PM
#128
birdoasis avatar

birdoasis

Inactive

Join Date:
Jun 2005
Location:
Cheney WA
Posts:
1,123
Plugin Contributions:
0

Re: Categories Dressing

Thanks!

JP

John Patrick
A Zen Cart Advocate!

21 Nov 2007, 9:56 PM
#130
gjh42 avatar

gjh42

Black Belt

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

Re: Categories Dressing

No, flyout menus are a completely different kind of code. They would probably modify the same tpl_categories.php file, though, so it would be difficult to use them together.

There are a few flyout-type mods in Downloads. Look them over and see which one suits you best.

21 Nov 2007, 10:00 PM
#131
marksu avatar

marksu

Zen Follower

Join Date:
Nov 2007
Posts:
260
Plugin Contributions:
0

Re: Categories Dressing

gjh42:

No, flyout menus are a completely different kind of code. They would probably modify the same tpl_categories.php file, though, so it would be difficult to use them together.

There are a few flyout-type mods in Downloads. Look them over and see which one suits you best.

Thanks for the information. :smile:

29 Nov 2007, 1:54 AM
#132
relentless avatar

relentless

New Zenner

Join Date:
Sep 2007
Posts:
56
Plugin Contributions:
0

Re: Categories Dressing

I am using Category Dressing in column left
it works great, static headings.
Is there a way to use it in column right.

29 Nov 2007, 2:36 AM
#133
birdoasis avatar

birdoasis

Inactive

Join Date:
Jun 2005
Location:
Cheney WA
Posts:
1,123
Plugin Contributions:
0

Re: Categories Dressing

Yes,

In ToolsLayout Boxes

Change the categories box to the side you want. The category dressing should follow automatically.

John Patrick
A Zen Cart Advocate!

17 Dec 2007, 4:53 PM
#134
tacoma avatar

tacoma

Zen Follower

Join Date:
Dec 2007
Posts:
125
Plugin Contributions:
0

Re: Categories Dressing

I recently added Category Dressing and I have all of the sub categories listed below each main category. Once I added the CD mod it compressed the sub categories, so that now there are 2 categories listed next to each other rather than 1.

17 Dec 2007, 5:27 PM
#135
tacoma avatar

tacoma

Zen Follower

Join Date:
Dec 2007
Posts:
125
Plugin Contributions:
0

Re: Categories Dressing

Ok nevermind. I didn't have $disp_block = '<br />'; uncommented correctly.

17 Dec 2007, 6:10 PM
#136
tacoma avatar

tacoma

Zen Follower

Join Date:
Dec 2007
Posts:
125
Plugin Contributions:
0

Re: Categories Dressing

OK so new issue.

I have main categories as linked images. catimg1.gif, etc. This works great, but I can't get the hover img to work. I'd like them to change to another img on hover.

I tried working with hover code based off the background hover info, but no go.

Any tips?

17 Dec 2007, 9:18 PM
#137
gjh42 avatar

gjh42

Black Belt

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

Re: Categories Dressing

The hover function can only work if the base category images are also in the background. If the images are in the foreground, changing the background on hover will happen but will not be visible.

2 Jan 2008, 7:09 AM
#138
gjh42 avatar

gjh42

Black Belt

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

Re: Categories Dressing

Categories Dressing v2.1 is now available in Downloads.

Code changed to automatically adjust links to allow category count to operate with block text display, and minor cosmetic tweaks to code.

No changes were required for v1.3.8 compatibility.

9 Jan 2008, 10:49 PM
#139
e81ny avatar

e81ny

New Zenner

Join Date:
Feb 2007
Location:
New York
Posts:
88
Plugin Contributions:
0

Re: Categories Dressing

Can you tell me if Categories Dressing can keep the categories and sub-categories expended at all time?

How and where should I change?

Thanks in advance for your help!

10 Jan 2008, 2:24 AM
#140
gjh42 avatar

gjh42

Black Belt

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

Re: Categories Dressing

For that function you would use the Expanded Category List mod in Downloads. It is compatible with Categories Dressing, so you can still apply the modifications to the expanded list as normal.