All things Shopify and commerce
I have recently started managing a shopify site and it is currently not possible to search for products.
Do we need to add a 3rd party solution to the site to enable this functionality or is it possible to link products to the search function within the online store?
Thank you
Hey @LukeBTDC Could you please give your website URL? It will make it much easier for me to address your problem.
Hey @LukeBTDC It seems "products are not included" in the search functionality. if you search for articles and pages then it will surely provide you the search result. I can fix this can you please share me the code for search bar , the file will be starting with "search" keyword.
Thanks
Yep code problem
Hi Zeel, is this the correct code? I copied from search.json
{
"wrapper": "div.collection-wrapper",
"sections": {
"search_header": {
"type": "template--search-header",
"settings": {
}
},
"main": {
"type": "template--search",
"blocks": {
"grid-card-title": {
"type": "grid-card-title",
"settings": {
}
},
"grid-card-price": {
"type": "grid-card-price",
"settings": {
}
},
"grid-card-swatches": {
"type": "grid-card-swatches",
"settings": {
}
}
},
"block_order": [
"grid-card-title",
"grid-card-price",
"grid-card-swatches"
],
"settings": {
}
}
},
"order": [
"search_header",
"main"
]
}
Hey @LukeBTDC It will be ".liquid" file not a ".json".
Thanks.
Hi Zeel, i copied this from search.scapp.products.liquid
{% layout none %}
{% capture results %}
{% paginate search.results by 6 %}
{% for item in search.results %}
{% assign product = item %}
{
"product" : {{ product | json }},
"id":{{ product.id | json }},
"price":{%if product.compare_at_price %} {{product.compare_at_price | json }} {% else %} {{product.price | json }} {% endif %} ,
"title":{{ product.title | json }},
"product_type":{{ product.product_type | json }},
"vendor":{{ product.vendor | json }},
"handle":{{ product.handle | json }},
"variants":{{ product.variants | json }},
"url":{{ product.url | within: product.collections.last | json }},
"thumbnail":{{ product.featured_image.src | product_img_url: 'thumb' | json }}
}
{% unless forloop.last %},{% endunless %}
{% endfor %}
{% endpaginate %}
{% endcapture %}
searchCallback({
"results_count":{{ search.results_count }},
"results":[{{ results }}]
});
@LukeBTDC Hope you are doing well.
The query for the search is wrong. when we add the text in the search bar and enter for search it looks like the products in pages. that's why the products are not showing in search.
Your search query will be look like this: https://thedoorcompanyuk.co.uk/search?q=door
Discover how to increase customer engagement on your store with articles from Shopify A...
By Jacqui Apr 23, 2025Hey Community 👋 Did you know that March 15th is National Everything You Think Is W...
By JasonH Apr 1, 2025Discover how to increase the efficiency of commerce operations with Shopify Academy's l...
By Jacqui Mar 26, 2025