ShoppingModule
ClassAllows the creation of Shopping Lenses with an integrated Product Catalog.
- Snapchat: not supported
- SPECS: not supported
- Camera Kit Web: fully supported
- Camera Kit Mobile: fully supported
- SnapchatNot supported — Available on Camera Kit only
- SPECSNot supported — Available on Camera Kit only
- Camera Kit WebFully supported
- Camera Kit MobileFully supported
Since Lens Scripting v153
Allows the creation of Shopping Lenses with an integrated Product Catalog. Not available on Spectacles.
Index
Properties
Methods
Remarks
The ShoppingModule includes several input fields for you to define as you create your Shopping Lens. The fields include:
Domain: name of the product line (e.g., Running Shoes). Description: (of the domain): description of the domain (e.g., Winter Season Collection). State(s): name of the single product displayed in that state (e.g., Shoe ABC). Description (of each state): description of the product in the state (e.g., SKU ID 12345, red shoe).
Extends
Properties
domains
readonlydomains:DomainInfo[]
Camera Kit
The domain within this shopping module.
Since
Lens Scripting Version 168
name
name:
string
The name of the Asset in Lens Studio.
Default Value
""
Inherited from
onError
readonlyonError:event2<number,string,void>
Camera Kit
Triggered when an error has occured on the module.
Since
Lens Scripting Version 153
onProductsLoaded
readonlyonProductsLoaded:event1<string,void>
Camera Kit
Since
Lens Scripting Version 321
onProductStateUpdate
readonlyonProductStateUpdate:event1<string,void>
Camera Kit
Triggered when the client (e.g. Snapchat) has changed the product state.
Since
Lens Scripting Version 153
uniqueIdentifier
readonlyuniqueIdentifier:string
Since
Lens Scripting Version 176
Inherited from
Methods
getTypeName()
staticgetTypeName():TypeName<ShoppingModule>
Camera Kit
Returns the fully-qualified JavaScript type name for this class (for example, "Component.Camera"). This is a static accessor (no instance required) and returns the same value as the instance getTypeName().
Returns
TypeName<ShoppingModule>
Since
Lens Scripting Version 153
Overrides
getTypeName()
getTypeName():
string
Returns the name of this object's type.
Returns
string
Inherited from
isOfType()
isOfType(
type):boolean
Returns true if the object matches or derives from the passed in type.
Parameters
| Parameter | Type |
|---|---|
type | string |
Returns
boolean
Inherited from
isSame()
isSame(
other):boolean
Returns true if this object is the same as other. Useful for checking if two references point to the same thing.
Parameters
| Parameter | Type |
|---|---|
other | ScriptObject |
Returns
boolean
Inherited from
loadingStarted()
loadingStarted():
ShoppingLoadingIndicator
Camera Kit
Returns the status of whether the module has loaded.
Returns
Since
Lens Scripting Version 162
selectProduct()
selectProduct(
index):void
Camera Kit
Parameters
| Parameter | Type |
|---|---|
index | number |
Returns
void
Since
Lens Scripting Version 321
See also
Shopping Lens guide.