Mark-UK Posted September 27, 2005 Share Posted September 27, 2005 Is this working ok now, really after something like this, i want to. OK so at the moment my sites top level categories is like this. fishing equipment fishing clothing outdoor wear outdoor equipment womens clothing Now how can I make it so the different arease are seperated by a header with that sections topic, so it would be like this. FISHING EQUIPMENT (this would be in a coloured bar)and non clickable text fishing equipment fishing clothing OUTDOOR PURSUITS (this would be in a coloured bar)and non clickable text outdoor clothing outdoor equipment WOMANS CLOTHING (this would be in a coloured bar)and non clickable text horse riding general clothing footwear So rather then have all top level categories underneath each other the different industries are seperated by a header bar coloured with the type of sport or industry in in text on it as a title. Can I do this thanks Quote Link to comment Share on other sites More sharing options...
mark27uk3 Posted September 27, 2005 Share Posted September 27, 2005 Hi, Do you mean like like this? Mark Quote Lifes a bitch, then you marry one, then you die! Link to comment Share on other sites More sharing options...
Mark-UK Posted September 27, 2005 Share Posted September 27, 2005 Yes possibly, if you wanted could you get the categories to hav sub categories too just out of interest, how did you get that. thanks Quote Link to comment Share on other sites More sharing options...
Guest Posted September 28, 2005 Share Posted September 28, 2005 I am trying to acheive different header images for different boxes, I have tried to use the code from the array to acheive this but I either end up with all boxes with the same header image or no images at all. Step 1: Let's just make sure that we can get different images for each box. To simplify things at this stage, let's assume that the images will reside in the /images directory, and that the images are named the same as the box title. In other words, the box image for box1 will be named box1.gif, and reside at http://yourdomain.com/images/box1.gif. The box image for nextbox would be named nextbox.gif. In includes/boxes/more_categories.php, find this: function tep_categories_box($boxId,&$infoBox,$follow_cPath,&$cPath_array) { global $languages_id; $info_box_contents = array(); $info_box_contents[] = array('text' => $infoBox['name']); and add one line to the end, so that it reads like this: function tep_categories_box($boxId,&$infoBox,$follow_cPath,&$cPath_array) { global $languages_id; $info_box_contents = array(); $info_box_contents[] = array('text' => $infoBox['name']); echo '<img src="/images/' . $infoBox['name'] . '.gif">'; Save that and upload it. Refresh your shop page in your browser. Assuming you have the correct .gif files in the /images directory, you now have an image just above each More Categories infobox. Step 2: Now, since you are much better graphic artists than I, and have created header graphics that replace the functionality of the infobox header anyway, remove the line (immediately after the code we edited above) that says: new infoBoxHeading($info_box_contents, false, false); or new infoBoxHeading($info_box_contents, true, false); . Upload and refresh. Viola! You now have unique header images for each more_categories infobox (assuming that you're one of the graphic artists I alluded to earlier, or that you know one)! The next step would be to store each category box image name in the database (extending the existing table definition by one field), and reference it directly, instead of assuming that not only the image name is the same as the box name, but that the image is a .gif. Any takers? I'm happy to do it, but have been REALLY busy lately. The solution posted here is just a hack, really, and ought to be done properly by putting it into the database. On second thought, the hack is fine. The whole contrib is a hack anyway, so why not? :D -jared Quote Link to comment Share on other sites More sharing options...
Mark-UK Posted September 29, 2005 Share Posted September 29, 2005 Do the top level categories still open up to sub level categories when using this contribution or can you ONLY have top level categories that dont expand. Quote Link to comment Share on other sites More sharing options...
Guest Posted September 29, 2005 Share Posted September 29, 2005 You can use it with subcategories, but you cannot assign a subcategory a box of its own. -jared Quote Link to comment Share on other sites More sharing options...
Mark-UK Posted September 29, 2005 Share Posted September 29, 2005 (edited) OK cool cheers, any new examples of sites with this working please thanks. I want categories like www.countrysupplies.com, seperated by headers , dont really want seperate boxes for each industry i have but 1 continuos box with the different areas seperated by header in colour with title of that industry in it then clickable categories below. whats best way to do this please. dont want text header to be clickable link either. any ideas please. Edited September 29, 2005 by Mark-UK Quote Link to comment Share on other sites More sharing options...
Guest Posted September 29, 2005 Share Posted September 29, 2005 Mark, I'll PM you the URL to another site where I can give you an example. To remove the spacing between the infoboxes, to make them look like just one box, you can edit more_categories.php to change this: echo "<tr>\n<td>\n"; tep_categories_box( $i, $_infoBox[$i], ($infoBox == $i && tep_not_null($cPath)) ? true : false, $cPath_array ); echo "\n</td>\n</tr>\n"; to this: // echo "<tr>\n<td>\n"; tep_categories_box( $i, $_infoBox[$i], ($infoBox == $i && tep_not_null($cPath)) ? true : false, $cPath_array ); // echo "\n</td>\n</tr>\n"; That should do it. Remember that after you've installed this (which is not hard, BTW), it is not enabled by default. It does not change the *default* behavior of your store. You can disable the "main" default categories box, but it's still enabled by default. You can add up to 25 category boxes, but you have to enable each of them. It's not as risky of an install as it might seem. (but back up anyway - -it's good standard practice) -jared Quote Link to comment Share on other sites More sharing options...
Mark-UK Posted October 3, 2005 Share Posted October 3, 2005 Cna i add this contribution despite alreday having 10 top evel categories. I mean can I add it then move the categtories i wnat to the boxes i want or do you have to start afresh and add categories again etc after instillation of this contribution. Quote Link to comment Share on other sites More sharing options...
mark27uk3 Posted October 3, 2005 Share Posted October 3, 2005 You do not need to re-add your categories, they will show up in the drop down boxes in admin/more categories. Mark Quote Lifes a bitch, then you marry one, then you die! Link to comment Share on other sites More sharing options...
Mark-UK Posted October 3, 2005 Share Posted October 3, 2005 thanks so i just allocate the top level categories to the boxes i want yes? Quote Link to comment Share on other sites More sharing options...
mark27uk3 Posted October 3, 2005 Share Posted October 3, 2005 Yes thats what you do. Mark Quote Lifes a bitch, then you marry one, then you die! Link to comment Share on other sites More sharing options...
Mark-UK Posted October 3, 2005 Share Posted October 3, 2005 How long does it take to install cheers Any examples of it. Quote Link to comment Share on other sites More sharing options...
Grizzly-Button Posted October 3, 2005 Share Posted October 3, 2005 Mark, I installed it last night, was rather quick, just half an hour. What I would like to ask the experts, where can I turn off the category miniimages? Thanks for advice. Joe Quote Link to comment Share on other sites More sharing options...
mark27uk3 Posted October 3, 2005 Share Posted October 3, 2005 Hi Joe, I think you may have installed the version by alfher, I am not too sure but you could try commenting out these lines. // CategoryBox Enhancement if (tep_has_category_subcategories($counter, 'image')) { $categories_string .= tep_image(DIR_WS_IMAGES . $tree[$counter]['image'], $tree[$counter]['name'], '30', '30'); } else { $categories_string .= tep_image(DIR_WS_IMAGES . $tree[$counter]['image'], $tree[$counter]['name'], '30', '30'); } if (isset($cPath_array) && in_array($counter, $cPath_array)) { $categories_string .= '</b>'; } // CategoryBox Enhancement Mark Quote Lifes a bitch, then you marry one, then you die! Link to comment Share on other sites More sharing options...
Grizzly-Button Posted October 4, 2005 Share Posted October 4, 2005 Thanks Mark, that was the point. For those having the same question. Search in the file catalog/includes/boxes/more_categories.php from line 34. Joe Quote Link to comment Share on other sites More sharing options...
Mark-UK Posted October 5, 2005 Share Posted October 5, 2005 How can I get a menu category system like www.countrysupplies.com where the categories are in one box and seperated by a colourd title bar. Also can i make sub categories stay on main page in the middle when a top level category is clicked on the left menu. Quote Link to comment Share on other sites More sharing options...
Mark-UK Posted October 5, 2005 Share Posted October 5, 2005 Anyone please Quote Link to comment Share on other sites More sharing options...
Guest Posted October 6, 2005 Share Posted October 6, 2005 Mark, have you tried my instructions that I posted earlier? You can remove the spacing above and below the infoboxes that way. You then edit the stylesheet.css to make the infoboxheading a different color. -jared Quote Link to comment Share on other sites More sharing options...
Mark-UK Posted October 6, 2005 Share Posted October 6, 2005 Hi not yet no as i need to sort it out if it will make it like the link i wnat but it wont will it as my box has curved edges so you will have no spaces but indents on the side of the category box where they have had the space removed, the menu on the one i linked too has no spaces , if i add multiple boxes and remove space you will be able to tell wont you as my category box has curved corners? Quote Link to comment Share on other sites More sharing options...
Guest Posted October 6, 2005 Share Posted October 6, 2005 Mark, see step 2 in http://www.oscommerce.com/forums/index.php?sho...=158814&st=40 . -jared Quote Link to comment Share on other sites More sharing options...
Mark-UK Posted October 6, 2005 Share Posted October 6, 2005 I cant find step 2, ive looked, who posts it, how far down on what page please, sorry if im being thick. Quote Link to comment Share on other sites More sharing options...
Guest Posted October 9, 2005 Share Posted October 9, 2005 See my Sept 28 post. -jared Quote Link to comment Share on other sites More sharing options...
Guest Posted November 7, 2005 Share Posted November 7, 2005 Hi all, I installed the "More Category Boxes With images" contribution. But I think the Category Boxes With images look not good. How can I remove the images? Thanks in advance :) Quote Link to comment Share on other sites More sharing options...
Guest Posted November 7, 2005 Share Posted November 7, 2005 I tried to replace the there files with "More Category Boxes" contribution: admin/more_categories.php admin/includes/languages/english/more_categories.php includes/boxes/more_categories.php But after that, this images become X... :blink: 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.