Advertisement:

Author Topic: Exclude category from results search ajax autocomplete  (Read 511 times)

galaxypower

  • Newbie
  • *
  • Posts: 8
Re: Exclude category from results search ajax autocomplete
« Reply #30 on: July 15, 2019, 09:56:57 am »
The final line should look like this: WHERE d.fk_c_locale_code = '" . osc_current_user_locale() . "' AND (s_title LIKE '%" . $pattern . "%' OR s_description LIKE '%" . $pattern . "%') AND i.fk_i_category_id NOT IN (1,2,3,4)


this should work, did you try it ?

leuname07

  • Newbie
  • *
  • Posts: 33
Re: Exclude category from results search ajax autocomplete
« Reply #31 on: July 15, 2019, 11:20:17 pm »
Hello,

No, it's doesn't work. No "results" in adult category !

Thank you for your help...

WEBmods

  • Hero Member
  • *****
  • Posts: 837
  • aka patrickFromCroatia | Osclass Dev Services
Re: Exclude category from results search ajax autocomplete
« Reply #32 on: July 15, 2019, 11:36:31 pm »
I tested 'osc_search_category_id()[0]' function on search page of Veronika theme and it does return category ID. There is a problem somewhere else that I still didn't found.

Regards.

leuname07

  • Newbie
  • *
  • Posts: 33
Re: Exclude category from results search ajax autocomplete
« Reply #33 on: July 17, 2019, 06:53:18 pm »
Any news, solutions ? Thanks for your help.