Subtotal Methods
- SmartCart.getSubtotalSettings ⇒
object -
Returns the subtotal settings from the SmartCart components array.
- SmartCart.subtotal ⇒
string -
Returns the subtotal amount to display. The subtotal is often just a formatted string, but can be returned as HTML to display a compare (discount) price
- SmartCart.subtotalLabel ⇒
string -
Returns the subtotal label.
- SmartCart.subtotalNumber ⇒
number -
Returns the subtotal number (rather than a formatted string). This is useful for calculating the subtotal for other components.
SmartCart.getSubtotalSettings ⇒ object¶
Returns the subtotal settings from the SmartCart components array.
SmartCart.subtotal ⇒ string¶
Returns the subtotal amount to display. The subtotal is often just a formatted string, but can be returned as HTML to display a compare (discount) price
| Param | Type | Description |
|---|---|---|
| format | string |
Currency format string |
SmartCart.subtotalLabel ⇒ string¶
Returns the subtotal label.
SmartCart.subtotalNumber ⇒ number¶
Returns the subtotal number (rather than a formatted string). This is useful for calculating the subtotal for other components.
--- title: Subtotal 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.getSubtotalSettings">SmartCart.getSubtotalSettings</a> ⇒ <code>object</code></dt> <dd> <p>Returns the subtotal settings from the SmartCart components array.</p> </dd> <dt><a href="#SmartCart.subtotal">SmartCart.subtotal</a> ⇒ <code>string</code></dt> <dd> <p>Returns the subtotal amount to display. The subtotal is often just a formatted string, but can be returned as HTML to display a compare (discount) price</p> </dd> <dt><a href="#SmartCart.subtotalLabel">SmartCart.subtotalLabel</a> ⇒ <code>string</code></dt> <dd> <p>Returns the subtotal label.</p> </dd> <dt><a href="#SmartCart.subtotalNumber">SmartCart.subtotalNumber</a> ⇒ <code>number</code></dt> <dd> <p>Returns the subtotal number (rather than a formatted string). This is useful for calculating the subtotal for other components.</p> </dd> </dl> <a name="SmartCart.getSubtotalSettings"></a> ## `SmartCart.getSubtotalSettings` ⇒ <code>object</code> Returns the subtotal settings from the SmartCart components array. <a name="SmartCart.subtotal"></a> ## `SmartCart.subtotal` ⇒ <code>string</code> Returns the subtotal amount to display. The subtotal is often just a formatted string, but can be returned as HTML to display a compare (discount) price <Table> <thead> <tr> <th>Param</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td>format</td> <td><code>string</code></td> <td>Currency format string</td> </tr> </tbody> </Table> <a name="SmartCart.subtotalLabel"></a> ## `SmartCart.subtotalLabel` ⇒ <code>string</code> Returns the subtotal label. <a name="SmartCart.subtotalNumber"></a> ## `SmartCart.subtotalNumber` ⇒ <code>number</code> Returns the subtotal number (rather than a formatted string). This is useful for calculating the subtotal for other components.