{% comment %} Use page name from Custo if it's been customized, otherwise use the localized default. {% endcomment %} {% assign page_title = t['navigation.products'] %} {% if page.full_url contains "search=" %} {% assign page_title = t['products.search_results'] %} {% elsif page.name != 'Products' %} {% assign page_title = page.name %} {% endif %}

{{ page_title }}

{% paginate products from products.current by theme.products_per_page %} {% 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 = t['products.on_sale'] %} {% endif %} {% when 'sold-out' %} {% assign product_status = t['products.sold_out'] %} {% when 'coming-soon' %} {% assign product_status = t['products.coming_soon'] %} {% endcase %} {% capture status_class %}{% if product.status == 'active' and product.on_sale %}status-primary{% else %}status-secondary{% endif %}{% endcapture %}
{% if product.images[1] != blank and theme.secondary_image_on_hover == true %} {% 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 %} {% endif %} {% if product_status != blank %}
{{ product_status }}
{% endif %}
{{ product.name }}
{% assign hide_price = false %} {% if product.status == 'sold-out' and theme.show_sold_out_product_prices == false %} {% assign hide_price = true %} {% endif -%} {% if product.status == 'coming-soon' and theme.show_coming_soon_product_prices == false %} {% assign hide_price = true %} {% endif %} {% if product.has_password_protection and theme.show_password_protected_product_prices == false %} {% assign hide_price = true %} {% endif %} {% unless hide_price %} {{ product | product_price: theme.money_format, theme.product_variable_pricing_display_format }} {% if product.price_suffix != blank %} {% assign variable_price_shown = true %} {% if theme.product_variable_pricing_display_format == "min_only" or theme.product_variable_pricing_display_format == "max_only" %} {% assign variable_price_shown = false %} {% endif %} {% if product.variable_pricing and variable_price_shown %} {% assign formatted_suffix = '(' | append: product.price_suffix | append: ')' %} {% else %} {% assign formatted_suffix = product.price_suffix %} {% endif %} {{ formatted_suffix }} {% endif %} {% endunless %}
{% unless hide_price %} {% if product.options.size > 1 and theme.show_product_variant_count_in_grid %}
{{ product.options.size }} {{ t['products.variants'] }}
{% endif %} {% endunless %}
{% endfor %}
{% if paginate.pages > 1 %} {% if paginate.previous.is_link %} {{ t['navigation.previous'] }} {% else %} {{ t['navigation.previous'] }} {% endif %} {{ paginate | default_pagination, 'page-numbers', 'page-numbers' }} {% if paginate.next.is_link %} {{ t['navigation.next'] }} {% else %} {{ t['navigation.next'] }} {% endif %} {% endif %} {% else %}
{{ t['products.no_products'] }}
{% endif %} {% endpaginate %}