| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Exclude categories from recommends... | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() We're planning to add some categories to our store which contain adult/erotic products. Before these categories can be viewed customers will see a message that these categories contain erotic images and text.
Because of obvious reasons we don't want any of the products of these categories to show up in the recommends, which we use on the storefront of our store. I've found this (old) post about excluding one category from the recommends: http://forum.x-cart.com/showthread.php?t=21990&highlight=exclude+category+ recommends Does anybody know what the code would be for excluding several categories from the recommends? Any help is very appreciated. Many thanks in advance! Jerrad ![]()
__________________
X-Cart 4.0.12 Heavy modified with paid, free and forum mods. PHP 5.2.5 | MYSQL 5.0.51a |
|||||||
#2
|
|||||||||
|
|||||||||
![]() How many categories are you trying to exclude? The reference you gave could possible be modified to include several (up to 3 or 4 maybe) just by adding more "AND"s. Also, the modification excludes main categories and subcategories, so if you had a category named "Adult" you could exclude all of the subcategories of "Adult".
__________________
Two Separate X-Cart Stores Version 4.4.4 Gold - X-AOM - Vivid Dreams Aquamarine (modified) - Linux Mods - Newest Products - View All -, and a few others. Numerous upgrades from 4.0.x series. Integrated with Stone Edge Order Manager + POS Version 4.1.12 Gold (fresh install) - X-AOM - Linux Mods - XCSEO free |
|||||||||
#3
|
|||||||
|
|||||||
![]() Thanks for your reply, JWait!
There are around 8 main categories, which each will have from 3 up to 10 subcategories. Do I understand you correctly that excluding a main category like for example "Adult", will also automatically exclude all subcategories of that category? Or must each subcategory excluded separately? Thanks again!
__________________
X-Cart 4.0.12 Heavy modified with paid, free and forum mods. PHP 5.2.5 | MYSQL 5.0.51a |
|||||||
#4
|
|||||||||
|
|||||||||
![]() I'm just going by the original question in the other thread at http://forum.x-cart.com/showthread.php?t=21990 -
"Anyone know of a way to exclude the products of 1 specified main category (and its subcategories) from ever displaying in randomly generated Recommended Products results?" I have not tried it, so I don't know if it works, but it does make sense that if a main category is excluded that any subcategories of the main category would be excluded also. Another thing to consider is that the thread was from 2006, and the version listed are 4.0.x branches. There may have been changes since then.
__________________
Two Separate X-Cart Stores Version 4.4.4 Gold - X-AOM - Vivid Dreams Aquamarine (modified) - Linux Mods - Newest Products - View All -, and a few others. Numerous upgrades from 4.0.x series. Integrated with Stone Edge Order Manager + POS Version 4.1.12 Gold (fresh install) - X-AOM - Linux Mods - XCSEO free |
|||||||||
#5
|
|||||||
|
|||||||
![]() I've added the code (red text in the bold line) to my recommends.php and it seems to work.
Unfortunately it 'only' excludes the category that is added and not the subcategories from that certain category. Could it do any harm adding all the categories (25+) separately to the recommends and/or slow down the storefront, where the recommends are displayed? All suggestions are very welcomed! Thanks! Code:
__________________
X-Cart 4.0.12 Heavy modified with paid, free and forum mods. PHP 5.2.5 | MYSQL 5.0.51a |
|||||||
![]() |
|
Thread Tools | Search this Thread |
|
|
|
|||
X-Cart forums © 2001-2020
|