Jump to content
Sign in to follow this  
Nils P.

[contribution] CategoryBoxEnhancement_v1.0 for 2.2 MS2

Recommended Posts

Hi all,

 

this is my first contribution. It's small, but I like it and I believe it's useful, and it's my first "thank you" to the osC community.

 

What it does can be seen on this screenshot:

http://www.leer.privat.t-online.de/pics/CatBoxEnh.gif

 

 

Taken from my readme:

 

This contribution is supposed to improve the look and feel of the categories box, improve navigation and help users to keep their bearings on the site.

 

1. It will add a small image as "bullet" to the left of every category in the category box. There are two different images, one for categories that have subcategories, one for those that don't.

 

2. It will get rid of the funny-looking ASCII-arrow ( -> ) that used to indicate categories containing subcategories.

 

3. It will highlight the current category in the box. User will have an easier time telling where they are on the site.

 

Oh, here it is:

http://www.oscommerce.com/community/contributions,1480

 

Questions, comments, suggestions, critizism, welcome in this thread.

 

Greetings,

Nils

Share this post


Link to post
Share on other sites

Yeah..

 

Nice contriubtion. I think there is one out there like this already, nevertheless its awsome. I'll use your cuz its made for MS2.2

 

:)

 

thanks

 

good job

Share this post


Link to post
Share on other sites

I've just uploaded a new version of my contribution Category Box Enhancement 1.1.

 

http://www.oscommerce.com/community/contributions,1480

 

Here's what's new:

 

- Arrows/bullets are now clickable

 

- Colored highlighting of current category will now work if a product is not selected via categories, but via 'specials', 'What's new', 'Bestsellers' etc.

 

- Slightly changed arrow images

 

- Added readme file in German

 

 

I recommend using this new version. Thanks to all who mailed me with feedback.

