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 |
---|---|
228 | |
174 | |
65 | |
52 | |
48 |
On our Shopify Expert Marketplace, you can find many trusted third party developers and fr...
By Arno Nov 27, 2023You've downloaded the Search & Discovery app from the Shopify App store, and as you're ...
By Skye Nov 8, 2023The year-end shopping season is just around the corner. Is a flash sale on your radar? Are...
By Jasonh Nov 6, 2023