| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Categories Menu - Showing Subcategories | ||||
|
|
Thread Tools | Search this Thread |
#21
|
|||||||
|
|||||||
only a sublevel
hi !!!
indeed, it seems to be that single it shows to the first level of sub categories |
|||||||
#22
|
|||||||||
|
|||||||||
Since I've seen many requests for a "how the color changes happen on aheadgames?" Here's my take on how to achieve this easily.
First thing that needs to be established is the root category, keeping the same category ID's is important. Second, add a bit of custom code to customer/home.tpl replacing the style sheet reference link with something similar to this: Code:
Third, you will need to create these new style sheets for each color change that you want to switch into on particular cats. Also, if you notice on aheadgames, after clicking a root cat, and viewing a subcat of the selected root cat, the simple script above will need to know the root category of the sub category as to keep the proper skin style sheet color. Code:
Note that cat=350 is a subcat of 249, which is being specified in the links. So you will need to modify your categories.tpl to keep a tab on the root category of the current select subcat. OR, Here's a more simpler approach that won't require you to specify the rootcat of any product link that needs to stay the same color in your anchor or ahref links: Edit customer/cateogries.php and modify the $categories_data SQL query to: Code:
Note we are now keeping tabs of root_category_name, category_name Now you would need to change the {if} statements we have setup in customer/home.tpl to reflect these new changes. Code:
Anyhow, if this still isn't very clear, please feel free to PM me for a service request to have it setup on your x-cart. Kudos!
__________________
Cart-Lab - 100+ Social Bookmarks for X-Cart. |
|||||||||
#23
|
|||||||
|
|||||||
$rot_category_name...
Boomer,
I have modified the SQL query in /include/categories.php as you instructed above, but my code (from products.tpl) below still does not work: Code:
The "Chain" cat has only one subcat, and products.tpl doesn't include products_struc.tpl when listing its products. I was thinking about a different solution to this problem that might work better for me. Would it be possible to create an extra column in the xcart_categories table for "listing style"? It could contain a path to a custom products.tpl that the regular products.tpl would load if this column contained any data. How would I write the code for this? Do I just have to add the column and then use $categories[cat_num].listingstyle ? Or is there somewhere I have to tell xcart to put the listingstyle info into $categories? The way I'm doing it right now, which I have to change, is with a massive set of {if} statements that check $cat for each category and subcategory... This seems like something fairly common... How has everyone else handled the problem of making custom products.tpl pages for specified categories? Example of what I have now: Structural Materials: http://www.kitkraft.biz/customer/home.php?cat=20 Acrylic Paint: http://www.kitkraft.biz/customer/home.php?cat=12 Thanks - Jordan |
|||||||
#24
|
|||||||
|
|||||||
The file you should be modifying is the Skin1/customer/category.tpl
|
|||||||
#25
|
|||||||
|
|||||||
Xixao,
The products.tpl that I am referring to is skin1/customer/products.tpl Б─⌠ I have been working with that file and with /include/categories.php . ======== ** Edit ** ========= Sorry about that, I misread your posting. For some reason I had thought you wrote "products.tpl" and not "categories.tpl". I was under the impression that categories.tpl is only responsible for the "categories" menu at the left of the page. I am trying to customize the products.tpl pages to load special templates for certain categories. I'm going to have a lot of categories, so using my current method of {if $cat eq "xx" or $cat eq "xx" etc...} is going to get rather cumbersome. I have been trying to figure out how to add and implement an extra column to the "categories" table in the SQL db, but have been unsuccessful. I am able to add the column to the database and put info into it, but I don't know how to get xcart to read that info. Any other threads on adding and using additional columns to the database? |
|||||||
#26
|
|||||||
|
|||||||
Anyone have fix for sub catagory mod ?
Please post. Excellent mod, just need the fix to maintain sub-cat list.
Thx |
|||||||
#27
|
|||||||||
|
|||||||||
Hi,
Below is a small mod for showing all categories and subcategories on all pages. It's combined from several modes posted on this forum (most by funkydunk ). - Cat A --- Sub Cat 1 --- Sub Cat 2 --- Sub Cat 3 - Cat B - Cat C - Cat D Example is here: http://earthbab.finestshops.com (v. 3.5.2 but should work in any version - just small changes in the categories.php are required for 3.4.*) include/categories.php Code:
skin1/customer/categories.tpl Code:
|
|||||||||
#28
|
|||||||
|
|||||||
nice work
__________________
ex x-cart guru |
|||||||
#29
|
|||||||||
|
|||||||||
skin1/customer/categories.tpl
Code:
The code above should make the current category bold.
__________________
Cart-Lab - 100+ Social Bookmarks for X-Cart. |
|||||||||
#30
|
|||||||
|
|||||||
boomer
do you have a link to a site that has the above sub cat fix in it? so i can see exactly what it does thanks
__________________
X-Cart Gold v4.3 |
|||||||
|
|||
X-Cart forums © 2001-2020
|