> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ollie.shop/llms.txt
> Use this file to discover all available pages before exploring further.

# Share Cart

> Native feature that generates a unique link for the user to share their current cart

When enabled, this feature will display a component in your checkout UI making it easy for the user to copy the contents of the current cart and via a link share it externally.

<Frame>
  <img src="https://mintcdn.com/ollie/BpgzcUJixdcknCYp/images/share-cart-component.png?fit=max&auto=format&n=BpgzcUJixdcknCYp&q=85&s=f372d53475a3d0196255cbbf818e8b6a" alt="Share Cart Component Pn" width="3250" height="1060" data-path="images/share-cart-component.png" />
</Frame>

The link generated will contain the ID of the current cart`/new?cartId={{cartId}}` and upon accessing this in a new browser/session the cart will be loaded.

## Configuration

The Share Cart feature is a prop configured in a version

<Frame>
  <img src="https://mintcdn.com/ollie/ZBAvs2G1IHCzwvYs/share-cart-props.png?fit=max&auto=format&n=ZBAvs2G1IHCzwvYs&q=85&s=f88f5449a9772cd8c777b3cd94863776" alt="Share Cart Props Pn" width="2124" height="1064" data-path="share-cart-props.png" />
</Frame>

In order for it to work properly the Prop Name **must** be `shareCart` and the Prop Value as a JSON

```json theme={"system"}
{
  "enabled": true //boolean
}
```

<Warning>
  When set as true the share cart component will be **always** visible, for all users
</Warning>

### Share Cart exclusive for specific type of users

It is often the case where you might want to allow the share cart to be visible in specific conditions, for example when someone from your Support team is helping out a customer, or if you are a B2B business and the shopper is buying on behalf of someone else.

For situations such as these you can configure the Share Cart to be visible according to a `role` .

```json theme={"system"}
{
	"role": "telesales" //string
}
```

Specifies the user role required to access or use the share cart feature.

<Info>
  If you are using VTEX as your Commerce provider, this should match the `customerClass`.
</Info>
