Using custom field checkboxes as a search setting

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Using custom field checkboxes as a search setting

This topic contains 12 replies, has 2 voices, and was last updated by

 
Keymaster
2 years, 9 months ago.

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #21664

    Participant

    Hi,

    First, I want to say thank you for this awesome plugin. It’s high quality and customizing options are simply awesome. I tried your free version for 10 minutes and bought the Pro version. Thank you.

    I’m using the ASP plugin together with the Business Directory Plugin. I’ve added some custom form fields there and one of them is a checkbox field where the business owners can mark their business as “Open on saturdays” or “Open in the evening”.

    Now I’m struggling how to add the checkboxes as a search filter/option. I tried to add the custom field there and added the checkbox values. I tried adding the checkboxes both manually and automatically with the {get_values} variable. The get_values also returns options it shouldn’t (empty row, Checkbox1 value, Checkbox1 value+Checkbox2 value, Checkbox2 value), you can see it yourself at the search form.

    The filter doesn’t work, the search returns the same results as with the keyword search. Is there some trick I didn’t notice?

    I created the admin user account for wordpress, I attached the login details above. Btw, you can find this custom field at Directory Admin -> Manage Form Fields -> ID: 70.

    #21667

    Hi,

    Thank you very much for your kind words, I really appreciate them.

    I think you have just discovered a new issue, that we never seen before. Your configuration seems perfectly fine, the {get_values} also seem to work okay – it prints out all the possible values as stored. The solution will be to simply enter the values manually, but that is not the problem here.

    I noticed, that the field name contains bracket symbols, and I got suspcicios, that it might cause a problem with how the values are passed along from the search form to the back-end. Brackets are also used in form elements, so I guess that must be the issue there, as I cannot see it passed along with the request.

    Can you add temporary FTP details to your ticket? I would like to degug through the code, to see how those values are passed, and make a correction where neccessary. I will also investigate this locally until then.
    I already made a debug change to one of the files via the plugin editor, but I would rather prefer using (s)FTP if possible, as it is much safer and faster.

    Thank you!

    Best,
    Ernest Marcinko

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


    #21669

    Participant
    You cannot access this content.
    #21670

    Hi Miikka,

    Thank you very much, I think I managed to correct the issue, I had to make changes to multiple files.

    I will make sure to include this fix in the upcoming release, so you don’t have to worry about it. I will investigate this further on my local test servers just to be sure.
    I also made a tiny change to the filter values, I entered them manually, they seem to be working okay now.

    Best,
    Ernest Marcinko

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


    #21671

    Participant

    Thank you! Awesome support here!

    However, I will post one more private reply for one small issue I think there still is, just let me know if that’s the expected behaviour of the search logic or not.

    Miikka

    #21673

    Participant
    You cannot access this content.
    #21675

    Hi Miikka,

    Yes, that is intentional by default. You can however change that, so that both checkboxes has to match, like so: https://i.imgur.com/JVz38kM.png
    That should do the trick.

    Best,
    Ernest Marcinko

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


    #21685

    Participant

    Hi again,

    Is it possible there’s a same issue with the Categories filter? I added two different taxonomies, another is working and another does not affect on the results. You can check it with the same login details, it’s the shorter taxonomy which has the problem.

    #21688

    Hi,

    It depends on the expectations. By default, the plugin will treat unchecked taxonomy checkboxes as exclusions, and the rest must match – however categories, that are not present in the filter are not affected. Posts that are not associated with a category are also not affected.

    You can change all of these under the Frontend Search Settings ->Advanced option panel: https://i.imgur.com/aXIa179.png
    I highlighted the two main options, that you should try experimenting with. Try changing them, and then use the preview window to so how it’s different, one configuration will definitely work as you expecting it to.

    Best,
    Ernest Marcinko

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


    #22057

    Participant

    Hi again,

    I’ve now been struggling with this issue I mentioned on my last post. I tried the tricks you mentioned but the taxonomies filters still don’t work perfectly.

    Another option filters the results exactly as they should but another still returns all results, as they were not filtered at all. I attached a screenshot, it’s easier to explain that way. The login details are still the same if needed.

    Attachments:
    You must be logged in to view attached files.
    #22073
    You cannot access this content. Best,
    Ernest Marcinko

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


    #22080

    Participant

    Hi,

    sorry, the admin account is now working again. Didn’t remember I deleted it at some point.

    #22082

    Thank you very much, it works now. I tried a few searches, but I think it’s working as expected, although I am still not sure if this is how you expect it.

    For example, I tried searching ‘autoasi’ without changing the filters:
    – Results: https://i.imgur.com/uCXGRqC.png
    – Results when unchecked: https://i.imgur.com/mRBbuD1.png

    If you only want results from the selected taxonomies exclusively, then try chaning this option: https://i.imgur.com/y6NlJFy.png
    I am not sure if that is what you are looking for.

    Best,
    Ernest Marcinko

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


Viewing 13 posts - 1 through 13 (of 13 total)

You must be logged in to reply to this topic.