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

active_filters

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

all_products_count

Returns the total amount of products in the store.

categories

Returns the product groups in the catalog.

default_sort_by

Returns the default property this catalog’s products are sorted by.

filters

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

products

Lists the catalog products.

products_count

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

seo_description

Returns description for search engines.

seo_keywords

Returns keywords for search engines.

seo_title

Returns title for search engines.

sort_by

Returns the property this catalog’s products are currently sorted by.

sort_by_param

Returns the query parameter name for sorting property.

sort_options

Returns possible sort options for the catalog.

Last updated on