Title Methods
SmartCart.getCartTitle ⇒ string
Get the cart title
Returns: string - the cart title text
Example
// Get the current cart title
const title = SmartCart.getCartTitle();
console.log(title); // "Your Cart"
// Use in a custom header component
document.querySelector('.my-cart-header').textContent = SmartCart.getCartTitle();
---
title: Title Methods
excerpt: Customize the cart drawer header title
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
---
## `SmartCart.getCartTitle` ⇒ `string`
Get the cart title
**Returns**: `string` - the cart title text
**Example**
```javascript
// Get the current cart title
const title = SmartCart.getCartTitle();
console.log(title); // "Your Cart"
// Use in a custom header component
document.querySelector('.my-cart-header').textContent = SmartCart.getCartTitle();
```