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
active_filters
Returns the active filters for this product group, or null if none is set.
all_products_count
Returns the total amount of products in this product group.
breadcrumbs
Prints product group breadcrumbs.
categories
Returns the child product groups for this product group.
child_current
Returns true if any of this product group’s children is currently active.
current
Returns true if this product group is currently active.
default_sort_by
Returns the default property this product group is sorted by.
description
Returns the product group description.
filters
Returns the available filters for this product group, or null if none is set.
handle
Returns the handle for this product group.
has_parent
Returns true if this product group has a parent, false otherwise.
id
Returns the product group id.
image
Returns the product group image if set.
parent
Retrieves the parent product group if it exists, returns false otherwise.
products
Lists product group products.
products_count
Returns the amount of products in this product group 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 product group is currently sorted by.
sort_by_param
Returns the query parameter name for sorting property.
sort_options
Returns possible sort options for this product group.
title
Returns the product group title.