Shopify themes, liquid, logos, and UX
I'm using Debut theme and although the Shopify docs say that product tags are searched, they are not included in the predictive search.
Since customers never search just the product title, is there a way to include product tags in the predictive search?
Hi @PurpleMamba,
the predictive search does not include "tag" by default (only "title", "product_type", "variants.title", and "vendor". See section "fields" in documentation).
Also the Debut theme uses an own search configuration to override the default behaviour, but it does also not include the "tag" field yet.
To change this, go to assets/theme.js and look for the "DEFAULT_PREDICTIVE_SEARCH_API_CONFIG" (around line 1372). It should look like this:
var DEFAULT_PREDICTIVE_SEARCH_API_CONFIG = {
resources: {
type: [PredictiveSearch.TYPES.PRODUCT],
options: {
unavailable_products: PredictiveSearch.UNAVAILABLE_PRODUCTS.LAST,
fields: [
PredictiveSearch.FIELDS.TITLE,
PredictiveSearch.FIELDS.VENDOR,
PredictiveSearch.FIELDS.PRODUCT_TYPE,
PredictiveSearch.FIELDS.VARIANTS_TITLE
]
}
}
};
Now add the "tag" (PredictiveSearch.FIELDS.TAG) as searchable field at the bottom. In the end, the whole block should look like this:
var DEFAULT_PREDICTIVE_SEARCH_API_CONFIG = {
resources: {
type: [PredictiveSearch.TYPES.PRODUCT],
options: {
unavailable_products: PredictiveSearch.UNAVAILABLE_PRODUCTS.LAST,
fields: [
PredictiveSearch.FIELDS.TITLE,
PredictiveSearch.FIELDS.VENDOR,
PredictiveSearch.FIELDS.PRODUCT_TYPE,
PredictiveSearch.FIELDS.VARIANTS_TITLE,
PredictiveSearch.FIELDS.TAG
]
}
}
};
Reload your page. Now, the predictive search takes product tags into account.
By the way, I am using Version "17.6.0" of the Debut theme.
User | RANK |
---|---|
164 | |
142 | |
74 | |
68 | |
57 |
Explore the 30-30-30 rule, a dynamic social media strategy for new businesses. Learn how t...
By Trevor Sep 20, 2023Discover how to leverage the often overlooked footer of your ecommerce site to gain custom...
By Skye Sep 15, 2023In this blog, we’ll be shining a light on Shopify Partners, Experts, and Affiliates. Who a...
By Imogen Sep 13, 2023