| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
How do I display all subcategories along with all products | ||||
|
|
Thread Tools | Search this Thread |
#21
|
|||||||
|
|||||||
Re: How do I display all subcategories along with all products
RobinBraves,
Looks like you've done everything correct. All you need to do now is to convert the sample code in subcategories.tpl to something that will read your data and place it formated on the page. If you need some code to get you going I've gathered some code from various different threads and altered the subcategories.tpl file to show the output in icons and text. It is also hyperlinked so that you can click on the icon and the text. I've attached a thumbnail so you can see what it looks like. First, add this code to the end of your skin1.css file: Code:
Code:
If you need to change it to two column then change these 2 lines of code in subcategories.tpl: Code:
And for 4 columns you need to replace them to 4 And also at these 2 lines of code: Code:
You also need to change the percentage code you placed in your skin1/skin1.css file. Example: for 2 columns it's 50% Code:
Code:
Unfortunately I've been so busy, I didn't have much time to test it out completely, but it's a start to get you going. You might have to change the table code or the css code to what you need. I also didn't work on the sort order (it's ordered alphabetically), it's different than the sort order on the menu (see the thumbnail). You can change the position order in the categories section of the admin side. Anyway, hope this will get you going. - MoonDog -
__________________
X-CART Gold v4.1.8 |
|||||||
#22
|
|||||||||
|
|||||||||
Re: How do I display all subcategories along with all products
Where exactly in the subcategories.tpl does the following code go. I've tried it in a few different places an end up getting a whole load of offset text which outlines the contents of the subcategories but no actual products.
Thanks. {if $subcategories} <ul> {foreach from=$subcategories item=subcat} [*]{$subcat.category|escape} <ul> {foreach from=$subcat.products item=subproduct} {if $subproduct} [*]{$subproduct.product|escape} {/if} {/foreach} [/list] {/foreach} [/list]{/if}
__________________
"The more you know - the less you pay" Various websites using 4.66 Pro & 5 |
|||||||||
#23
|
|||||||
|
|||||||
Re: How do I display all subcategories along with all products
You are a genius! Sorry for taking so long to get back. This worked and I will need to make some css and table adjustments, but that will be easy to do.
I really appreciate this.. I can actually feel stress relieving off of me.
__________________
Version 4.1.11 |
|||||||
#24
|
|||||||
|
|||||||
Re: How do I display all subcategories along with all products
RobinBraves,
Glad to see you got it working and not as stressed anymore. designtheweb, Quote:
Just follow the instructions I posted previously without this test code and you will see the products displayed instead of text. - MoonDog -
__________________
X-CART Gold v4.1.8 |
|||||||
#25
|
|||||||
|
|||||||
Re: How do I display all subcategories along with all products
This code seems to change the layout of the individual products. is there a way to keep the individual products layout but have the products under the subcategories?
__________________
www.easycoffee.com.au Version 4.1.9 |
|||||||
#26
|
|||||||||
|
|||||||||
Re: Display SubCategory titles with products
this is EXACTLY what I wanted. Thank you for sharing. Great works...hope I can get the subcategories show as subcategories. Right now, they all show as categories...can't tell which is subcategories. Had to play with it to get it work... ;-(
__________________
_____________ Capture Your Mini-Me Look! - X-CART Gold (Current Version) V4.6 - Reboot - CDSEO |
|||||||||
#27
|
|||||||
|
|||||||
Re: Display SubCategory titles with products
Works like a charm, thank you for this.
__________________
X-cart Pro Version 4.1.9 |
|||||||
#28
|
|||||||
|
|||||||
Re: Display SubCategory titles with products
Yep, exactly what I wanted. Thanks!!
Scotty
__________________
Xcart Version 4.1.9 Upgraded to 4.1.10 (clean install with mods added back) |
|||||||
#29
|
|||||||
|
|||||||
Re: Display SubCategory titles with products
Just out of curiosity... I've looked all over the forums but can't find what I'm looking for.....
Is there a way to have only the main cats show and expand down to show the subs only in that cat once it's clicked?
__________________
Xcart Version 4.1.9 Upgraded to 4.1.10 (clean install with mods added back) |
|||||||
#30
|
|||||||
|
|||||||
Re: Display SubCategory titles with products
Fancy Categories does that but not expand, only popup. Use x-cart demo and you will see Fancy Categories in action.
__________________
X-cart Pro Version 4.1.9 |
|||||||
|
|||
X-Cart forums © 2001-2020
|