Creates an instance of IterableCommerceItem.
The unique identifier for the item.
The name of the item.
The price of the item.
The quantity of the item.
Optional
sku: stringThe stock keeping unit (SKU) of the item.
Optional
description: stringThe description of the item.
Optional
url: stringThe URL of the item.
Optional
imageUrl: stringThe image URL of the item.
Optional
categories: string[]The categories the item belongs to.
Optional
dataFields: unknownAdditional data fields for the item.
A new instance of IterableCommerceItem.
Optional
categoriesThe categories the item belongs to.
Optional
dataAdditional data fields for the item.
Optional
descriptionThe description of the item.
The unique identifier for the item.
Optional
imageThe image URL of the item.
The name of the item.
The price of the item.
The quantity of the item.
Optional
skuThe stock keeping unit (SKU) of the item.
Optional
urlThe URL of the item.
Represents an item for purchase.
This is used in methods like
trackPurchase
to track purchases made by users. It is also used in theupdateCart
method to update the shopping cart.Example