collection
A collection in a store.
To get the collection's metafields, use the get_metafields filter.
Properties
Indicates the total quantity of all products in the product collection. The total count includes items that have been filtered out by the current filter criteria.
To get the number of products displayed on the current page, namely the actual visible product count after filters are applied, use collection.products_count.
All of the tags applied to the products in the collection.
This includes tags for products that have been filtered out of the current view. A maximum of 1,000 tags can be returned.
To display the tags that are currently applied, use collection.tags.
All of the product types in a collection.
All of the product vendors in a collection.
The product type on a product type collection page.
You can query for products of a certain type at the /collections/types URL with a query parameter in the format of ?q=[type], where [type] is your desired product type.
The query value is case-insensitive, so shirts is equivalent to Shirts or SHIRTS.
The vendor name on a vendor collection page.
You can query for products from a certain vendor at the /collections/vendors URL with a query parameter in the format of ?q=[vendor], where [vendor] is your desired product vendor.
The query value is case-insensitive, so apparelco is equivalent to ApparelCo or APPARELCO.
The default sort order of the collection.
This is set on the collection's page in the SHOPLINE Admin.
The description of the collection.
The featured image for the collection.
The featured image for the collection is used by default. If the image isn't available, the system uses the featured image for the first product in the collection. If the first product in the collection doesn't have a featured image, null is returned.
The storefront filters that have been set up on the collection.
Only filters relevant to the current collection are returned. Filter data will not be returned for collections that contain over 5000 products.
The handle of the collection.
The ID of the collection.
The cover image for the collection.
This cover image is added on the collection's page in the SHOPLINE Admin.
The total number of products in the current view of the collection.
A timestamp for when the collection was published.
Use the date filter to format the timestamp.
The value of this field is the sorting order of the product collection specified by the URL parameter sort_by. It returns null if the parameter is not provided.
The available sorting options for the collection.
These are the active tags for the current product collection view, containing only the tags of products that have not been filtered out. If no tags are applied, or all tagged products in the current page have been filtered out, an empty array is returned.
The title of the collection.
The relative URL of the collection.