| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Featured Products in Categories.... | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
Featured Products in Categories....
Hi,
For some reason we cannot display featured products in our category pages. On the main page we can show featured products but we can't shows them in the categories. We have subcategories of the main categories but don't want to display feature products in them. IS anybody else experiencing this problem? It lists all items within the category, we used the debud console and it is not even bringing up the featured.tpl so it makes me think think that theis is a if command line problem or something in one the main templates. Hope you follow. Please help! |
|||||||
#2
|
|||||||
|
|||||||
Hi,
Featured products can only be used in categories that do not contain products. They are meant for the root categories to feature products from the sub categories below. Hope that helps, ATKOgirl
__________________
X-Cart Versions: 4.1.10 and 4.2.0 |
|||||||
#3
|
|||||||
|
|||||||
hi,
thanks for letting me know. is their anyway we can override this? |
|||||||
#4
|
|||||||
|
|||||||
ok, we have now figured this out. If anybody wants the code, then let me know, it's quite extensive and you have to create new templates, but it works
|
|||||||
#5
|
|||||||
|
|||||||
Hi playcentral
Yes, it would be great if you could post your code. Thanks |
|||||||
#6
|
|||||||
|
|||||||
ok...
First of all you need to edit : /customer/home_main.tpl near the bottom you should have : Code:
or something like that...then change it to this, and add another elseif line( just copy and paste this over the above line: Code:
Then create a .tpl file called subcategories2.tpl in /customer/main this should have the following in it... Code:
You should then create another file in /customer/main called subcategories3.tpl this should have this in it: Code:
Finally edit the featured products template found in /customer/main called featured.tpl, this should have this in it: Code:
The only thing wrong with all of this is that the page numbers/navigation ends up inside the capture box, but we actually prefer it like that. By all means please back up all your templates before doing this as I don't want people mucking up their cart if anything goes wrong. Hope this helps people! |
|||||||
#7
|
|||||||
|
|||||||
umm thats a little complicated... try this 3 line solution:
bottom of File: /customer/main/subcategories.tpl Code:
to Code:
apparently an empty array does not evaluate to "". this works fine now, and displays featured products if there are no products in the current category and there are featured products., If you alwasy want featured products to show then remove the conditional if's |
|||||||
#8
|
|||||||
|
|||||||
Great!!! Thanks playcentral and nfc5382, Just what I've been looking for.
Although I did favour the 3 line solution
__________________
Regards Graham Site in Progress... (Version 3.2.2 Gold) |
|||||||
#9
|
|||||||
|
|||||||
alright smart arse! :P
my code was just hacked together to do the purpose, and I've only been using xcart about a week so don't really know what I'm doing Thanks for the new code though |
|||||||
|
|||
X-Cart forums © 2001-2020
|