Author Topic: Excludes some categories from search?  (Read 1396 times)

virtueb

  • Beginner
  • *
  • Posts: 43
Excludes some categories from search?
« on: May 19, 2017, 12:25:02 pm »
Is there possible to exclude some categories from search? Or to setup only categories which should be searched?

hellorain

  • Jr. Member
  • **
  • Posts: 94
    • Raincreatives - Virtuemart & Mobile Commerce Experts
  • Skype Name: support.raincreatives
Re: Excludes some categories from search?
« Reply #1 on: July 16, 2017, 14:45:55 pm »
Hello,

Yes, it can be done. But  From which Search you want to exclude categories?
Any specfic module?

Best Regards,
hellorain.
Raincreatives - Virtuemart & Mobile Commerce Experts

jabba

  • Beginner
  • *
  • Posts: 35
    • Pixed - Web Store Assistance
Re: Excludes some categories from search?
« Reply #2 on: June 02, 2018, 13:15:30 pm »
Hello, i'm interested in this too but there is no answer yet.

I have the standard virtuemart search module and i need it to look in ALL categories EXCEPT the categories with ids X, Y and Z

Is this possible? How?

Thank you!
Gianluca Gabella - CEO & Web Developer @ Pixed s.n.c.b - www.pixed.it

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 3244
  • Joomla & Virtuemart addon developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3.0.x.y
Re: Excludes some categories from search?
« Reply #3 on: June 02, 2018, 23:04:23 pm »
The solution i know :
- add a plugin to override product model to get declared categories to disable from plugin settings
- hack the core product model(bad solution)
- write own search module and result component(or plugin), so you can add parameters in module, in case you need to disable categories only in some cases.

jabba

  • Beginner
  • *
  • Posts: 35
    • Pixed - Web Store Assistance
Re: Excludes some categories from search?
« Reply #4 on: June 05, 2018, 19:43:36 pm »
Thank you for the answers. It's a very small site with no e-commerce (catalog only). Where can i hack the core? As i can see it's the fastest and easy way to achieve this. Then i will re-write the hack every virtuemart update.
Thank you!
Gianluca Gabella - CEO & Web Developer @ Pixed s.n.c.b - www.pixed.it

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 3244
  • Joomla & Virtuemart addon developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3.0.x.y
Re: Excludes some categories from search?
« Reply #5 on: June 06, 2018, 00:19:28 am »
YOu have to modify the virtuemart product model  JOOMLA\administrator\components\com_virtuemart\models\product.php
and modify the sortSearchListQuery query to exclude product in categories(but only on searhc in front).
If you dont know mysql+php, it's not so easy to do.

jabba

  • Beginner
  • *
  • Posts: 35
    • Pixed - Web Store Assistance
Re: Excludes some categories from search?
« Reply #6 on: June 08, 2018, 10:23:31 am »
Thank you for your answer, i can handle php/mysql, just needed to know the file to modify. Thank you!
Gianluca
Gianluca Gabella - CEO & Web Developer @ Pixed s.n.c.b - www.pixed.it