Zen Cart Logo
Forums / All Other Contributions/Addons / betterCategories mod

betterCategories mod

Locked

Views: 5,280

Results 1 to 17 of 17
This thread is locked. New replies are disabled.
10 May 2006, 5:26 AM
#1
stbede77 avatar

stbede77

Zen Follower

Join Date:
Apr 2006
Posts:
124
Plugin Contributions:
0

betterCategories mod

I have installed the betterCategories mod and it works great but for the last week or two I have tried time and time again to also apply this mod to the information box... Now I don't know about any of you but what is the point to make only one box look real cool and the rest just so-so? XD well if any of you know how to configure this mod to include other boxes other then just the Categories box please let me know.

Thanks

10 May 2006, 9:04 AM
#2
stbede77 avatar

stbede77

Zen Follower

Join Date:
Apr 2006
Posts:
124
Plugin Contributions:
0

Re: betterCategories mod

okay well I sat down and told myself that I wouldn't get up unless I got this thing to work... well it almost works... all I need to do is get rid of the stupid indent and it should be good to go... here is what I have as of right now... if you see anything wrong (I'm sure there is) please let me know!

Thanks...

This code is in the tpl_information file... remember I have installed the betterCategories mod already.

<?php $content = ''; for ($i=0;$i<sizeof($information);$i++) { switch(true) { case ($information[$i]['top'] == 'true'): $new_style = 'category-top'; break; case ($information[$i]['has_sub_cat']): $new_style = 'category-subs'; break; default: $new_style = 'category-products'; } if (zen_get_product_types_to_category($information[$i]['path']) == '3' or ($information[$i]['top'] != 'true' and SHOW_CATEGORIES_SUBCATEGORIES_ALWAYS != 1)) { // skip it this is for the document box } else { $content .= '<a class="' . $new_style . '" href="' . zen_href_link(FILENAME_DEFAULT, $information[$i]) . '"><div class="betterCategories">'; if ($information[$i]['current']) { if ($information[$i]['has_sub_cat']) { $content .= '<span class="category-subs-parent">'; $content .= info_with_pointer($information[$i], 'down'); $content .= '</span>'; } else { $content .= '<span class="category-subs-selected">'; $content .= info_with_pointer($information[$i], 'nosub'); $content .= '</span>'; } } else { if ($information[$i]['has_sub_cat']) { $content .= info_with_pointer($information[$i], 'right'); } else { $content .= info_with_pointer($information[$i], 'nosub'); } } if ($information[$i]['has_sub_cat']) { $content .= CATEGORIES_SEPARATOR; } //$content .= '</a>'; $content .= '</div></a>'; } } //this is the function that inserts the 'pointer' (or 'disclosure triangle') //before the name of the category, in the 'Categories' sidebox. //$categoryName should be a string as contained in //$box_categories_array[$i]['name'] above, which already includes //the category name with all the necessary subcategory indents up front, //as specified by the user in the Admin Panel. //$categoryType will be either 'down', 'right' or 'nosub', which //specifies which picture appears next to the category name: function info_with_pointer( $categoryName, $categoryType) { //picking the appropriate pointer image: switch ($categoryType) { case "down": $pointer = zen_image(DIR_WS_TEMPLATE_IMAGES . '/cat_pointer_down.gif'); break; case "right": $pointer = zen_image(DIR_WS_TEMPLATE_IMAGES . '/cat_pointer_right.gif'); break; default: $pointer = zen_image(DIR_WS_TEMPLATE_IMAGES . '/cat_no_sub.gif'); } $pointer .= $categoryName; return $pointer; } ?>
10 May 2006, 8:23 PM
#3
stbede77 avatar

stbede77

Zen Follower

Join Date:
Apr 2006
Posts:
124
Plugin Contributions:
0

Re: betterCategories mod

Well after trying to fix this stupid code for a couple hours and searching the forums I found someone that had a better categories mod fix... I have attached it to this post in hopes that it will help anyone else out there trying to get their categories and information boxes looking the same.

15 Jun 2006, 6:48 PM
#4
pivey avatar

pivey

Zen Follower

Join Date:
Mar 2006
Posts:
192
Plugin Contributions:
0

Re: betterCategories mod

Thank you for this fix.

The only thing I really don't like about this mod is the author's warning:

This mod may spoil your entire site. It may irreparably damage every file in your server, cause your server and personal computers to explode, resulting in severe physical damage and ample loss of property to you and your loved ones. You agree to use it at your own risk, and take full responsibility for any and all consequences. Absolutely no one should attempt to install these files in their server without having done a complete back up of all of their server assets
Is it really that dangerous?

22 Jun 2006, 1:02 PM
#5
designbydemeter avatar

designbydemeter

Zen Follower

Join Date:
Jun 2006
Location:
Taos,NM
Posts:
225
Plugin Contributions:
0

Re: betterCategories mod

stbede77:

Well after trying to fix this stupid code for a couple hours and searching the forums I found someone that had a better categories mod fix... I have attached it to this post in hopes that it will help anyone else out there trying to get their categories and information boxes looking the same.

I'd like to see what its done to enhance your site - URL?

~Laura

28 May 2008, 7:45 PM
#6
harry2cool avatar

harry2cool

Zen Follower

Join Date:
Oct 2005
Posts:
280
Plugin Contributions:
0

Re: betterCategories mod

I have better categores on my site which is recently upgraded to 1.3.8a,

I want to increase the font size of the Category text, yes I have installed better categories,

I do not find where I can do this,

some help will be appreciated.

28 May 2008, 8:28 PM
#7
gjh42 avatar

gjh42

Black Belt

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

Re: betterCategories mod

A link to your site will make it easier to help...

12 Jan 2009, 7:37 PM
#8
nikki72 avatar

nikki72

New Zenner

Join Date:
Dec 2008
Posts:
97
Plugin Contributions:
0

Re: betterCategories mod

I have no complaints, seems to work great for me....

I just would like to know how to remove/change the small pictures on the left side of the info box.

THX

12 Jan 2009, 8:08 PM
#9
gjh42 avatar

gjh42

Black Belt

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

Re: betterCategories mod

Again, a link to your site will make it easier to help, especially as this is not stock Zen Cart function but an installed mod.

12 Jan 2009, 9:01 PM
#11
gjh42 avatar

gjh42

Black Belt

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

Re: betterCategories mod

The quick fix is to add to your betterCategories stylesheet:

.betterInformation a img {display: none;}

The fundamental fix will require editing the mod version of the template file, or possibly the module file - can't say for sure without looking at actual copies of the PHP files.

31 Jan 2009, 12:34 AM
#12
nikki72 avatar

nikki72

New Zenner

Join Date:
Dec 2008
Posts:
97
Plugin Contributions:
0

Re: betterCategories mod

hello, my categories box has a right margin before the better categories begins. Could you please tell me where to fix it?
Thanks

http://www.2antioch.org/store/index.php

31 Jan 2009, 1:42 AM
#13
gjh42 avatar

gjh42

Black Belt

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

Re: betterCategories mod

Find in your main stylesheet.css```
#categoriesContent, #documentcategoriesContent {
text-align:left;
padding-left:10px;
}

31 Jan 2009, 1:54 AM
#14
nikki72 avatar

nikki72

New Zenner

Join Date:
Dec 2008
Posts:
97
Plugin Contributions:
0

Re: betterCategories mod

wow, I looked over an hour........ or so trying to figure that out lol. worked like a charm ty!

5 Jun 2009, 8:14 PM
#15
toniscraparoni avatar

toniscraparoni

Zen Follower

Join Date:
Apr 2009
Posts:
158
Plugin Contributions:
0

Re: betterCategories mod

Hi, Glenn!

Hoping you can help me with a slight change to the tpl_categories code using betterCategories. I'm trying to have my top level categories, whether containing subcategories or not, use the same uniform pointer image, while the subcategories display a smaller pointer image.

Considering I know nada about PHP, I'm quite proud of myself for getting 90% of the way there. Hehe! I added the new subcat pointer to my image directory, defined its case and assigned it to the [seemingly] appropriate place in the existing code. Everything displays perfectly . . . except the top level categories without subs display with the smaller subcategory pointer.

I've spent countless hours trying to insert what seems to be "the missing link" to isolate the top level categories and/or find it somewhere, but I can't seem to hit it no matter how hard I try, even when using the same arrays and classes. Adding a span to isolate the subcategories didn't work either.

Help! LOL! And thank you!! :)

7 Jun 2009, 12:18 PM
#16
gjh42 avatar

gjh42

Black Belt

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

Re: betterCategories mod

You really need to ask the author of the BetterCategories mod (gilby), as I am not familiar with the mod's coding.

7 Jun 2009, 3:49 PM
#17
toniscraparoni avatar

toniscraparoni

Zen Follower

Join Date:
Apr 2009
Posts:
158
Plugin Contributions:
0

Re: betterCategories mod

Okay, then, will do. Thanks.