Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • SmartCollection

Index

Properties

body_html

body_html: string

A description of the collection, complete with HTML markup. Many templates display this on their collection pages.

disjunctive

disjunctive: boolean

Whether the product must match all the rules to be included in the smart collection. Valid values:

  • true: Products only need to match one or more of the rules to be included in the smart collection.
  • false: Products must match all of the rules to be included in the smart collection.

handle

handle: string

A unique, human-readable string for the collection automatically generated from its title. This is used in themes by the Liquid templating language to refer to the collection.

(limit: 255 characters)

id

id: number

The unique id of the collection

image

The image for this collection

published_at

published_at: null | string

The time and date when the collection was made visible. Retuns null for a hidden collection

published_scope

published_scope: "web" | "global"

Whether the collection is published to the Point of Sale channel. Valid values:

  • web: The collection is published to the Online Store channel but not published to the Point of Sale channel.
  • global: The collection is published to both the Online Store channel and the Point of Sale channel.
readonly

rules

The list of rules that define what products go into the smart collection. Each rule has the following properties:

  • column: The property of a product being used to populate the smart collection.

    Valid values for text relations:

    • title: The product title.
    • type: The product type.
    • vendor: The name of the product vendor.
    • variant_title: The title of a product variant.

    Valid values for number relations:

    • variant_compare_at_price: The compare price.
    • variant_weight: The weight of the product.
    • variant_inventory: The inventory stock. Note: not_equals does not work with this property.
    • variant_price: product price.

    Valid values for an equals relation:

    • tag: A tag associated with the product.
  • relation: The relationship between the column choice, and the condition.

    Valid values for number relations:

    • greater_than The column value is greater than the condition.
    • less_than The column value is less than the condition.
    • equals The column value is equal to the condition.
    • not_equals The column value is not equal to the condition.

    Valid values for text relations:

    • equals: Checks if the column value is equal to the condition value.
    • not_equals: Checks if the column value is not equal to the condition value.
    • starts_with: Checks if the column value starts with the condition value.
    • ends_with: Checks if the column value ends with the condition value.
    • contains: Checks if the column value contains the condition value.
    • not_contains: Checks if the column value does not contain the condition value.

condition: Select products for a smart collection using a condition. Values are either strings or numbers, depending on the relation value.

sort_order

The order in which products in the collection appear. Valid values:

  • alpha-asc: Alphabetically, in ascending order (A - Z).
  • alpha-desc: Alphabetically, in descending order (Z - A).
  • best-selling: By best-selling products.
  • created: By date created, in ascending order (oldest - newest).
  • created-desc: By date created, in descending order (newest - oldest).
  • manual: In the order set manually by the shop owner.
  • price-asc: By price, in ascending order (lowest - highest).
  • price-desc: By price, in descending order (highest - lowest).
see

CollectionSortOrder

template_suffix

template_suffix: null | string

The suffix of the liquid template being used. For example, if the value is custom, then the collection is using the collection.custom.liquid template. If the value is null, then the collection is using the default collection.liquid

title

title: string

The name of the collection. (limit: 255 characters)

updated_at

updated_at: string

The time when the collection was last modified.

Generated using TypeDoc