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

# Cart timer

> Remove Supercycle items from a cart after a set time so abandoned carts don't block bookings

The cart timer limits how long a Supercycle item can sit in a customer's cart. When the time runs out, Supercycle removes its items from the cart and leaves other products alone. This reduces the chance of two customers reaching checkout for the last available unit at the same time. Turn it on under **Online store** on <Icon icon="shopify" iconType="solid" /> **[Channels](https://admin.shopify.com/apps/supercycle/settings/channels)**.

Use it if you've seen cycles fail to reserve because of abandoned carts, or if you want fewer overlapping bookings.

<Note>
  The cart timer is off by default, so nothing changes on your store until you turn it on.
</Note>

***

## How it works

* The timer starts when a customer adds a Supercycle item to their cart.
* It only counts Supercycle cycle line items. Regular Shopify products are ignored.
* When the time runs out, Supercycle items are removed and the cart drawer, count, and cart page refresh in place without a reload.
* The timer resets each time the cart's cycle items change.

***

## Set up the cart timer

<Steps>
  <Step title="Open Online store settings">
    Go to <Icon icon="shopify" iconType="solid" /> **[Channels](https://admin.shopify.com/apps/supercycle/settings/channels)** and open **Online store**.
  </Step>

  <Step title="Turn on Limit time in cart">
    Turn on **Limit time in cart**. The field defaults to `20` minutes, which suits most stores.
  </Step>

  <Step title="Set the timeout">
    Enter how many minutes Supercycle items stay in the cart before they're removed.
  </Step>

  <Step title="Choose what happens when time runs out">
    Under **Action after time expired**, pick one of the options in the table below.
  </Step>

  <Step title="Save">
    Select **Save**.
  </Step>
</Steps>

To turn the timer off, turn off **Limit time in cart** and save. The value resets to `0`.

### Action after time expires

| Option                                           | What it does                                                                               |
| ------------------------------------------------ | ------------------------------------------------------------------------------------------ |
| **Remove Supercycle items and hide the message** | Removes Supercycle items from the cart and hides the `sc-cart-timer` element if you use it |
| **Remove Supercycle items and redirect**         | Removes Supercycle items from the cart and sends the customer to a URL you enter           |

***

## Show a countdown to customers

Show customers how long they have left by adding a custom element to your theme, for example in the header, cart drawer, or cart page:

```html Cart countdown theme={null}
<div class="sc-cart-timer">
  Reserved for <x-cart-timer></x-cart-timer>
</div>
```

`<x-cart-timer>` shows the remaining time as `MM:SS` and updates every second. The `.sc-cart-timer` wrapper is hidden when there are no Supercycle items in the cart or the timer isn't running, so customers only see it when it matters. Style the wrapper with your own CSS to match your theme.

<Tip>
  Wrap the timer in your own copy so it reads naturally, for example "Reserved for 14:32" or "Your items expire in 14:32".
</Tip>

***

## Considerations

### Timeout length

A shorter timeout narrows the window in which two customers could reach checkout at once, but gives customers less time to finish. A longer timeout is friendlier to customers but widens that window. `20` minutes is a good starting point for most stores.
