| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Creating a Main/Root Categories Page | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() I'd like to create a main/root categories page that would have a description and list the main cats. Much like how an individual category page does.
It sure seems like someone would have had the need to do this in the past, however after extensive forum searching i could find no reference to it. I created a relatively simple mod that works by using a static page field for the description of the page and a mod in pages.tpl that borrows code found in "subcategories.tpl" (i switched subcats with $category elements) Is there a more elegant way to do this? Any ideas on how to adjust location.tpl to include my static page before the categories and product? Many thanks! ![]()
__________________
Version 4.1.3 |
|||||||
#2
|
|||||||
|
|||||||
![]() The category can't be called into the home page as it isn't in the products array. You could easily "add products" to the home page using a modified "Featured Products" tpl or just a static page placed in the welcome.tpl (skin1/customer/main).
I do wish that categories could be called into the home page next to featured products as that would allow a much nicer entrance for customers to get to comarative products. - Mike
__________________
4.1.9 |
|||||||
#3
|
|||||||
|
|||||||
![]() Thanks for responding... not exactly sure what you mean by calling categories from the Home page - cause if it means listing categories then that can be done from Home - never tried it from the Welcome.
My need specifically is to have another page "after" the home page that lists the root categories and text - sort of a master categories page that also shows up directly after the home page in the breadcrumbs (location.tpl). Ya know what i mean?
__________________
Version 4.1.3 |
|||||||
#4
|
|||||||
|
|||||||
![]() Well I managed to come up with a fairly elegant solution.
I went with a static page so that my client could modify the static element of the page. I then placed an if statement in skin1/customer/main/"pages.tpl" to test if we're on the page (pageid=9 in my case) and then handle the dynamic listing of main categories. The code to do the dynamic listing was borrowed from skin1/customer/main/"subcategories.tpl". Here is that code that i modified and inserted into pages.tpl: Code:
The modification of the pasted subcategory code involved taking out the column that shows cat/product thumbnails (you could leave that in), an if statement to not list a cat entitled "Medical Conditions", and MOST importantly substituting all references for sub cats to cats. That was the key that you should do and made it work like a charm. Fixing the breadcrumbs (location.tpl) to start with my main category page was easy - just refer to this post: http://forum.x-cart.com/viewtopic.php?t=24008&highlight=main+catalog+catal ogue To view the final root categories page on my site go to: http://amazonmedicine.com/xcart/pages.php?pageid=9 I hope this helps someone ![]()
__________________
Version 4.1.3 |
|||||||
#5
|
|||||||||
|
|||||||||
![]() Hi Hunabku,
Thank you very much for sharing your mod with us. You should add it to the completed mod section, if its not there already. I like the way you have the portol setup to take the customer to the html pages you created. I also noticed what we already should expect from search engines spiders and their appetite for html pages as opposed to php. Your HTML pages seems to rank much higher then the dynamic pages. This is nice, especially since your link html pages dont follow the general layout design of your main site. This must come in handy when you need to modify things on your main site, so when you do, you wont have to add or modify categories to your html pages. I think the only thing I would be concerned with is making sure you update your link from the html pages, back to your php pages and visa versa. Thanks again for sharing, I will have to experiment with it.
__________________
Mil Mascaras Live Xcart Site #1-V- 4.1.8 Live Xcart site # 2-V 4.4.3 CDSEO Mod - Firetank MM30 - 7DANA- The bestTemplates! Linux - EWD Host Servers awesome service! AlteredCart One Page Checkout |
|||||||||
|
|||
X-Cart forums © 2001-2020
|