I need to turn the predictive search off. When i search sku 303001 for example, many other skus show up. I need it to only show the sku that is searched up
Giving possible results for the user to pick from to disambiguate is what search is generally so your gonna have to do some customizations.
Multiple results for a number should be due to having SKUs as part of the product.title itself since SKUs are not listed as supporting typo tolerance (reference). You could test this by creating some products without SKUs in any of the supported fields of typo tolerance.
To do exact matches that’s either via a phrase search or a specific fields search (variant.sku)
- https://help.shopify.com/en/manual/online-store/storefront-search#:~:text=with%20%22artichoke%20hea%22.-,Phrase%20search,-Placing%20a%20search
- https://help.shopify.com/en/manual/online-store/storefront-search#:~:text=hearts%20of%20artichoke%22.-,Searching%20specific%20fields,-Add%20a%20field
Achieved either by customers knowing the syntax (unlikely), or by modifying the search input to behave like that.
Search UX -
It’s preferable exact matching is either a separate search input, or a choosable option at time of search as an advanced customization.
Because if exact matching is the default behavior for ALL searches that will be a poor experience for anyone NOT searching for sku’s.
This is why for exact 1 to 1 search situation on some sites there will be a separate thing like SKU lookup page,etc.
Keep in mind any implementation is still searching under the hood you just have to insert extra logic to do an exact match and/or display only that.
https://shopify.dev/docs/api/ajax/reference/predictive-search
https://shopify.dev/docs/themes/navigation-search/search
If you need this customization explored contact me by mail for services.
Please always provide context, examples: store url, theme name, post url(s) , or any further detail.
Contact Info in signature.
Thanks for the info but this did not help.
Hi @OEMIndustries ,
Step 1: Go to your theme and click Edit code
Step 2: Find css file
Step 3: Add code in css file
.search__results .item-result:not(:first-child) {
display: none;
}
Hope it helps @OEMIndustries !
that simply hid every search in my search bar