Search / Filter for a WooCommerce product using a field from a CPT (Model)
I have 2 CPT Make & Model (in a One to Many relationship) & a Muffler product line in WooCommerce
There is a custom field in Model called Airflow & and attribute in the Muffler product also called Airflow
What I would like to happen:
- User Selects Make via dropdown
- Next dropdown, showing only models for that make, becomes available (like the Real Estate sample)
- User Selects Model via dropdown – Let’s assume this Model has an Airflow of 1000
- Search / Filter Results show only Mufflers with an Airflow =< 1000
Is there any documentation that you are following?
Hello. Thank you for contacting the Toolset support.
Well - the thing is that you can add the custom field filter for custom fields that belong to the post type the view is set to query for.
You should not add custom fields that belong to another post type and query view different post type.
What I would like to happen:
- User Selects Make via dropdown
- Next dropdown, showing only models for that make, becomes available (like the Real Estate sample)
==> Ok. but I need to check how you setup the post relationship.
- User Selects Model via dropdown – Let’s assume this Model has an Airflow of 1000
- Search / Filter Results show only Mufflers with an Airflow =< 1000
==> I need to check what we can do here to achieve your goal but I need to review your setup first.
Can you please share problem URL where you added your view with such Make and Model filter and send me access details.
*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.
I have set the next reply to private which means only you and I have access to it.