Product Group
The product_group object represents a product group in the store, including its products, filters, and SEO information.
Usage Example
{%- comment -%} Show product group title, description, and list products {%- endcomment -%}
<h1>{{ product_group.title }}</h1>
<p>{{ product_group.description }}</p>
<p>Showing {{ product_group.products_count }} of {{ product_group.all_products_count }} products</p>
<ul>
{% for product in product_group.products %}
<li><a href="{{ product | link }}">{{ product.title }}</a></li>
{% endfor %}
</ul>Properties
current
Tells whether this category is currently active.
child_current
Tells whether any of this category children is currently active
sort_options
Returns possible sort options for this category.
sort_by
Returns the property this category is currently sorted by.
default_sort_by
Returns the default property this category is sorted by.
sort_by_param
Returns the query parameter name for sorting property.
products_count
Returns the amount of products in this product group that are currently viewed. Filtering will affect this value.
all_products_count
Returns the total number of products in this product group, regardless of filtering.
seo_description
Returns the SEO meta description for this product group, used by search engines.
seo_title
Returns the SEO meta title for this product group, used by search engines.
seo_keywords
Returns the SEO meta keywords for this product group, used by search engines.
id
Returns the unique identifier for this product group.
title
Returns the display name/title of this product group.
handle
Returns the handle (unique string or id) for this product group, used for referencing in URLs or APIs.
description
Returns the HTML-formatted description of this product group, suitable for display in the storefront.
image
Returns the image URL for this product group, if set.
product_groups
Returns the child product groups (subcategories) for this product group.
has_parent
Indicates if this product group has a parent group.
parent
Retrieves the parent product group if it exists, otherwise returns false.
breadcrumbs
Returns the breadcrumb trail (list of parent product groups) for this product group.
filters
Returns the available filters for this product group, or null if none are set.
active_filters
Returns the active filters for this product group, null if none is set.
products
Lists product group products.