Forums Forums Search & Filter Pro Get Product Categories based on Custom Taxonomy Selection

Viewing 9 posts - 1 through 9 (of 9 total)
  • Anonymous
    #42207

    Hi Team,

    In S&F Form, I have two filters
    1. Custom Taxonomy as Hobbies
    2. Product Categories.

    When user selects any hobby e.g Photography then the S&F Form shows all products under photography hobby. Further if user selects Greeting cards then the user is shown all greeting cards under photography hobby.

    All things works fine as expected but now since number of categories in my website has increased I am looking to cut down on number of product categories shown in S&F Form.

    Is the below mentioned hack possible?
    When User selects a Hobby (e.g Photography) then S&F form only shows the categories that have products under Photography hobby?
    and vice a versa.

    Trevor
    #42231

    This should work if, in the General settings you have Auto Count enabled (which is OK to use unless you have many, many thousands of posts) and in each form element you have set them to hide empty values.

    Anonymous
    #42394

    I think I was not quite clear in explaining my issue.

    I have checked hide the empty values in each form elements. So whenever any taxonomy is empty it doesnt shown up in the drop down section of the form.

    What I really want is
    Instead of just pre-populating all the non empty product categories. Can the S&F just load the product categories for which the hobby (custom taxonomy) matches.

    take a look at http://www.hobbygiri.com/shop/

    Here, when I select hobby “Bikes”, then when the page reloads, the product categories dropdown should only contain the product categories for the products which match the hobby taxonomy – Bikes.

    Right now, all the dropdowns (search elements) in the S&F work independently.

    Let me know if I am clear this time.

    Trevor
    #42411

    Nice looking site 🙂 Clean. I LIKE that.

    Can you send me a private reply with a login url, an admin username and password, and I will look to find the problem for you?

    Anonymous
    #42513
    This reply has been marked as private.
    Trevor
    #42515

    Got that. Message received. BE CAREFUL – DO NOT BREAK ANYTHING. It is getting late here and I need to stop for the day, so I will get on this in the morning. Get and make a WordPress backup!!

    Trevor
    #42598

    Ok

    I enabled auto count and update the form. I have enabled Ajax and set the results container and pagination. See if it looks OK now?

    Anonymous
    #42681

    Hi Trevor,

    I checked the changes made by you.
    Its EXACTLY they way I wanted. I am overwhelmed seeing the results.

    Ajax pagination also works fine, its just that results text doesnt get updated with the new results (I think thats a theme issue)

    Anyways I am not using AJAX. And when loading it this way the result text shows correct numbers.

    Lastly, I believe just by enabling auto count, all the filters work together and hide out whichever is empty.(I should have figured this out earlier. Its better late than never).

    The S&F filter on our website is the main feature and with this update, its will be so much easier for users to find their right products.

    Thank you once again. I will highly recommend S&F plugin to anyone who uses wordpress.

    Trevor
    #42683

    Thank you. Can I mark this as resolved and close the thread?

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