Search

{% comment %} The {{ content_for_header }} in theme.liquid will output the following stylesheet just for this page: - It has a few helpers in there, but this theme writes its own styles so there are no dependencies or conflicts. You can ignore that file. Return only products or pages in results: - http://docs.shopify.com/manual/configuration/store-customization/return-only-product-in-storefront-search-results - Or manually add type=product or type=page to the search URL as a parameter {% endcomment %}
{% if search.performed %} {% comment %} Avoid accessing search.results before the opening paginate tag. If you do, the pagination of results will be broken. {% endcomment %} {% paginate search.results by 10 %} {% comment %} We don't have any results to show. Feel free to show off featured products or suggested searches here. {% endcomment %} {% if search.results_count == 0 %}

{{ 'general.search.no_results_html' | t: terms: search.terms }}

{% include 'search-bar' %} {% else %}

{{ 'general.search.results_for_html' | t: terms: search.terms }}

{% include 'search-bar' %}
{% for item in search.results %} {% include 'search-result' %} {% endfor %}
{% endif %} {% if paginate.pages > 1 %}
{% include 'pagination-custom' %}
{% endif %} {% endpaginate %} {% else %} {% comment %} If search.performed is false, someone either accessed the page without the q parameter, or it was blank. Be sure to show a search form here, along with anything else you want to showcase. {% endcomment %}

{{ 'general.search.title' | t }}

{% include 'search-bar' %} {% endif %}