Instances

Overview

Advanced knowledge of Liquid is essential You need to have a strong understanding of Liquid to create your own bundle template implementation - Template Creator was built to allow you to create your own Bundle Page template from scratch.

Due to the complexity and personalised nature of this process, we are currently unable to offer support for this functionality.

Bundle

Attribute

Type

Description

sections

list of Section instances

Multiple for multi-section bundle, one for single section bundle

current_section

section instance

Currently selected section

has_next_section

boolean

True if there is some section after current one, false otherwise. Usually used to determine if the Next button should be displayed

has_prev_section

boolean

True if there is some section before current one, false otherwise. Usually used to determine if the Previous button should be displayed

adding_to_cart

boolean

True if the bundle is currently being added to cart, false otherwise. Add to cart button should be disabled or hidden when bundle is being added to cart

can_add_to_cart

boolean

True if bundle configuration is valid and bundle can be added to cart, false otherwise. Hide or disable the button to add to cart if this property is false

content

BundleContent instance

Current bundle configuration. Contains list of products added to the bundle, price, etc.

errors

list of strings

List of configuration problems that will prevent bundle creation

external_name

string

External name of the bundle

description

string (html)

Bundle description

bundle_image_url

string (url)

Link to bundle image

header_image_url

string (url)

Link to bundle header image

product_url

string (url)

Link to product representing the bundle (it will redirect to the bundle configuration page)

url

string (url)

Link to the bundle configuration page (current page)

products_per_row

number

Number of products in one row

discount_minimum

number

Minimal price a bundle must have to apply a discount

discount_type

string

Type of a bundle discount - one of fixed (e.g. discounted by $20), percentage (e.g. 10 percent discount), or price (fixed bundle price)

discount_value

number

Value of the discount

limit_rules

array of LimitRule instances

Limits for the bundle

taxable

boolean

True if bundle is marked as taxable, false otherwise

requires_shipping

boolean

True if bundle requires shipping, false otherwise

sku

string

SKU of the bundle

vendor

string

Vendor of the bundle

variant_prefix

string

Prefix of unique bundle identification

published

boolean

Shows/hides based on if the bundle is draft/live.

subscription_type

"required" | "optional" | "disabled"

Disabled if subscriptions are not enabled on the bundle, optional if the customer can choose to enable subscriptions, required if the bundle is only available as a subscription

subscription_frequencies

list of SubscriptionFrequency instances

Subscription frequencies that customer can choose from

subscription_enabled

boolean

True if customer enabled subscription on the bundle

subscription_frequency

SubscriptionFrequency instance

Subscription frequency that customer selected

BundleContent

Object that represents current bundle configuration.

Attribute

Type

Description

items

list of BundleItem instances

List of items that are added to the bundle

price

number

Total price of the bundle after all discounts

compare_at_price

number

Total price of all products in the bundle before all discounts

active_discount_tiers

array

An array of the currently active TieredDiscount objects

[
{
"type": "total_products",
"value": 4,
"operation": "gte",
"discount": 30,
},
{
"type": "total_products",
"value": 3,
"operation": "gte",
"discount": 20,
}
]

Section

Object that represents one section (page) of a bundle. Used even for single-section bundles.

Attribute

Type

Description

name

string

Name of the section (blank for single section bundle)

index

number

Order of the section in all bundle sections (starting with zero)

description

description

Description of the section

products

list of Product instances

List of products that are added to given section

limit_rules

list of LimitRules instances

List of limit rules specific for this section

BundleItem

Single item that was added to the bundle.

Attribute

Type

Description

section

section instance

Section to which the product belongs to. Might be null if the product is required

variant

variant instance

Variant of product

isRequired

boolean

True if variants is required and shouldn't be removed from bundle, false otherwise

UniqueBundleItem

Group of same bundle items (product variants in the same section) that was added to bundle. It has the same properties as BundleItem with additional attributes:

Attribute

Type

Description

quantity

number

number of times the item was added to the bundle

indices

list of numbers

Each item of this array is an index of the individual item in the bundle - can be used for deletion

Product

Representation of one Product in the store.

Attribute

Type

Description

id

number

Unique identification of a product

title

string

Title of the product

handle

string

A unique human-friendly string for the product

image

instance of Image (optional)

Primary image of the product

images

array of Image instances

List of all images assigned to the product

description

string (optional)

A description of the product. May contain HTML formatting

variants

array of Variant instances

Variants of given product

tags

array of strings

Product tags

Variant

Variant represents one version of the product.

Attribute

Type

Description

id

number

Unique identification of a variant

title

string

Title of the variant

price

number

Price of the variant. Use money filter to display price:

{{ variant.price | money }}

option1, option2, option3

strings

The custom properties that were used to define product variants

image_id

number (optional)

Unique id that is used as a primary image for given variant

available_count

number

Number of items available in stock for given variant. Value might be null if variants are not tracked

sku

string (optional)

A unique identifier for the product variant in the shop.

Image

The individual product image.

Attribute

Type

Description

id

number

Unique identifier of the image

src

string

Link to the image

srcset

string

Responsive image definition (for the srcset attribute of img tag)

LimitRule

Rule that the bundle must fulfil before it can be added to cart.

Attribute

Type

Description

type

string

‚Äč

Type of the limit, one of:

  • bundle-price Bundle price

  • bundle-price-before-discount Bundle price (before discount)

  • total-number-of-products Total number of products

  • amount-of-one-product Amount of one product

operation

string

Operation, one of lt, lte, eq, gt, gte - meaning <, <=, =, >, => respectively

value

number

Value of the limit

section

number

ID of a section that this rule applies to (can be null if limit rule is for whole bundle)

SubscriptionFrequency

Frequency how often should be bundle delivered when a subscription is enabled

Attribute

Type

Description

id

string

Identificator of a frequency

frequency

number

Number of units

unit

"days" | "weeks" | "months"

Unit of the frequency

Settings

General settings from Bundle Builder settings section.

Use {{ settings | json }} to display the settings.