Bundle Product Methods
- SmartCart.childBundleTitle ⇒
string
-
Remove extra word from bundle option title
- SmartCart.getBundleOptionImage ⇒
string
-
Get the bundle option image
- SmartCart.hideBundleOptions ⇒
boolean
-
Check if bundle options should be hidden
- SmartCart.isBundleVisible ⇒
boolean
-
Check whether the item is the currently expanded bundle
- SmartCart.itemBundleLength ⇒
number
-
Check if item is bundle and has more than 1 option (excluding default option)
- SmartCart.itemIsBundle ⇒
boolean
-
Check whether item is a bundle product
- SmartCart.toggleActiveBundle ⇒
void
-
Toggle the active product bundle
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
|
---
title: Bundle Product Methods
excerpt: Display and manage Shopify bundle products in the cart
deprecated: false
hidden: false
metadata:
title: ''
description: ''
robots: index
next:
description: Return to the New Methods Overview Page to see other available methods.
pages:
- type: endpoint
slug: smart-cart-methods
title: Methods Overview - New
---
<dl>
<dt><a href="#SmartCart.childBundleTitle">SmartCart.childBundleTitle</a> ⇒ <code>string</code></dt>
<dd>
<p>Remove extra word from bundle option title</p>
</dd>
<dt><a href="#SmartCart.getBundleOptionImage">SmartCart.getBundleOptionImage</a> ⇒ <code>string</code></dt>
<dd>
<p>Get the bundle option image</p>
</dd>
<dt><a href="#SmartCart.hideBundleOptions">SmartCart.hideBundleOptions</a> ⇒ <code>boolean</code></dt>
<dd>
<p>Check if bundle options should be hidden</p>
</dd>
<dt><a href="#SmartCart.isBundleVisible">SmartCart.isBundleVisible</a> ⇒ <code>boolean</code></dt>
<dd>
<p>Check whether the item is the currently expanded bundle</p>
</dd>
<dt><a href="#SmartCart.itemBundleLength">SmartCart.itemBundleLength</a> ⇒ <code>number</code></dt>
<dd>
<p>Check if item is bundle and has more than 1 option (excluding default option)</p>
</dd>
<dt><a href="#SmartCart.itemIsBundle">SmartCart.itemIsBundle</a> ⇒ <code>boolean</code></dt>
<dd>
<p>Check whether item is a bundle product</p>
</dd>
<dt><a href="#SmartCart.toggleActiveBundle">SmartCart.toggleActiveBundle</a> ⇒ <code>void</code></dt>
<dd>
<p>Toggle the active product bundle</p>
</dd>
</dl>
<a name="SmartCart.childBundleTitle"></a>
## `SmartCart.childBundleTitle` ⇒ <code>string</code>
Remove extra word from bundle option title
**Returns**: <code>string</code> - bundle option title
<Table>
<thead>
<tr>
<th>
Param
</th>
<th>
Type
</th>
<th>
Description
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
option
</td>
<td>
<code>object</code>
</td>
<td>
bundle option
</td>
</tr>
</tbody>
</Table>
<a name="SmartCart.getBundleOptionImage"></a>
## `SmartCart.getBundleOptionImage` ⇒ <code>string</code>
Get the bundle option image
**Returns**: <code>string</code> - Image URL
<Table>
<thead>
<tr>
<th>
Param
</th>
<th>
Type
</th>
<th>
Description
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
product
</td>
<td>
<code>object</code>
</td>
<td>
Product object
</td>
</tr>
<tr>
<td>
currentOption
</td>
<td>
<code>object</code>
</td>
<td>
Current option
</td>
</tr>
<tr>
<td>
currentOptionIndex
</td>
<td>
<code>number</code>
</td>
<td>
Index of the current option
</td>
</tr>
</tbody>
</Table>
<a name="SmartCart.hideBundleOptions"></a>
## `SmartCart.hideBundleOptions` ⇒ <code>boolean</code>
Check if bundle options should be hidden
**Returns**: <code>boolean</code> - true if bundle options should be hidden
<Table>
<thead>
<tr>
<th>
Param
</th>
<th>
Type
</th>
<th>
Description
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
item
</td>
<td>
<code>object</code>
</td>
<td>
cart line item
</td>
</tr>
</tbody>
</Table>
<a name="SmartCart.isBundleVisible"></a>
## `SmartCart.isBundleVisible` ⇒ <code>boolean</code>
Check whether the item is the currently expanded bundle
**Returns**: <code>boolean</code> - true if the item is the currently expanded bundle
<Table>
<thead>
<tr>
<th>
Param
</th>
<th>
Type
</th>
<th>
Description
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
item
</td>
<td>
<code>object</code>
</td>
<td>
line item
</td>
</tr>
</tbody>
</Table>
<a name="SmartCart.itemBundleLength"></a>
## `SmartCart.itemBundleLength` ⇒ <code>number</code>
Check if item is bundle and has more than 1 option (excluding default option)
**Returns**: <code>number</code> - number of non-default options
<Table>
<thead>
<tr>
<th>
Param
</th>
<th>
Type
</th>
<th>
Description
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
item
</td>
<td>
<code>object</code>
</td>
<td>
line item
</td>
</tr>
</tbody>
</Table>
<a name="SmartCart.itemIsBundle"></a>
## `SmartCart.itemIsBundle` ⇒ <code>boolean</code>
Check whether item is a bundle product
**Returns**: <code>boolean</code> - true if item is bundle
<Table>
<thead>
<tr>
<th>
Param
</th>
<th>
Type
</th>
<th>
Description
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
item
</td>
<td>
<code>object</code>
</td>
<td>
line item
</td>
</tr>
</tbody>
</Table>
<a name="SmartCart.toggleActiveBundle"></a>
## `SmartCart.toggleActiveBundle` ⇒ <code>void</code>
Toggle the active product bundle
<Table>
<thead>
<tr>
<th>
Param
</th>
<th>
Type
</th>
<th>
Description
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
item
</td>
<td>
<code>object</code>
</td>
<td>
line item
</td>
</tr>
</tbody>
</Table>