Cross-Sell Widget Methods
- SmartCart.getAllCrossSellWidgetIds ⇒
Array.<string>
-
Get all cross sell widget IDs in Cross-Sell components in the current Smart Cart settings
- SmartCart.getWidgetIdByComponentId ⇒
string | null
-
Get the widget ID by component ID
- SmartCart.hasCrossSellWidgets ⇒
boolean
-
Check if there are cross sell widgets in the current Smart Cart settings
Get all cross sell widget IDs in Cross-Sell components in the current Smart Cart settings
Returns: Array.<string> - Array of widget IDs
Get the widget ID by component ID
Returns: string | null - The widget ID
| Param |
Type |
Description |
| componentId |
string |
The component ID |
Check if there are cross sell widgets in the current Smart Cart settings
Returns: boolean - True if there are cross sell widgets
---
title: Cross-Sell Widget Methods
excerpt: ''
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.getAllCrossSellWidgetIds">SmartCart.getAllCrossSellWidgetIds</a> ⇒ <code>Array.<string></code></dt>
<dd>
<p>Get all cross sell widget IDs in Cross-Sell components in the current Smart Cart settings</p>
</dd>
<dt><a href="#SmartCart.getWidgetIdByComponentId">SmartCart.getWidgetIdByComponentId</a> ⇒ <code>string</code> | <code>null</code></dt>
<dd>
<p>Get the widget ID by component ID</p>
</dd>
<dt><a href="#SmartCart.hasCrossSellWidgets">SmartCart.hasCrossSellWidgets</a> ⇒ <code>boolean</code></dt>
<dd>
<p>Check if there are cross sell widgets in the current Smart Cart settings</p>
</dd>
</dl>
<a name="SmartCart.getAllCrossSellWidgetIds"></a>
## `SmartCart.getAllCrossSellWidgetIds` ⇒ <code>Array.<string></code>
Get all cross sell widget IDs in Cross-Sell components in the current Smart Cart settings
**Returns**: <code>Array.<string></code> - Array of widget IDs
<a name="SmartCart.getWidgetIdByComponentId"></a>
## `SmartCart.getWidgetIdByComponentId` ⇒ <code>string</code> | <code>null</code>
Get the widget ID by component ID
**Returns**: <code>string</code> | <code>null</code> - The widget ID
<Table>
<thead>
<tr>
<th>Param</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>componentId</td>
<td><code>string</code></td>
<td>The component ID</td>
</tr>
</tbody>
</Table>
<a name="SmartCart.hasCrossSellWidgets"></a>
## `SmartCart.hasCrossSellWidgets` ⇒ <code>boolean</code>
Check if there are cross sell widgets in the current Smart Cart settings
**Returns**: <code>boolean</code> - True if there are cross sell widgets