Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

excluding 1 cat. of products from Recommended Prod's results

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 05-22-2006, 01:29 PM
 
wertzwerth wertzwerth is offline
 

Member
  
Join Date: Jan 2006
Posts: 13
 

Default excluding 1 cat. of products from Recommended Prod's results

Hi All,

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 appreciate any input on how to go about this --thanks.
__________________
X-Cart version: 4.0.17
Reply With Quote
  #2  
Old 06-01-2006, 05:58 PM
 
wertzwerth wertzwerth is offline
 

Member
  
Join Date: Jan 2006
Posts: 13
 

Default answer here

Someone outside of these forums was gracious enough to point me in the right direction, so here's the answer:

Open up recommends.php, then find the line that starts:

Code:
$products_id = func_query("SELECT $sql_tbl[products].productid FROM....

Then, further on that same line, I added the following (in bold text):

...AND $sql_tbl[categories].categoryid = $sql_tbl[products_categories].categoryid AND $sql_tbl[categories].avail = 'Y' AND $sql_tbl[categories].categoryid != xxx AND $sql_tbl[categories].membership IN...

^xxx being the category id you want to exclude from the recommended products results.

Cheers
__________________
X-Cart version: 4.0.17
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 02:17 AM.

   

 
X-Cart forums © 2001-2020