Reply To: Range slider does't work with array + quotation marks problem

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Range slider does't work with array + quotation marks problem Reply To: Range slider does't work with array + quotation marks problem

#11379

Ernest Marcinko
Keymaster

Hi Federico,

1. In short: it's not possible, and there is no workaround either yet, and I don't think there will be soon.

The main strength of the plugin is to do these kinds of operations on the database level, and since multi-select (and other more complex fields) are stored as serialized variables (or references) in the database – it's no longer a single numeric value, it's treated as a string on database level. So the query basically compares the inputted value to the stored value, which is in this case a string of the serialized arrays.

2. Yes, unfortunately the quotation marks are not treated as accented characters, they are all different from one another. The best possible solution in this case is to simply remove all kinds of quotation marks from the input before the search process, with a custom function.

There is a knowledge base article available on replacing characters in the search phrase here: https://goo.gl/oMdmun
Just replace the $characters variable (line 8) with something like this:

$characters = "‘’“”'\"";

This will clean the search phrase from the quotation marks (and any other character you might specify).

Best,
Ernest Marcinko

If you like my products, don't forget to rate them on codecanyon :)