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”
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!
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:
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.
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.
We can do YMM with any fields except Product Title and Description. You would not need to convert your existing data to Metafields. Please email support@sobooster.com for more info.