Forums Forums Search & Filter Pro 2 different search forms for woocommerce

Viewing 5 posts - 1 through 5 (of 5 total)
  • Anonymous
    #259532

    Hi,

    I need two different search forms for woocommerce – one that displays on one category and another that displays on another category (there will only be two categories of products). When i setup two woocommerce shop forms i get the following error message:-

    Error: There are 2 Search Forms using display mode WooCommerce Shop – you may only have 1

    How can i achieve my desired setup as i just assumed it would enable me to setup two separate woocommerce search/filter forms and show the correct one depending on what category the user was viewing…

    Thanks

    Anonymous
    #259575

    Basically the two distinct categories have their own unique set of filters – and should only work on the relevant category pages – any help or workarounds would be greatly appreciated

    Thanks

    Trevor
    #259617

    You would need to make one form with all the fields in, and use CSS to hide the fields conditional on the category/taxonomy class names found in the body tag of the pages.

    Anonymous
    #259635

    Hi Trevor,

    Thanks for your prompt response. The problem with that solution is that the form will have to be setup to return products from both categories – and so the returned search results will contain results from the category the user is not currently viewing. Also a few of the taxonomies are shared between the two categories so the counts will be wrong on the ones that are visible – i know i could get around this by using two distinct custom taxonomies for the two categories – but it still doesnt get around the problem of the search results showing results from the other category. So i guess there is no other way around this or no other solution?

    Thanks

    Trevor
    #259677

    If these are product categories, is product category in the form as a field? You could auto detect the category (there is a setting fro that at the bottom of the General settings panel), and if you have Auto Count ON and hide empty in each field set, the non-relevant terms will not show.

    If product category is not wanted in the form, you can also that with CSS.

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