Skip to main content

collection_products

Lets the merchant select a collection and returns it with its products included. Perfect for "Featured Collection" or "Best Sellers" sections.

collection vs collection_products

Unlike collection which returns only the collection info, collection_products also fetches the products inside the selected collection.

Properties

PropertyTypeRequiredDescription
type"collection_products"YesField type identifier
labelstringYesLabel shown in the builder
defaultstringNoDefault value (empty string if omitted)

Usage

{
"featuredCollection": {
"type": "collection_products",
"label": "Featured Collection",
"default": ""
}
}

Interactive Preview

Interactive Preview
New Arrivals
3 products
Product 1
150 SAR
Product 2
99 SAR
Product 3
249 SAR
Live Output
{
  "featuredCollection": {
    "title": "New Arrivals",
    "productCount": 3,
    "products": [
      {
        "title": "Product 1",
        "pricing": {
          "price": 150
        }
      },
      {
        "title": "Product 2",
        "pricing": {
          "price": 99
        }
      },
      {
        "title": "Product 3",
        "pricing": {
          "price": 249
        }
      }
    ]
  }
}