If you do upgrade, make sure you follow the instructions in the readme file (i.e. don't forget to overwrite the existing arrow images! :wink: )

 

Nils

 

Questions, comments, suggestions, critizism, is still welcome in this thread.

Share this post


Link to post
Share on other sites

hehe Hi guys

 

Im totally new to osCommerce .. I just came across few days ago and I fell in love with this awsome software.. I used to be sysop back in the BBS days use to run WWIV and it was kind of like this.. meaning bunch of people get together and hack the code.. I Love it..

 

Thanks all the people who contribute to this project....

 

Anyways I finally installed my first modification Category Box Enhancement 1.1. It works as promised ..Thank u Nils P... For a newbee this was pretty easy.

 

I have just one question Mam/Sir .. How do you change the collor.. From red I want to go to dark blue. I've looked but I couldnt understand were it was.. Any help would be greatly apreciated.

 

Nice to meat all you who help this fine project. God Speed :D And Much Thanks again. Im a beliver in open source, this just came a another reason.

Share this post


Link to post
Share on other sites
I have just one question Mam/Sir .. How do you change the collor.. From red I want to go to dark blue. I've looked but I couldnt understand were it was..

Um... Sir, in my case :wink: ...

OK, here's how to change the highlighting color:

open file catalog/stylesheet.css, search for this entry:

SPAN.errorText {

 font-family: Verdana, Arial, sans-serif;

 color: #ff0000;

}

and change the color value to a blue color, like for instance

  color: #223399;

...or to any other color you wish to. Thats all...

 

Nils

Share this post


Link to post
Share on other sites

Excellent! This contribution - mod works just as discribed. Now this is the way mods should work.

 

Rating ***** stars

Share this post


Link to post
Share on other sites

Thanks everybody, but remember I'm still a n00b at this :wink:

 

And that's why...(drumroll)... my contrib needs a hotfix:

In case a shop has caching activated (which they should, AFAIK), the highlighting of the current category won't work. It seems nobody noticed this, which is good. Hm- maybe it's not. Anyway, do this:

 

open file catalog/includes/functions/cache.php

search for function tep_cache_categories_box

add this to the function's globals: $cat_name

 

so that the first two lines of the function will look like this:

    function tep_cache_categories_box($auto_expire = false, $refresh = false) {

   global $cPath, $language, $languages_id, $tree, $cPath_array, $categories_string, $cat_name;

That should do the trick. You might have to empty the chache directory though to see an effect. This fix will be integrated into the next version of this contribution. Yes, I know I sound like Micro$oft now. Until then, I'll add it to the contrib download section anyway.

 

I'll be back...

Nils

Share this post


Link to post
Share on other sites
I added it to the CBE contribution, I hope that is ok.

Sure it is, that's the way it's supposed to be! I don't have the BTS contribution installed nor do I know much about it, but actually I was thinking about adding some packages that will make my contrib work with major existing contributions myself (in cases where it doesn't already do that). Stuff like "Show all products" etc.

 

So, thanks for your addition,

 

Nils

Share this post


Link to post
Share on other sites

The number of sub-category levels. I would like to limit it to 3 levels in the category box and then the 4th. level appears on the main box because there are just too many sub items.

 

Thanks.

Share this post


Link to post
Share on other sites

Yes, actually I think I know how to do that. I don't think it would fit with my contribution very well though, as part of the idea is to always let customers know where they are on the site by highlighting the current category in the box, and if that category name isn't there, I believe it can lead to a lot of confusion.

 

Anyways, here's what you do:

 

In categories.php, find this:

global $tree, $categories_string, $cPath_array, $cat_name; (about line 20)

 

and add this right beneath it:

if ($tree[$counter]['level']<3)

{

Then find this: $categories_string .= '<br>'; (about line 65)

...and simply add this right beneath it:

}

 

...that should only display three level of categories. You could change that number by replacing the "<3" with any other number, e.g. 1 will only display top level categories. Did I mention I don't really like it? :wink:

 

Nils

Share this post


Link to post
Share on other sites

Great contrib have had it going on other site no problem, but I am having a small problem here, hope you can help.

 

I have the Category Box Enhancement v1.1, but I have also had to include the Graphical Infoboxes Contrib which has required a lot of categories.php changes, this was to get both working together.

 

What seems to be happening is the the sub-cats all appear at the base of the box?

Testing

I have no clue to sort this out, as my knowledge of osc and php is but a few days old.

Thx in advance.


Always seeking & Desperate to find a solution!

Share this post


Link to post
Share on other sites

j0ker,

Graphical Infoboxes is a MS1 contribution as far as I know, and your shop is MS1 too isn't it. What you'd need to get Category Box Enhancement (which is for MS2) working is a rewrite of your categories.php that will fit your shop. It's more than just changing a line here and there, sorry I have no better news.

Nils

Share this post


Link to post
Share on other sites

Sorry Nils, I didnt put osc version last post but I am using oSc2.2MS2.

 

Great to see a fast reply on a forum pld m8y :D


Always seeking & Desperate to find a solution!

Share this post


Link to post
Share on other sites

Oh poo sorry have to read slower, this is the header from the contrib.

 

osCommerce 2.2 Graphical Inforboxes


Always seeking & Desperate to find a solution!

Share this post


Link to post
Share on other sites

OK Elwyn, I just looked at that contrib, at least the categories.php (dated 2002/11/12) is still for a version prior to MS2, maybe 2.2 CVS2. So either your shop version is older than you think it is, or someone rewrote your Graphical Inforboxes contribution to match MS2.

Anyway it's as I said, you need a rewrite of your own categories.php if you want both contribs working with each other.

 

Nils

Share this post


Link to post
Share on other sites

Thx Nils for the reply. I have looked at the contrib I dont now if it is a hacked version of the original just a date submitted 7/23/03 I have included a link below its probably the one you where looking at:

Contribution Table.Header2.2


Always seeking & Desperate to find a solution!

Share this post


Link to post
Share on other sites

Nils I have also just checked the cat.php and I also confirm that it is what you said, excuse my ignorance I am very new to osc and php.

/*

$Id: categories.php,v 1.23 2002/11/12 14:09:30 dgw_ Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2002 osCommerce

 

Released under the GNU General Public License

*/

Thx for your help, but is there no solution to this problem.


Always seeking & Desperate to find a solution!

Share this post


Link to post
Share on other sites

Hi, I installed the Catagory Box Enhancment Contrib from Sir Nils to the older version of OSC and all is working great...Good on the Germans :)

 

But I would appreciate some ideas on how to accomplish this:

 

I would like to change the font of the Top Catagories (ie the catagories with the solid arrow) to 12 point font.

 

And keep the Sub Catagories (ie the catagories with the light arrow) at 10 point font.

 

I don't think that these catagories fonts are in stylesheet I treid to change some and I made changes to other info boxes but not catagories. I would probably have to add a code? Could someone help me with what to add and where to add if it is not very difficult!?

 

Thanks a bunch, Alyss

Share this post


Link to post
Share on other sites

May I ask if we can use this contribution in MS1?

 

Or how can we modify so that we can use this in MS1? Thanks. :)


Best regards,

 

Elmo

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×