{% assign pageQuerystring = page.full_url | split:'sort=' | last %} {% assign pageURL = page.full_url | split:'?' | first %} {% if pageQuerystring contains 'on_sale' %} {% assign sort_order = 'on_sale' %} {% assign sort_order_name = 'On sale' %} {% elsif pageQuerystring contains 'sales' %} {% assign sort_order = 'sales' %} {% assign sort_order_name = 'Top selling' %} {% elsif pageQuerystring contains 'name_a_to_z' %} {% assign sort_order = 'name_a_to_z' %} {% assign sort_order_name = 'Alphabetically (A to Z)' %} {% elsif pageQuerystring contains 'name_z_to_a' %} {% assign sort_order = 'name_z_to_a' %} {% assign sort_order_name = 'Alphabetically (Z to A)' %} {% elsif pageQuerystring contains 'date_new_to_old' %} {% assign sort_order = 'date_new_to_old' %} {% assign sort_order_name = 'Date (new to old)' %} {% elsif pageQuerystring contains 'date_old_to_new' %} {% assign sort_order = 'date_old_to_new' %} {% assign sort_order_name = 'Date (old to new)' %} {% elsif pageQuerystring contains 'price_low_to_high' %} {% assign sort_order = 'price_low_to_high' %} {% assign sort_order_name = 'Price (low to high)' %} {% elsif pageQuerystring contains 'price_high_to_low' %} {% assign sort_order = 'price_high_to_low' %} {% assign sort_order_name = 'Price (high to low)' %} {% else %} {% assign sort_order = '' %} {% assign sort_order_name = 'Featured' %} {% endif %}

{% if page.full_url contains 'search=' %}Product Search{% else %}{% if page.name == 'Products' %}All Products{% else %}{{ page.name }}{% endif %}{% endif %}

{% paginate products from products.current by theme.products_per_page order: sort_order %} {% if products != blank %}
{% for product in products %} {% assign image_width = product.image.width | times: 1.0 %} {% assign image_height = product.image.height | times: 1.0 %} {% assign aspect_ratio = image_width | divided_by: image_height %} {% assign product_status = '' %} {% case product.status %} {% when 'active' %} {% if product.on_sale %}{% assign product_status = 'On sale' %}{% endif %} {% when 'sold-out' %} {% assign product_status = 'Sold out' %} {% when 'coming-soon' %} {% assign product_status = 'Coming soon' %} {% endcase %} {% capture image_class %} {% if product.image.height > product.image.width %} image-tall {% elsif product.image.height < product.image.width %} image-wide {% else %} image-square {% endif %} {% endcapture %}
{% if product_status != blank and theme.product_badge_style != 'inline' %}
{{ product_status }}
{% endif %} {% if theme.show_quickview %}
Quick View
{% endif %}
{{ product.name }}
{% if product.variable_pricing %} {{ product.min_price | money: theme.money_format }} - {{ product.max_price | money: theme.money_format }} {% else %} {{ product.default_price | money: theme.money_format }} {% endif %}
{% if product_status != blank and theme.product_badge_style == 'inline' %}
{{ product_status }}
{% endif %} {% if theme.show_quickview and theme.mobile_product_grid_style == 'horizontal' %}
Quick View
{% endif %}
{% endfor %}
{% if paginate.pages > 1 %} {% endif %} {% else %}
No products found.
Looks like there isn't anything here.
{% endif %} {% endpaginate %}