| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Display first 3 products from selected categories on HP | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() Hi,
I'd like to display first 3 products form selected categories on my hompepage. Could somebody help with the snippet I need to use in my home.tpl? Thanks.
__________________
4.5.2 |
|||||||
#2
|
|||||||
|
|||||||
![]() I'm not entirely sure I'm understanding your question here, as it seems to concern a built-in facility within X-Cart.
From Dashboard, under Catalog >> Categories you'll find a place below the list of categories to put Featured Products of your own choosing. You can browse among your product list and add items quite straightforwardly. You can put them in any order you like by choosing the Order By number. I usually have gaps (10, 20, 30, etc) so I can shuffle home page products easily. But you can number them 1, 2, 3 if you find that easier. If I didn't understand your question, please ask again in another way so I can get it. Cheers, John
__________________
Two client sites: 4.4.4 and 4.5.5 Coding since 1981. Using X-Cart since 2012 |
|||||||
#3
|
|||||||
|
|||||||
![]() Thank you - you are right, featured products are a partial solution. The problem is I'd like to show featured products from multiple categories (3 from each) on my homepage.
But I don't think there is a way to do this, so I thought it would be easier to show first three product from three selected categories.
__________________
4.5.2 |
|||||||
#4
|
|||||||
|
|||||||
![]() Well, I'm not sure what limits there are in your choices - you don't say how many categories you have. On one shop I maintain (http://www.insiderchic.net/shop/) the owner has a total of 30 Featured Products selected from assorted categories. I'm sure she could have more, but there's a limit to how far people want to scroll down.
To be clear, there are two completely different types of Featured Products. One on the home page (at least in the Fashion_Mosaic_Grey template), where you can mix & match from multiple categories. The other type is on a Category page where - not surprisingly - you're restricted to products from the relevant category. Maybe you're mixing up the two types available? John
__________________
Two client sites: 4.4.4 and 4.5.5 Coding since 1981. Using X-Cart since 2012 |
|||||||
#5
|
|||||||
|
|||||||
![]() You are right - mixing featured products from multiple categories would be possible on the homepage, but I'd like to separate them by Headings (Featured products from category A, Featured products from category B).
The reason for this is we use one category for ordering whisky tastings, while the others are for regular whisky bottles.
__________________
4.5.2 |
|||||||
#6
|
|||||||
|
|||||||
![]() OK - I get it.
If this were simple xhtml it would be dead easy. Truth is it's a major task to unpick X-Cart's combination of html, php, Smarty templates, Javascript and MySQL reads that generates the table you're targeting. I've had a look at the source code and dug briefly into the coding behind it but I reckon it's a week's work to unravel that lot. Maybe someone else has a better idea of how to insert a heading into each new major 'chunk' of 3 items in the table. I have identified a single non-breaking space that's used as a separator (class="separator") in the source code but I can't track down how that's generated despite a complex 'grep' search for it inside the entire X-Cart code base. I guess it's created on the fly within the Javascript itself. If you can target that you can make it show a heading line, but finding it... Yikes! So, alternative approach, if it's any use to you - you could use WebMaster Mode to modify the value of the 'Featured Products' label [to read, say: 'Sample our fine whiskies and tastings']. We use this approach on one site to add a message about free shipping on products over a certain value. However, the same value will pop up every time you use top-level Categories, so you'd need to consider the wording carefully. Sorry not to be more help. Cheers, John
__________________
Two client sites: 4.4.4 and 4.5.5 Coding since 1981. Using X-Cart since 2012 |
|||||||
|
|||
X-Cart forums © 2001-2020
|