willross Posted February 27, 2005 Share Posted February 27, 2005 This is the support thread for Great Categories: http://www.oscommerce.com/community/contributions,2802 Here are two sites that currently use this contribution: http://shoptoo.palaia.us/ http://shop.gwerx.com/ The first one also uses a mod_rewrite system that has greatly impacted it's SEO performance. Quote · willross ·········· Link to comment Share on other sites More sharing options...
radders Posted February 28, 2005 Share Posted February 28, 2005 Sorry I'm obviously a bit slow today. The bottom site seems to came a new approach to categores but the top site seemed the same as any other at first glance. Can you explain what this contribution does? I've read the description in the contributions section but I'm none the wiser. Quote Link to comment Share on other sites More sharing options...
dailce Posted February 28, 2005 Share Posted February 28, 2005 (edited) How can I modify this to include the products? CAT 1 CAT 2 CAT 3 CAT 4 Click on CAT 2 CAT 1 CAT 2 ->Product 1 ->Product 2 ->Product 3 CAT 3 CAT 4 GREAT WORK! Edited February 28, 2005 by dailce Quote Link to comment Share on other sites More sharing options...
willross Posted February 28, 2005 Author Share Posted February 28, 2005 radders, The first site uses a mod_rewrite system that has greatly improved the SEO performance. It went from off the list (no. 500+) to the top five in two months. This is not the contribution for this thread. It is Great Categories. 'Great' meaning I like it a lot. It is a simple, but easy way to organize your categories. I believe that it is easier to read that the 'stock' version. that's all. dailce, It can be done. The problem is in the sorting and potential for large# of products listed in the box. You could also use CSS to change colors for sub-sub categories. Quote · willross ·········· Link to comment Share on other sites More sharing options...
bsbadeaux Posted March 3, 2005 Share Posted March 3, 2005 I love this contribution and have been looking for something jsut like this for almost a year now. The problem I have is that the text comes out way to be. I have checked my css and there does not seem to be anything there controlling the size of this particular text. Can you give me a clue? Quote Link to comment Share on other sites More sharing options...
gail Posted March 3, 2005 Share Posted March 3, 2005 Hi I want to use this contrib, but have multi stores installed which has edited two lines in the catagorpes.php file. I've tried simply applying those two edits, but when I do, all I get is an empty box with a category count in it. (This is also all I get without the edits applied.) If I post the existing categories.php code here, can you show me how to change it to get the two contribs working together please? Quote Link to comment Share on other sites More sharing options...
willross Posted March 3, 2005 Author Share Posted March 3, 2005 bsbadeaux I personally set my boxes to 145px. The default is 125px. as far as the css, it is case-sensative in UNIX so I would look there (ie 'smallText' instead of 'smalltext'). Also try refreshing your browser's cache. The css is as follows: TABLE.categ { border: 0px; border-spacing: 0px; font-family: Verdana, Arial, sans-serif; font-size: 10px; color: #000000; } TD.categ { vertical-align: top; } gail I am not familiar with the multi-stores package, but will check it out. Feel free to put the code here too. Quote · willross ·········· Link to comment Share on other sites More sharing options...
gail Posted March 4, 2005 Share Posted March 4, 2005 gailI am not familiar with the multi-stores package, but will check it out. Feel free to put the code here too. <{POST_SNAPBACK}> Thanks Here is the catagoeries.php code with the multi stores edits highlighted in red <?php /* $Id: categories.php,v 1.25 2003/07/09 01:13:58 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2003 osCommerce Released under the GNU General Public License */ function tep_show_category($counter) { global $tree, $categories_string, $cPath_array; for ($i=0; $i<$tree[$counter]['level']; $i++) { $categories_string .= " "; } $categories_string .= '<a href="'; if ($tree[$counter]['parent'] == 0) { $cPath_new = 'cPath=' . $counter; } else { $cPath_new = 'cPath=' . $tree[$counter]['path']; } $categories_string .= tep_href_link(FILENAME_DEFAULT, $cPath_new) . '">'; if (isset($cPath_array) && in_array($counter, $cPath_array)) { $categories_string .= '<b>'; } // display category name $categories_string .= $tree[$counter]['name']; if (isset($cPath_array) && in_array($counter, $cPath_array)) { $categories_string .= '</b>'; } if (tep_has_category_subcategories($counter)) { $categories_string .= '->'; } $categories_string .= '</a>'; if (SHOW_COUNTS == 'true') { $products_in_category = tep_count_products_in_category($counter); if ($products_in_category > 0) { $categories_string .= ' (' . $products_in_category . ')'; } } $categories_string .= '<br>'; if ($tree[$counter]['next_id'] != false) { tep_show_category($tree[$counter]['next_id']); } } ?> <!-- categories //--> <tr> <td> <?php $info_box_contents = array(); $info_box_contents[] = array('text' => BOX_HEADING_CATEGORIES); new infoBoxHeading($info_box_contents, true, false); $categories_string = ''; $tree = array(); //rmh M-S_multi-stores edited next line $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd, " . TABLE_CATEGORIES_TO_STORES . " c2s where c.parent_id = '0' and c.categories_id = cd.categories_id and c.categories_id = c2s.categories_id and c2s.stores_id = '" . STORES_ID . "' and cd.language_id='" . (int)$languages_id ."' order by sort_order, cd.categories_name"); while ($categories = tep_db_fetch_array($categories_query)) { $tree[$categories['categories_id']] = array('name' => $categories['categories_name'], 'parent' => $categories['parent_id'], 'level' => 0, 'path' => $categories['categories_id'], 'next_id' => false); if (isset($parent_id)) { $tree[$parent_id]['next_id'] = $categories['categories_id']; } $parent_id = $categories['categories_id']; if (!isset($first_element)) { $first_element = $categories['categories_id']; } } //------------------------ if (tep_not_null($cPath)) { $new_path = ''; reset($cPath_array); while (list($key, $value) = each($cPath_array)) { unset($parent_id); unset($first_id); //rmh M-S_multi-stores edited next line $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd, " . TABLE_CATEGORIES_TO_STORES . " c2s where c.parent_id = '" . (int)$value . "' and c.categories_id = cd.categories_id and c.categories_id = c2s.categories_id and c2s.stores_id = '" . STORES_ID . "' and cd.language_id='" . (int)$languages_id ."' order by sort_order, cd.categories_name"); if (tep_db_num_rows($categories_query)) { $new_path .= $value; while ($row = tep_db_fetch_array($categories_query)) { $tree[$row['categories_id']] = array('name' => $row['categories_name'], 'parent' => $row['parent_id'], 'level' => $key+1, 'path' => $new_path . '_' . $row['categories_id'], 'next_id' => false); if (isset($parent_id)) { $tree[$parent_id]['next_id'] = $row['categories_id']; } $parent_id = $row['categories_id']; if (!isset($first_id)) { $first_id = $row['categories_id']; } $last_id = $row['categories_id']; } $tree[$last_id]['next_id'] = $tree[$value]['next_id']; $tree[$value]['next_id'] = $first_id; $new_path .= '_'; } else { break; } } } tep_show_category($first_element); $info_box_contents = array(); $info_box_contents[] = array('text' => $categories_string); new infoBox($info_box_contents); ?> </td> </tr> <!-- categories_eof //--> I appreciate your help with this one, it's a bit beyond my basic php skills. Quote Link to comment Share on other sites More sharing options...
Gidgidonihah Posted March 8, 2005 Share Posted March 8, 2005 Ok first off, willross, amazing work man. I was actually planning on changing the looks somehow as I thought the standard setup looked rather unprofessional, buy hey you saved me the work and did a good job of it. All this aside from the fact that I'm sure it would have taking me a lot more work than it took you since I really don't know all that much about the code. But on to the real reason of my post. As you suggested I don't want to show the number of products next to the category name, and I'm to tired/dense to look through the code and figure out how to change it. Suggestions please. Thanks a ton. Quote Installed contributions: * Order Editor, A simple 2 picture size patch, Ad Tracker, Admin Reports Count Reset, All Products, Continue Shopping 'Fix', Control New Products module for 2.2-MS2, Credit Class & Gift Voucher, Custom HTTP Error Page, Fancier Invoice & Packingslip v1.0, FedEx, UPS, and USPS Package Tracking (HTML Versions), Header Tags Controller, Heading Title, LoginBox-Secure Login & Forgotten Password link, Monthly Sales Report, Newsletter & Subscribers, Product Attributes - Option Type Feature, Recover Cart Sales, RMA Returns 2.5c, RSS Feed 0.1, Search Enhancements, SEO Assistant, Super Friendly Admin Menu, Who's Online Enhancement Link to comment Share on other sites More sharing options...
willross Posted March 8, 2005 Author Share Posted March 8, 2005 gail I still need to set-up a shop with the multi-store contribution. Then I can see how it displays and try to solve the problem. It may take a week or so... Gidgidonihah You can shut off the product counts in the 'Configuration' page in the admin. Set 'SHOW_COUNTS' to false. Quote · willross ·········· Link to comment Share on other sites More sharing options...
Gidgidonihah Posted March 8, 2005 Share Posted March 8, 2005 GidgidonihahYou can shut off the product counts in the 'Configuration' page in the admin. Set 'SHOW_COUNTS' to false. <{POST_SNAPBACK}> well gee i guess that's quite the simple solution, now isn't it. Why didn't i think of that before. :blush: Thanks Will. Quote Installed contributions: * Order Editor, A simple 2 picture size patch, Ad Tracker, Admin Reports Count Reset, All Products, Continue Shopping 'Fix', Control New Products module for 2.2-MS2, Credit Class & Gift Voucher, Custom HTTP Error Page, Fancier Invoice & Packingslip v1.0, FedEx, UPS, and USPS Package Tracking (HTML Versions), Header Tags Controller, Heading Title, LoginBox-Secure Login & Forgotten Password link, Monthly Sales Report, Newsletter & Subscribers, Product Attributes - Option Type Feature, Recover Cart Sales, RMA Returns 2.5c, RSS Feed 0.1, Search Enhancements, SEO Assistant, Super Friendly Admin Menu, Who's Online Enhancement Link to comment Share on other sites More sharing options...
hoppefamily Posted March 26, 2005 Share Posted March 26, 2005 Hello, the contrib ist not working togehter with the email-validation contrib. After valiadation on the left side will be errors destroying the layout. Could be that the error is in front of my keyboard :-) , but I checked it on a clean OSC. Michael Quote Link to comment Share on other sites More sharing options...
hoppefamily Posted March 26, 2005 Share Posted March 26, 2005 I figured it out. The problem is $id. The email-validation contrib sends id with a GET, so it gets to $id. I just rename every $id with $idd. This solved the problem. There could be a better solution, but it works. Michael Quote Link to comment Share on other sites More sharing options...
willross Posted March 27, 2005 Author Share Posted March 27, 2005 hoppefamily So, is it the email validation contribution or Great Categories? Which validation contribution is it? I am still working on the multi-stores contribution fix. Quote · willross ·········· Link to comment Share on other sites More sharing options...
hoppefamily Posted March 27, 2005 Share Posted March 27, 2005 It is a problem of both together. The email valiadation contrib uses ID in the http-GET statement. OSC builds from the GET variable ID the variable $ID. So in the great categories the $ID an the $id inside the script are the same, This crashes the script. Just a rename of $id in the great catagories solves the problem. The same could be solved by midification of the email validation code, but it is more complex. Michael Quote Link to comment Share on other sites More sharing options...
willross Posted March 27, 2005 Author Share Posted March 27, 2005 hoppefamily Yeah, I saw that. I plan on changing '$id' in the next version along with support & instructions for Multi-Stores, Hidden Categories and a couple others. Thanks for the interest. Quote · willross ·········· Link to comment Share on other sites More sharing options...
bugauto Posted April 4, 2005 Share Posted April 4, 2005 Nice job on the contribution. Ever run accross this error? Warning: in_array(): Wrong datatype for second argument in /home/gatorla/public_html/store/includes/boxes/categories.php on line 31 These are multiple errors in a row on the left hand side right above the categories menu. The categories menu gets shoved downward and all you see is the errors. Is it caused by your contribution or something else? Mike Quote Link to comment Share on other sites More sharing options...
willross Posted April 4, 2005 Author Share Posted April 4, 2005 bugauto I have yet to encounter an error from this contribution. The only issues I have seen were due to incompatibility with 2 other contributions that came out later than this one. This categories infobox was originally made for the Exchange Project in 2000 - 2001. I updated it and posted in January. I'd say it's pretty stable. I will investigate your problem. A new version is in the works that should cover all issues and add a few features too. Quote · willross ·········· Link to comment Share on other sites More sharing options...
bugauto Posted April 4, 2005 Share Posted April 4, 2005 bugauto I have yet to encounter an error from this contribution. The only issues I have seen were due to incompatibility with 2 other contributions that came out later than this one. This categories infobox was originally made for the Exchange Project in 2000 - 2001. I updated it and posted in January. I'd say it's pretty stable. I will investigate your problem. A new version is in the works that should cover all issues and add a few features too. <{POST_SNAPBACK}> That's cool. I mainly wanted to find out if you have seen that error before and how you took care of it. That's cool too on the upcoming new version. One thing I can suggest is when there is sub-categories that have sub-categories and so on they need to be distinguished somehow differently from the upper sub-category, because it all kind of blends in with sub-categories below and looks like it is part of that category. I may not be very clear so I will show you what I mean. As you can see this is the electrical main category which has sub-categories. The sub-categories have sub-categories. Notice not all sub-categories have sub-categories. When that happens the sub-categories with in the main electrical category that are beneath the sub-category that has other sub-categories looks like it is part of the sub-category right above it. When you click on Tune-Up parts the sub-categories are Caps Condensers Points Rotors Spark Plugs - Wires but it looks like Starters, and Switches is part of it but it's not. Those two are just sub-categories of the main electrical category. I noticed a post above where you mentioned taking care of this kind of thing with css. So color coding the specific sub-categories is my guess. Is that what you think too? Or would there be an other way that might be nicer and cleaner? Mike Quote Link to comment Share on other sites More sharing options...
willross Posted April 5, 2005 Author Share Posted April 5, 2005 bugauto Different color or additional horizontal bars can be added to further separate the inner sub-categories. CSS could also be used. The problem is that the category arrangement and volume vary from store to store. Also, I am looking at compatibility with other contributions. Hey, mess with it. If it works, share it. Otherwise, a stack of other work is keeping me away from this for most of April. Quote · willross ·········· Link to comment Share on other sites More sharing options...
MJones Posted April 16, 2005 Share Posted April 16, 2005 Nice contribution. I see where you can add more content/images to break up the sub categories. I have a store that needed it and two that don't. No problems yet either and I have quite a bit installed. I'll keep checking back on this one... Quote Link to comment Share on other sites More sharing options...
tommy11011 Posted May 13, 2005 Share Posted May 13, 2005 I am having a problem where the menu doesn't work if I turn on caching. Anyone seen this or know how to fix? Quote Link to comment Share on other sites More sharing options...
bugauto Posted May 13, 2005 Share Posted May 13, 2005 Yes I have seen this too but don't know how to fix it. I just don't turn on cache. Instead I use the contrib page cache. Quote Link to comment Share on other sites More sharing options...
melfalcon15 Posted May 26, 2005 Share Posted May 26, 2005 (edited) Ive installed this contribution and added the neccessary info to the stylesheet - however the text in the menu shows as a different size on the index page as compared to the text size in the menu on all other pages. I have tried it on a fresh install of OSCommerce - with the exact same results. Any ideas? Edited May 26, 2005 by melfalcon15 Quote Link to comment Share on other sites More sharing options...
tommy11011 Posted May 26, 2005 Share Posted May 26, 2005 Ive installed this contribution and added the neccessary info to the stylesheet - however the text in the menu shows as a different size on the index page as compared to the text size in the menu on all other pages. I have tried it on a fresh install of OSCommerce - with the exact same results. Any ideas? <{POST_SNAPBACK}> hmm.. I'm not seeing that. Check http://www.perfectuniforms.com Quote 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.
Note: Your post will require moderator approval before it will be visible.