Search


<!-- /snippets/search-bar.liquid -->
{% comment %}

A snippet to include a search bar anywhere in your theme.
Note we are using 'input-group' for the layout. Look under Forms > Input Groups for some demos.

More information:
- http://docs.shopify.com/themes/liquid-variables/search

To return only products in results:
- http://docs.shopify.com/manual/configuration/store-customization/return-only-product-in-storefront-search-results
- Or manually add type=product to the search URL as a query parameter
- Uncomment hidden input with value="product" below

{% endcomment %}

{% comment %}
Set the default button style if not defined
{% endcomment %}
{% unless search_btn_style %}
{% assign search_btn_style = 'btn--secondary' %}
{% endunless %}

<form action="{{ routes.search_url }}" method="get" class="input-group search-bar {{ search_bar_location }}" role="search">
{% comment %}<input type="hidden" name="type" value="product">{% endcomment %}
<input type="search" name="q" value="{{ search.terms | escape }}" placeholder="{{ 'general.search.placeholder' | t }}" class="input-group-field" aria-label="{{ 'general.search.placeholder' | t }}">
<span class="input-group-btn">
<button type="submit" class="{{ search_btn_style }} icon-fallback-text">
<span class="icon icon-search" aria-hidden="true"></span>
<span class="fallback-text">{{ 'general.search.submit' | t }}</span>
</button>
</span>
</form>