Support Forums

Looking for support? You can access the support system via your account.

Forums Forums Search & Filter Pro Can two fields interact with each other?

Tagged: 

Viewing 10 posts - 1 through 10 (of 11 total)
  • Markus Bergman
    #274784

    Hi. I’m working on creating a page in Elementor where the user can filter between different categories and different brands. I have all the different filters in place, however I want to display the brand-filter in a different way to the product-filter.

    I created one search form that contains both the brand- and the productfilter, and I am using two widgets and hiding the selectors that I dont need via css. However, now I would like it so that if a user searches for a brand (widget Y), only the products that correspond to the selected brand will show up in widget Y.

    For example, if the user wants search for only “Apple” products, he or she presses that filter. Now, all products that dont correspond to this should be hidden in widget. I tried playing around with the different search operators but I cant seem to make it work.

    Any suggestioons? I understand if I’m trying to create something impossible here and I don’t want you to waste your time. If it doesn’t work you don’t need to waste your time explaining wby. I will post my page down below in a private reply

    Markus Bergman
    #274785
    This reply has been marked as private.
    Trevor Moderator
    #274795

    This will change with V3 (due in a few months), but, for now, when referring to the results page, having a cloned/duplicated form (having more than one instance of the same form), or multiple different forms, will potentially be an issue, as doing this can mean that they don’t work together and often will conflict with each other. Just be aware that this is possible (likely), so if you have problems with the results not working, that might be why. Normally, we suggest only one form instance on the results page.

    You CAN have more than one form on any page other than the results page.

    What V3 will also bring is the ability to have a form on the page, but split it up to different parts of the page.

    Also, again what I can see, You are using ‘Product Category’ many times in the form.

    You need to separate out groups of terms into separate custom taxonomies. In general, you can use a particular Taxonomy, such as Tags, (or Category, each Custom Taxonomy and each Custom Field) only once in the form. This post tries to explain this a bit better (you can use a plugin to switch category terms from category to any new taxonomy that you make, so it is not so hard to do). It is a really awful preachy lecture I wrote:

    https://support.searchandfilter.com/forums/topic/multiple-categories-combination/#post-55166

    Sorry about the tone, but the message is right and it links to good plugins (except taxonomy switcher I think).

    Markus Bergman
    #274898
    This reply has been marked as private.
    Trevor Moderator
    #275042

    The form is searching both products and product sets.

    In a product, is there a custom field which indicates which product set it is a member of? I ask, because I expect to see this as a search field in the form.

    You only want to show products in the results, yes?

    Markus Bergman
    #275137

    Alright. I really don’t know about that. I’ve been looking around but I cant find anything. I sent a mail to datafeedr and will update you on the issue.

    I don’t really understand why its not advised to use “Product category” as I did earlier though? It seemed to be working fine, although I didn’t troubleshoot it enough to see if there were any major issues – i mostly focused on the appearance.

    Trevor Moderator
    #275190

    In the current version of our plugin, and this will change when V3 is released in a few months (I have no date yet), our code is looking for one source instance to one field. Where it finds the same source instance (in this case Product Category) used in more than one field, it cannot handle the fields being set differently (different selections, or no selection) as it cannot combine the settings. Many odd things happen as a result. Usually, selections become unset or ignored.

    Markus Bergman
    #275929

    Hi Trevor. I’m still working on this, can you please clarify what you mean with when you said “each custom field”? Is that different from taxonomy?

    Regards,

    Trevor Moderator
    #275931

    Yes, custom fields are different from taxonomies. Here is a link that (hopefully) explains what a custom field is:

    https://www.wpbeginner.com/glossary/custom-fields/

    A lot of users have a (free) plugin named Advanced Custom Fields to make these.

    Please not that here in the UK today is a national holiday, so replies are likely to be delayed.

    Markus Bergman
    #275933

    Also, I’ve set taxonomies to the product sets and that just made this happen: https://gyazo.com/0c451e87fa8b5297daa91f23e934e24f

    It shows the products sets (only included 144 + 240 here) rather than the products in the product sets. And since that is not an actual product nothing shows up in the field.

    So this is my plan.. I want your feedback on if you think this would be the right way of going or if it wouldn’t even work. I’m going to hire someone with a good php knowledge from Upwork and have them make a custom solution in which all the product in a product set would be applied a certain taxonomy upon import. Datafeedr has some documentation regarding this, so I just need to know that if what I suggest would be doable – would it work with S&F? Since you mention “each custom taxonomy” earlier, I assume it would – I just want to make sure.

Viewing 10 posts - 1 through 10 (of 11 total)

You must be logged in to reply to this topic.