![]() |
Grouping Categories for better viewing
I've done this for a customer and helped someone out on the forums with this and thought it might be useful to post here.
This will basically get you started on how to group your main categories for better readability for those of you with lots of main categories. This can be greatly expanded to include image dividors, Headings to each of the groups, etc. I have this as a free tip on my site and thought I'd copy and paste the tip for everyone here too. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ NOTE: You should always make a back-up copy of your files and/or database before installing any modification. This tip will help group categories with a line break, horiziontal rule, image, etc. inbetween category groups. Look for a section of code in skin1/customer/categories.tpl that looks like this: Quote:
and change it to this: Quote:
You can change the noted to a <HR> or an image or anything else you'd like to use to separate your categories. Example, all the categories in the first grouping have a position number less than say, 50. The next section is between 50-100, next 100-150, etc. This means that the categories you want to show up at the top of the sections will have to have category position, 50, 100, and 150 in this example. You can change the 50, 100, 150 to be what ever position numbers you want and you can add more "or"s to the if statement. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Hope this helps some!! :) Carrie |
You do good work!;-)
This is just what I was looking for on a new project, thank you much. |
I have finally implemented this on my site. So you can see an example of what you can do with this simple mod there. (http://www.bcsengineering.com/store/catalog)
Here's the exact code for on my site (notice the part set off in the middle is the new part): Code:
if $config.General.root_categories eq "Y"} Carrie |
How did you center your headings??
|
Khar,
Here's an example lable for my site: lbl_heading1 is: Quote:
Does that help? I left the full control to be in the heading lable. Carrie |
Perfect!!!
Thanks again. |
YEAH!!!! Carrie. Big time Kuddos for you.
Thank you so much |
Hi
I tried this for 4.012 and it just shows nothing in the categories box. I have checked that I have the cats numbered corectly but no joy. Is it different on 4.012 or should it work? |
Can you post the code you changed?
Thanks, Carrie |
Will this work for products aswell?
I would like to have this work with products as well.
Example: Memory -> PC266 PC333 PC400 I would like to list all PC266 memory first then the PC333 and then the PC400 Is there a way to do this? Regards WP |
Does anyone know if it is possible.
I trying to get all my products under a cateory in a list. does anyone know how to do this?
Example: Computers Shuttle: Product Price Information ------------------------------------------------------------------------------- product 1 100 yes ------------------------------------------------------------------------------- product 2 184 yes -------------------------------------------------------------------------------product 3 190 yes ------------------------------------------------------------------------------- is this possible? Thanks in advance for any answers. WP |
I'm not sure what you mean as the products in X-cart are listed under a category. ??
Maybe picture would be helpful of what you want it to look like? Carrie |
I liked the example on the reffered web site.. Is there a way to create separate category listings in separate boxes? The example shows separate category listings but are grouped together in one box.
I am developing our new look on 4.0.12. Has anyone tried using the sample code on 4.0.12 with success? How was your mileage? ainion |
Yes you should be able to do that. Would be a bit trickier. Did you get it figured out? I realize I"m responding quite a bit after you last posted.
Carrie |
Carrie,
I get the same "Blank Box" that 01bodyjewellery clamined to have gotten. I backed up my original and copy/pasted your code above exactly as you instructed us to. After refresh, categories box comes back blank. Here is my entire modified categories.tpl file that i modified according to your instructions above: Code:
{* $Id: categories.tpl,v 1.23 2004/06/24 09:53:29 max Exp $ *} Using the above code, i get a blank categories box. Now I will say this.... You told us to "Look for a section of code in skin1/customer/categories.tpl that looks like this: " and i find that my code is not exactly the same as the code you told us to look for. It is identical except for the a href link code. The code you told us to look for: The code of my original file: Notice Carrie the difference towards the end of my code and how it's missing a few things. Welp, that's the way it came from the factory. Maybe 4.0.13 has a totally different categories.tpl file that will not work with your cool mod. Hopefully you can check it out for us. *smile* I am going back to FunkyCategories for the time being. - Shannon |
My code was for version 3.x Looks like version 4 needs a slight change. Try this:
Code:
{* $Id: categories.tpl,v 1.23 2004/06/24 09:53:29 max Exp $ *} Let me know if that works and I'll include both in my free mod. Should work fine. Thanks! Carrie |
Carrie-
This is exactly what I need but as I am an XCart virgin I really need a bit of guidance here if you have the time. Thanks in advance! I am not understanding how the categories populate the menu area once this code is put in place. I can insert for example text or a line where you have directed us and it does show up fine but I just don't see any of the actual categories rendering. I am obviously missing something here. Can you advise? |
Got it to work- two of the classes did not have quotations and what do I know but when I took out the "return" it worked so hopefully this helps someone out- Thanks for the work on your end Carrie this has really helped me out.
Code:
{* $Id: categories.tpl,v 1.23 2004/06/24 09:53:29 max Exp $ *} |
More lame coding from an XCart virgin.....
I imagine you pros can rip this to shreds but maybe it will help someone out- Try this one out: Remember to set your initial category numbers in the admin side according to what is in original Carrie's code- I just tweaked it a tad more here as an example. Code:
{* $Id: categories.tpl,v 1.23 2004/06/24 09:53:29 max Exp $ *} |
Carrie,
Thanks, but it did not work again. However AgileMolecule must have done something different. I guess the quotes on the classes did the trick. Thanks BCSE & AgileMolecule for getting this to work with 4.0.13: Carrie this would be a great addition to your FREE area on your wonderful website. To end this discussion here's the code for everybody using 4.0.13 X-Cart. This should replace your entire /customer/categories.tpl file: this works fine in 4.0.13 written by BCSE: Code:
{* $Id: categories.tpl,v 1.23 2004/06/24 09:53:29 max Exp $ *} this is a fancier version with custom headings for each section for 4.0.13 created by BCSE & upgraded by AgileMolecule: Code:
{* $Id: categories.tpl,v 1.23 2004/06/24 09:53:29 max Exp $ *} - Shannon |
Glad you guys got it working! :)
Carrie |
I have an even better mod to do this same thing now. It will allow category headings in the main Root category menu and/or in the subcategories!!
Check it out! It's free! http://www.bcsengineering.com/store/customer/product.php?productid=125&MMCF_cathead Carrie |
Hi IndieDepot
Try this Skin1/customer/categories.tpl Code:
{if $active_modules.Fancy_Categories ne ""} Thanks to Carrie at BCSE and AgileMolecule. Add this to your CSS under CategoriesList. Code:
.CategoriesList2 { This works fine in 4.0.14 |
Has anyone managed to get this (or a similar concept) to work with Fancy Categories? I've been playing around with it for a little while, but no real results yet....
Any help would be GREATLY appreciated. Thanks in advance. |
Sorry for our delayed reply. We've been swamped with questions, quotes, etc the past 2 weeks (well the whole month actually).
Are you trying to get the category headings to work or the grouping of categories?? Thanks, Carrie |
Not a problem, I understand we all get busy... and its better to have a business that is busy (making money) as compared to one that is not busy (losing money). 8)
I was looking to break up my categories into 2 or 3 groups and then list the approperiate categories (or category group I guess) listed under a heading. Heading 1 *Cat 1 *Cat 2 *Cat 3 Heading 2 *Cat 4 *Cat 5 *Cat 6 and so on... |
The code provided doesn't work in 4.1.0 ?
|
The code on 4.1.0 is like this...
Code:
{* $Id: categories.tpl,v 1.26 2005/11/17 06:55:37 max Exp $ *} Can anyone convert it so I can have my sub categories back? |
Categories headings
Quote:
When you say to set the initial category numbers on admin side you must mean the to do so by setting the category position numbers? Thanks for the help! X-Cart v 4.0.17 |
hey guys,
why did I have to change the eq to <, to get it work? |
Hi everyone,
x-cart Pro v.4.0.17 I would like to use this code to create a page break after every 15 categories. I tried the BCSE code and my categories did not show up, then I tried the AgileMolecule code and the categories displayed properly but I did not get the desired effect of having a break after every 15 categories. I could not get a line break or a horizontal rule <hr> (did not even try a page break yet). Any suggestions on how to do this using this code or other code would be appreciated. Thank you. |
Carrie BSCE,
Does the code below been tested susscessfuly with 4.0.17? Do I still need to group them by numbers (between 50-100, next 100-150, etc.) I noticed on your site, you're not grouping them by number. How you do this? Thanks. Quote:
|
Product 125 does not need the grouping by numbers that was needed for the first free mod mentioned in this thread. It actually adds the category heading to the category table in the database.
It has been tested on 4.0.x of X-cart. I haven't specifically tested it on 4.0.17 but I don't see why it wouldn't work for that one. We are currently using the old one on our site as I unfortunatly don't have any time to do any work on my site besides keeping descriptions up-to-date and adding new products. Either free products are good for making Headings, but the 2nd on is a bit easier to install if I remember right. A bit easier to grasp how it works. I hope this helps. Thanks, Carrie |
Thanks Carrie...it helps.
|
Re: Grouping Categories for better viewing
Hi,
I know this is an older post but I am hoping someone can help me complete this. Downloaded and installed the free mod from BCSEngineering but it won't sort the categories. I either get a line (hr) in between each category or none at all, regardless how the categories are numbered in admin. Is there a max number of parameters? Do the categories have to be grouped by sorting them with the same number or with numbers in between the parameters? If anyone has any suggestions I would really appreciate it. I have been working on a new category display for over a week! Has anyone made this work with 4.1.9? |
Re: Grouping Categories for better viewing
I would like it for 4.3.2 :-)
|
Re: Grouping Categories for better viewing
Quote:
Make sure you drop us an email so we can get it in our queue. Thanks! Carrie |
All times are GMT -8. The time now is 12:17 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.