Advanced Product Metafield Search Filter

wop
New Member
3 0 0

Use Case: Auto Parts:  auto parts can fit several makes, models, and years.

 

Current status: we have product pages with basic part descriptions.  We have also included a metafield table within each product page showing all fitment options.  (make, model, year, etc.)

 

Problem: The current "shop" serach only searches the product title and seems to be limited to single words or exact matches.  we want our buyer to have the ability to use multiple words to find the best match (this is a search of all product titles and the metafield data in each product listing).

 

Example:  a buyer may enter "2016 BMW 550i valve cover"  

Title:

Screen Shot 2022-06-17 at 4.50.51 PM.jpg

Metafield table in each product listing.

Screen Shot 2022-06-17 at 4.11.23 PM.jpg

 

This search concept is based on eBay's multi-word search.  The results are displayed in order based on the relevance of the word match. 
I know this is probably pretty advance, but any help would be greatly appreciated.
Thank you!

 

Replies 5 (5)
MetafieldsGuru
Shopify Partner
156 30 83

Hi @wop ,

 

You're correct, the default Shopify search algorithm is not compatible with metafields. There is a predefined set of the fields that products are being searched/filtered by: name, sku etc. 
I managed to find a couple of similar Shopify support threads; however, none of them seem to have a solution provided by Shopify representatives or merchants who succeeded in resolving this problem: 
1) link
2) link
It appears that the only option to incorporate a metafields-based search/filter is to ask your developer to create a custom JavaScript code to loop through all the products metafields via the Shopify API and additionally filter the search results based on metafields values. 
Check out Metafields Guru, the #1 ranked metafields app.

Bulk editor | Data import/export | Metafield sets | Browser extension
wop
New Member
3 0 0

Thank you for the reply and the advice!   In your opinion where is the best place to find such a developer?

MetafieldsGuru
Shopify Partner
156 30 83

Hi @wop ,

 

To be honest, I’ve never been through this process personally, but usually it’s considered to be a good idea to hire a Shopify expert

Check out Metafields Guru, the #1 ranked metafields app.

Bulk editor | Data import/export | Metafield sets | Browser extension
wop
New Member
3 0 0
Ok, thanks again!
SoBooster
Shopify Partner
36 1 1

Hi,

 

YMM filter with metafields can easily be done with the help of our app https://apps.shopify.com/ultimate-search-filter-year-make-model. The app is new but we have done this to several clients already. You can see a demo store to see if you like it.

 

Basically here are some of the steps we would need from you to make it happen:

 

We use Tags or Metafields to set up YMM solutions. If you have not created any product data for your YMM. I will recommend using metafields as they are easy to manage and have no limits, unlike Shopify tags. If you have created the data with tags - we can work with that as well.

Here is an example of how you will add metafields to each product or variant:
Metafield namespace: global
Metafield key: ymm
Metafield value: Year|Make|Model^^Year|Make|Model. For example 1995|Tesla|S^^1995|Honda|X^^2005|Honda|X

You can add as many YMM's datasets to a product or a variant - each dataset will be delimited with this "^^" and the values will be delimited with "|". Whenever the YMM attached to a product is entered in the search bar, the correct product will be shown as result.