Skip Navigation

[Closed] Building a Car Parts Filter System

This support ticket is created 8 years, 6 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

Tagged: 

This topic contains 3 replies, has 2 voices.

Last updated by Minesh 8 years, 6 months ago.

Assisted by: Minesh.

Author
Posts
#340135

I client has asked me to build a database of Car Wheels and Tyres that is searchable/filterable by car make/model/year. I'm sure this is possible with a Views Parametric Search but I'm just trying to iron out the details on how this would be accomplished.

The biggest challenge I can see is matching/linking Product information (wheel size / studs) to compatible car models so that each individual product doesn't need a list of ALL compatible cars to appear in search results.

Thinking this through as I type I would be using WooCommerce products for the Wheels/Tyres Custom Post type and would likely need another custom post type for car models with compatibility info. For example:
- Car Post Title: 2010 Toyota Corolla
Custom Fields:
- Make: Toyota
- Model: Corolla
- Year: 2002
- Wheel Sizes: 15" | 16" | 17" | 18"
- Studs: 5

On the parametric search side it needs to have dropdowns for make/model/year that auto populate from the cars post type and then when searching uses the custom fields from the chosen car post to search through the products post type for matches.

Is this all possible and could you point me in the right direction to set up that parametric search?

#340164

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

As you are going to use parametric search, let me tell you the difference when to use taxonomies and when to use custom fields.

If you need multiple choices with parametric search, For example: multiple choice using checkboxes, then custom taxonomy is better than custom field.

if you need a single choice drop down menu, and all options is pre-defined by yourself, choose custom field, otherwise choose a custom taxonomy.

To integrate parametric search with your site, please refer to the following documentation that may help you:
=> https://toolset.com/documentation/user-guides/getting-started-with-views/projects-parametric-search/
=> https://toolset.com/documentation/user-guides/front-page-filters/

#340166

Hi Minesh,

I understand how to build a basic parametric search as described in the documentation however this scenario is more complex because the user needs to select one post type in the filter but the results need to be from another post type based on matching custom field data.

Example Scenario Below:

Filter Fields:
MAKE | MODEL | YEAR

Customer selects:
Toyota | Corolla | 2010

- Views finds the single car post ID matching those custom fields
- Views looks up the custom field values for 'wheel size' & 'bolt pattern' for the car post ID
- Views searches the product post type for posts matching the 'wheel size' & 'bolt pattern' values
- Views displays the resulting product posts to the user

#340178

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

I think you need to establish post relationship between your post types parent/child then its possible to have parametric search. You can not filter directly on post type data which is not associated to views.

Creating post type relationship.
=> https://toolset.com/documentation/user-guides/creating-post-type-relationships/
=> https://toolset.com/documentation/user-guides/displaying-fields-of-parent-pages/
=> https://toolset.com/documentation/user-guides/many-to-many-post-relationship/

Following tutorial may help you:
=> https://toolset.com/2014/06/learn-build-flexible-parametric-searches/

Few reference threads that may also help you:
=> https://toolset.com/forums/topic/parametric-search-filtering-by-intermediaryparent-post-type/
=> https://toolset.com/forums/topic/parametric-search-with-parent-and-child-post-type/

The topic ‘[Closed] Building a Car Parts Filter System’ is closed to new replies.