Shopify themes, liquid, logos, and UX
Has anyone found a way to search products by SKU? I've had a look around at previous posts but all I've found is older posts saying it isn't yet possible, is it now possible?
<form class="search" action="/search"> <input type="text" class="collection-searchbar" placeholder="Search by SKU" name="q" value="{{ search.terms | escape }}" /> <input type="submit" value="Search" /> </form>
I tried the tutorial that makes it possible for the storefront search, but I'm trying to get it working for a search form I have in the product collection page.
You can search for a sku using the storefront search.
An example of a working search url is here:
https://jasons-experiments.myshopify.com/search?type=product&q=variants.sku:23200
Notice how the query must be in this format: "variants.sku:23200" where 23200 is the sku code. JavaScript would be needed to make sure the customer is redirected to the correctly formatted url.
Thanks, I followed your tutorial on creating the search.sku.liquid file, I've made that in snippets, just unsure on how to implement it.
{% paginate search.results by 2 %} {% if search.performed %} {% for item in search.results %} <div class="grid__item" style="display: none !important"></div> {% endfor %} {% endif %} {% endpaginate %}
Am I to replace the code above from search.liquid with {{ 'search.sku' }}
I followed the steps in https://github.com/freakdesign/Shopify-code-snippets/tree/master/Search%20by%20SKU
Created a search.sku.liquid file and pasted the code.
search?type=product&q=variants.sku:220202
Am able to see the search result of the product. But, i am unable to route to the result page
when SKU is searched in the search bar.
Please guide me in this.
Thanks in Advance.!
Does this super old code still work? I do not get it. Help please. Need to SKU search in 2022 for Dawn theme.
If you are open to a 3rd party app, this app allows you to search by product title, description, sku, barcode, option, metafield, collection and pages: https://apps.shopify.com/ultimate-search-and-filter-1
Simply, you have to add your SKU into Product search enhancement METAFIELD created default BY SEARCH & CONSOLE APP
It work fine without any custom code or theme modification. Function great with any theme
Starting a B2B store is a big undertaking that requires careful planning and execution. W...
By JasonH Sep 23, 2024By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024