Nils P. Posted August 25, 2003 Share Posted August 25, 2003 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 Quote My wee Contribs: Include Subcats | Shopping Cart Box | Category Box Link to comment Share on other sites More sharing options...
aboyz Posted August 25, 2003 Share Posted August 25, 2003 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 Quote Link to comment Share on other sites More sharing options...
Nils P. Posted August 29, 2003 Author Share Posted August 29, 2003 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. Quote My wee Contribs: Include Subcats | Shopping Cart Box | Category Box Link to comment Share on other sites More sharing options...
shoonik Posted August 30, 2003 Share Posted August 30, 2003 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. Quote Link to comment Share on other sites More sharing options...
Nils P. Posted August 30, 2003 Author Share Posted August 30, 2003 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 Quote My wee Contribs: Include Subcats | Shopping Cart Box | Category Box Link to comment Share on other sites More sharing options...
shoonik Posted August 30, 2003 Share Posted August 30, 2003 Thanks Bud Worked like a charm.. didnt even had to change the collor that you picked.. :D Thank you Quote Link to comment Share on other sites More sharing options...
hazer1 Posted August 30, 2003 Share Posted August 30, 2003 Excellent! This contribution - mod works just as discribed. Now this is the way mods should work. Rating ***** stars Quote Link to comment Share on other sites More sharing options...
Nils P. Posted September 2, 2003 Author Share Posted September 2, 2003 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 Quote My wee Contribs: Include Subcats | Shopping Cart Box | Category Box Link to comment Share on other sites More sharing options...
paulm2003 Posted September 2, 2003 Share Posted September 2, 2003 I made some small changes to make this beautifull contribution work together with the BTS ( http://www.oscommerce.com/community/contributions,1263 ). I added it to the CBE contribution, I hope that is ok. Please tell me if I'm wrong it's my first upload. :?: Thanks Nils, for the contribution and the support! 8) Quote Link to comment Share on other sites More sharing options...
Nils P. Posted September 3, 2003 Author Share Posted September 3, 2003 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 Quote My wee Contribs: Include Subcats | Shopping Cart Box | Category Box Link to comment Share on other sites More sharing options...
powder Posted September 12, 2003 Share Posted September 12, 2003 Is it possible to limit the number of sub-categories appearing in the category box? Appreciate any advise. :roll: Quote Link to comment Share on other sites More sharing options...
Nils P. Posted September 12, 2003 Author Share Posted September 12, 2003 Is it possible to limit the number of sub-categories appearing in the category box? Appreciate any advise. Do you mean the number of sub-category levels in the category tree or the total number of sub-categorie that one parent-category can have? Nils Quote My wee Contribs: Include Subcats | Shopping Cart Box | Category Box Link to comment Share on other sites More sharing options...
powder Posted September 12, 2003 Share Posted September 12, 2003 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. Quote Link to comment Share on other sites More sharing options...
Nils P. Posted September 13, 2003 Author Share Posted September 13, 2003 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 Quote My wee Contribs: Include Subcats | Shopping Cart Box | Category Box Link to comment Share on other sites More sharing options...
powder Posted September 13, 2003 Share Posted September 13, 2003 It works beautifully!! Thank you. :D Take a look... http://www.tonerstation.com/catalog/index....cPath=24_30_434 All those categories used to be listed in the category box. Looks better now. BTW, do you know if I could align those 3 categories column to the left instead of the default center? Thanks again. Quote Link to comment Share on other sites More sharing options...
Nils P. Posted September 14, 2003 Author Share Posted September 14, 2003 Good to see it works - you're right, for that kind of shop with that many categories this hack does make sense. Aligning is somewhere in the index.php, IIRC. Quote My wee Contribs: Include Subcats | Shopping Cart Box | Category Box Link to comment Share on other sites More sharing options...
Guest Posted September 20, 2003 Share Posted September 20, 2003 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. Quote Link to comment Share on other sites More sharing options...
Nils P. Posted September 20, 2003 Author Share Posted September 20, 2003 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 Quote My wee Contribs: Include Subcats | Shopping Cart Box | Category Box Link to comment Share on other sites More sharing options...
Guest Posted September 20, 2003 Share Posted September 20, 2003 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 Quote Link to comment Share on other sites More sharing options...
Guest Posted September 20, 2003 Share Posted September 20, 2003 Oh poo sorry have to read slower, this is the header from the contrib. osCommerce 2.2 Graphical Inforboxes Quote Link to comment Share on other sites More sharing options...
Nils P. Posted September 20, 2003 Author Share Posted September 20, 2003 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 Quote My wee Contribs: Include Subcats | Shopping Cart Box | Category Box Link to comment Share on other sites More sharing options...
Guest Posted September 20, 2003 Share Posted September 20, 2003 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 Quote Link to comment Share on other sites More sharing options...
Guest Posted September 20, 2003 Share Posted September 20, 2003 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. Quote Link to comment Share on other sites More sharing options...
fred_nystrom Posted October 28, 2003 Share Posted October 28, 2003 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 Quote Link to comment Share on other sites More sharing options...
Elmo Posted November 20, 2003 Share Posted November 20, 2003 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. :) Quote Best regards, Elmo Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.