| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
V4 - keeping first level subcategories viewable at all times | ||||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
V4 - keeping first level subcategories viewable at all times
Hey all,
I'm working with the newest version of x-cart and let me start off by saying that there are a lot of improvements ~ thx x-cart team!! Now for my delimia. I've made a couple of simple mods to the cart. http://www.designertrends.com/temp/amish/home.php The first is simply showing the categories in a horizontal line across the header. Here is the code: Code:
The second shows available subcategories (if applicable) where the categories menu would normally go. I inserted a simple if statement in customer/home.tpl which takes the place of the categories include statment. Here is the code for that: Code:
You'll notice that I have added a file named subcategories.tpl within the customer directory (not to be confused with customer/main/subcategories.tpl). Here is the code for that file: Code:
If you follow the url I provided, it will take you to the home page. If you click on one of the categories that has a subcategory (books, videos or dolls) you'll notice the subcategories are shown on the left. That all works great and I'm pleased with it BUT when you click on a subcategory such as videos/cd audio, all of the subcategories (cd audio, dvd, video cassettes) under the root category (videos) disappear. I would like to keep the first level subcategories visable no matter which subcategory you are in. Any ideas or suggestions would be greatly appreciated.
__________________
~zilker uummm...perhaps you should tell me again. http://www.designertrends.com Version 4.0.6 Unix |
|||||||
#2
|
|||||||||
|
|||||||||
Here you go,
I did just this the other day, its a bit crafty how it works but it does the job. It only works for a single level of subcategories though Code:
This is for V4
__________________
Looking for a reliable X-cart host ? You wont go wrong with either of these. EWD Hosting Hands On Hosting |
|||||||||
#3
|
|||||||
|
|||||||
B-E-A-Utiful - thx so much shan.
By the way, if anyone else wants to use this mod in the future, I had to change the if statement in customer/home.tpl to this: Code:
Now back to fine tuning skin.css
__________________
~zilker uummm...perhaps you should tell me again. http://www.designertrends.com Version 4.0.6 Unix |
|||||||
#4
|
|||||||
|
|||||||
Thanks ALOT... That is very helpful. One additional question: Is there a way to make it so the subcategories appear in columns horizontally? Im trying to figure this out but I might be at a dead end..
THANKS AGAIN! -mike |
|||||||
#5
|
|||||||
|
|||||||
you should be able to use the code that shan provided. I removed the | in his code and replaced it with a
b/c it was lining them up horz. Good luck and let me know if you need more help.
__________________
~zilker uummm...perhaps you should tell me again. http://www.designertrends.com Version 4.0.6 Unix |
|||||||
#6
|
|||||||||
|
|||||||||
heres a similar thread for doing this in versions prior to V4
http://forum.x-cart.com/viewtopic.php?p=54761#54761
__________________
Looking for a reliable X-cart host ? You wont go wrong with either of these. EWD Hosting Hands On Hosting |
|||||||||
#7
|
|||||||
|
|||||||
I have everything working except the:
{if $subcategories ne "" and $current_category.category ne "" and $config.General.root_categories ne "Y"} { include file="customer/subcategories.tpl" } {/if} code that should display the subcategories of the left hand side once a root categorie is "clicked". I place this code where the categories include statment was in the customer/home.tbl file. If I comment out the {if} statement the subcategorie menu loads fine and will display the correct subcategorie for the root categorie that is clicked. Why would the if statement not work. Did I put it in the wrong place? I'm running version 4.0.6. Thanks for your help.. |
|||||||
#8
|
|||||||
|
|||||||
You may want to check this mod out. It works with categories of any depth, although it will only list the first level of sub-categories for the current category.
Open customer/categories.tpl replace: Code:
With... Code:
Cheers,
__________________
Fernando Sorry, I\'m not using x-cart anymore, so I am unable to reply to enquiries about modules. Thank you. |
|||||||
#9
|
|||||||
|
|||||||
hey, nice tool, good coding!!!
i'm using version 4.0.11. i've done many mods and hacks with this great shopsystem. But one problem i couldn't solve. On the right side there is a navigation panel with the following structure: MAINPAGE: MAINCATEGORIES -entry1 -entry2 -entry3 -entryn Detailpage of one MAINCATEGORY: MAINCATEGORIES -entry1 -entry2 -entry3 -entryn SUBCATEGORIES to the selected maincat -sub_entry_child1_1 -sub_entry_child1_2 -sub_entry_child1_3 -sub_entry_child1_n Never the less there are only maincategories with one "child". If i've choosen one sub_entry, the following box shuld be shown SUBCATEGORIES -sub_entry_child1_1 -sub_entry_child1_2 -sub_entry_child1_3 -sub_entry_child1_n That means if i've selected a product or one sub_category a box with all subcategories should be shown. How can i realize this ???? i've there's somebody with icq, my uin is 123126029, please help me!!! |
|||||||
#10
|
|||||||
|
|||||||
Quote:
i've been after the problem for a few weeks now. saw a mod this morning that might be it, but i'm still working on it. i'll try to keep everyone updated. it's the never ending {parentid} vs. {categoryid}
__________________
X-Cart 4.0.11 {My simple mods} Adding Market list and % save on product detail Quantity input box |
|||||||
|
|||
X-Cart forums © 2001-2020
|