Author Topic: Custom fields filters  (Read 207 times)

rasalghul

  • Beginner
  • *
  • Posts: 42
Custom fields filters
« on: October 13, 2017, 05:32:02 am »
When using custom filters included in basic template custom fields do this kind of search...

Custom field a= Option 1
Custom field b= Option 2



Search = Option 1 OR Option 2

But I need to change to a search like this

Search = Option 1 & Option 2

How can it be done?

I hope to be clear about my question

Jörgen

  • Global Moderator
  • Full Member
  • *
  • Posts: 1054
    • Kreativ Fotografi
  • VirtueMart Version: 3.0.19.9
Re: Custom fields filters
« Reply #1 on: October 13, 2017, 06:54:05 am »
You don´t say much about versions
http://forum.virtuemart.net/index.php?topic=79799.0

This could probably be solved using multi variant instead of only custom fields.

regards

Jörgen @ Kreativ Fotografi
Joomla 3.6.5
Virtuemart 3.0.19.9
Olympiantheme Hera (customized)

balai

  • 3rd party VirtueMart Developer
  • Full Member
  • *
  • Posts: 1301
Re: Custom fields filters
« Reply #2 on: October 13, 2017, 11:48:46 am »
Which is the template?

Ghost

  • Jr. Member
  • **
  • Posts: 351
Re: Custom fields filters
« Reply #3 on: October 13, 2017, 14:53:02 pm »
You can't do this without core hack or 3rd party custom filter extension.

rasalghul

  • Beginner
  • *
  • Posts: 42
Re: Custom fields filters
« Reply #4 on: October 13, 2017, 20:44:08 pm »
Joomla 3.7.4
Virtuemart 3.2.2

A core hack?
What files do I need to edit?

The are custom fields for a lot of products not only one. The are generic characteristics for Tabletop games, like Number of players, theme, mechanics, etc

jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 26315
  • Always on vacation
    • Jenkin Hill Internet
Re: Custom fields filters
« Reply #5 on: October 13, 2017, 20:56:36 pm »
Core hacks are never recommended. It means that every time you update VM you have to redo the hack. Use a plugin instead.

have a look at this:  https://breakdesigns.net/extensions/joomla/custom-filters

Kelvyn

Jenkin Hill Internet,
Keswick, Lake District

Unsolicited PMs/emails will be ignored.

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Currently using VM3.2.4 on Joomla 3.8 PHP 7.0.23

Testing VM3.2.5.9653 on J!3.8

rasalghul

  • Beginner
  • *
  • Posts: 42
Re: Custom fields filters
« Reply #6 on: October 18, 2017, 04:39:11 am »
Core hacks are never recommended. It means that every time you update VM you have to redo the hack. Use a plugin instead.

have a look at this:  https://breakdesigns.net/extensions/joomla/custom-filters

I can do that... I only need to change that feature...

AND instead of OR conector un that filter.
Do you know wich file I have to edit?

Ghost

  • Jr. Member
  • **
  • Posts: 351
Re: Custom fields filters
« Reply #7 on: October 18, 2017, 09:35:16 am »
/administrator/components/com_virtuemart/models/product.php. But it's not as simple as changing OR to AND. You'll have to think of the full query to make filtering work properly.