Skip to Content

Catalog

The catalog object represents the product catalog in the store, including products, categories, filters, and SEO information.

Usage Example

{%- comment -%} Show catalog product count and list products {%- endcomment -%} <p>Showing {{ catalog.products_count }} of {{ catalog.all_products_count }} products</p> <ul> {% for product in catalog.products %} <li> <a href="{{ product | link }}">{{ product.title }}</a> {% if product.price %}- {{ product.price | money_with_currency }}{% endif %} </li> {% endfor %} </ul> {%- comment -%} Show active filters {%- endcomment -%} {% if catalog.active_filters %} <div> <strong>Active filters:</strong> <ul> {% for filter in catalog.active_filters %} <li>{{ filter.title }}: {{ filter.value }}</li> {% endfor %} </ul> </div> {% endif %}

Properties

sort_options

Returns possible sort options for catalog.

sort_by

Returns the property this catalog products are currently sorted by.

default_sort_by

Returns the default property this catalog products are sorted by.

sort_by_param

Returns the query parameter name for sorting property.

products_count

Returns the amount of products in the catalog that are currently viewed. Filtering will affect this value.

all_products_count

Returns the total number of products in the store regardless of filtering.

product_groups

Returns the product groups in the catalog.

filters

Returns the available filters for the catalog, null if none is set.

active_filters

Returns the active filters for the catalog, null if none is set.

products

Lists the catalog products products.