Skip to content

ProductBundleItem

The ProductBundleItem object represents a children's of a bundle.

classDiagram
  ProductBundleItem --> ProductBundle
  ProductBundleItem --> Variant
  class ProductBundle{
  }
  class Variant{
  }
  class ProductBundleItem{
    int id
    int order
    int quantity
    ProductBundle bundle
    Variant variant
    OptionsList StockProductOptions
    OptionsList NotStockProductOptions
  }

Properties

Attribute name Type Description
id int The id of the bundle item.
order int Order of the bundle item.
quantity float Quantity of the bundle item.
bundle ProductBundle The ProductBundle object that representing information about the bundle it is included.
variant ProductVariant The ProductVariant object represents a variant that is related to the bundle item.
stockProductOptions OptionsList The OptionsList represents stock product options.
notStockProductOptions OptionsList The OptionsList represents not stock product options.

Examples

id property

{{ productBundleItem.id }}
1

order property

{{ productBundleItem.order }}
2

quantity property

{{ productBundleItem.quantity }}
4

bundle property

{{ productBundleItem.bundle.product.name }}
Samsung Starter Kit

variant property

{{ productBundleItem.variant.url }}
/url/to/bundle-item/variant

stockProductOptions property

{% set stockOptions = item.getStockProductOptions() %}
{% for option in stockOptions %}
    {% if option.getIsStockOption %}
        Stock product option.
    {% else %}
        Not a stock product option.
    {% endif %}
{% endfor %}
Stock product option.

notStockProductOptions property

{% set notStockOptions = item.getNotStockProductOptions() %}
{% for option in notStockOptions %}
    {% if option.getIsStockOption %}
        Stock product option.
    {% else %}
        Not a stock product option.
    {% endif %}
{% endfor %}
 Not a stock product option.