Bundle Product Methods
SmartCart.childBundleTitle ⇒ string¶
Remove extra word from bundle option title
Returns: string - bundle option title
| Param | Type | Description |
|---|---|---|
| option | object |
bundle option |
SmartCart.getBundleOptionImage ⇒ string¶
Get the bundle option image
Returns: string - Image URL
| Param | Type | Description |
|---|---|---|
| product | object |
Product object |
| currentOption | object |
Current option |
| currentOptionIndex | number |
Index of the current option |
SmartCart.hideBundleOptions ⇒ boolean¶
Check if bundle options should be hidden
Returns: boolean - true if bundle options should be hidden
| Param | Type | Description |
|---|---|---|
| item | object |
cart line item |
SmartCart.isBundleVisible ⇒ boolean¶
Check whether the item is the currently expanded bundle
Returns: boolean - true if the item is the currently expanded bundle
| Param | Type | Description |
|---|---|---|
| item | object |
line item |
SmartCart.itemBundleLength ⇒ number¶
Check if item is bundle and has more than 1 option (excluding default option)
Returns: number - number of non-default options
| Param | Type | Description |
|---|---|---|
| item | object |
line item |
SmartCart.itemIsBundle ⇒ boolean¶
Check whether item is a bundle product
Returns: boolean - true if item is bundle
| Param | Type | Description |
|---|---|---|
| item | object |
line item |
SmartCart.toggleActiveBundle ⇒ void¶
Toggle the active product bundle
| Param | Type | Description |
|---|---|---|
| item | object |
line item |
See something that needs updating?
Suggest an edit