| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
How to list all products in specific category in a box on the homepage? | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
How to list all products in specific category in a box on the homepage?
Our bestsellers list is manually configured, because it is based on data from our "real-world" store as well as our online shop. The results are put in a specific category, updated fortnightly.
I'd like to display this information also in a box on the homepage (preferably in two columns in the central content area), and am wondering if there is a way to do this automatically? At the moment I'm making a manual copy which is a bit of a pain. EDIT: I found this thread: http://forum.x-cart.com/showpost.php?p=209436&postcount=3 which shows something like the effect I'm looking for; however, I want this just in a box on the homepage, for one specific category, not on the detailed product page for any category. Advice on how to modify this mod would be very much appreciated! Many thanks, Rachael
__________________
-- X-cart Version 4.1.9 Last edited by ben@lrb.co.uk : 04-01-2008 at 03:32 AM. Reason: Found a thread elsewhere on the forum that may do the trick... |
|||||||
#2
|
|||||||||
|
|||||||||
Re: How to list all products in specific category in a box on the homepage?
For version 4.1.9, I would have done so:
In the file "home.php" insert the following lines (before - "# Assign Smarty variables and show template"): PHP Code:
In the end file "skin1\customer\main\welcome.tpl" insert the following lines: PHP Code:
Create file "customer/main/specat.tpl", so the following code: PHP Code:
|
|||||||||
#3
|
|||||||
|
|||||||
Re: How to list all products in specific category in a box on the homepage?
Hi Yurij,
Thanks very much - that's a great start!! Ideally, I want to be able to style this independently of dialog.tpl, and also to have a solution that doesn't involve editing home.php, so I think I have a bit more tinkering ahead. But it's fantastic to know it can be done! Thanks, Rachael
__________________
-- X-cart Version 4.1.9 |
|||||||
#4
|
|||||||||
|
|||||||||
Re: How to list all products in specific category in a box on the homepage?
You should still have a list of products.
For the main page (the default), you do not have a list of desired products. So if this will not be ( "home.php"), there will be another files. I simply brought universal solution. Changing MYSQL query parameters can be obtained from other effects. |
|||||||||
#5
|
|||||||||
|
|||||||||
Re: How to list all products in specific category in a box on the homepage?
Hi,
I love your code. But is there anyway to display the prices and SKU just as in Featured Product Box? Also how do I sort them according to Product Name? Hope to get an answer for that. Quote:
__________________
Yamiya Yam http://www.yamiya.com.my --------------------------------------- X-Cart Gold v4.1.8 (UNIX) |
|||||||||
#6
|
|||||||||
|
|||||||||
Re: How to list all products in specific category in a box on the homepage?
Quote:
For sorting by Product Name change: PHP Code:
|
|||||||||
#7
|
|||||||||
|
|||||||||
Re: How to list all products in specific category in a box on the homepage?
Quote:
For display the price.... Need make next change as in Featured Product Box (or subcategories): in home.php change last code by: PHP Code:
File "customer/main/specat.tpl" change by this code: PHP Code:
PS. Not much has changed the way you get the list of products. |
|||||||||
|
|||
X-Cart forums © 2001-2020
|