Issue
I want to display only products from Shopify products but there are showing also pages and posts here is my code for search result:
<div class="product-list">
{% if grid_results == false %}
{% for item in search.results %}
{% include 'search-result' %}
{% endfor %}
{% else %}
<div class="grid-uniform">
{% for item in search.results %}
{% include 'search-result-grid' %}
{% endfor %}
</div>
{% endif %}
{% endif %}
</div>
Now I got the following code:
{% if item.object_type == 'product' %}
But where to put this code so I can get only products for search any text.
Solution
Shopify has excellent self help guides for most of the stuff. Here's one such
Show only products in storefront search results
Answered By - HymnZzy Answer Checked By - Dawn Plyler (PHPFixing Volunteer)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.