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

# Carts are files

> Every Aftersell Cart is one portable file. Build it in the app, with no theme code, then copy, back up, move, or generate it like any other file.

An Aftersell Cart isn't code spread across your theme. **Each cart is one self-contained file** that holds everything about it: its layout, blocks, design, custom CSS, and custom scripts. The cart editor is a visual way to edit that file, and the [app embed](https://docs.aftersell.com/aftersell/cart/creating-carts.md) renders it on your storefront.

Because a cart is just a file, you never edit theme code, and anything you can do with a file, you can do with a cart: copy it, back it up, move it to another store, or have an AI write it.

## Why this matters

| With a theme-coded cart | With an Aftersell Cart |
| - | - |
| Edits live in theme files (Liquid, JS, CSS) | Edits happen in the Aftersell app |
| A theme update or theme switch can break or wipe the cart | The cart lives in Aftersell, separate from your theme |
| Copying a cart to another store means a developer re-implements it | [Export](https://docs.aftersell.com/aftersell/cart/import-export.md) the file, import it on the other store |
| Rolling back means digging through theme history | Keep an exported file, or a [draft](https://docs.aftersell.com/aftersell/cart/having-multiple-carts.md), and restore it |
| Trying a new design risks the live cart | Build a draft, [preview](https://docs.aftersell.com/aftersell/cart/previewing-carts.md) it, or [A/B test](https://docs.aftersell.com/aftersell/cart/tests-overview.md) it |

## What you can do with a cart file

### Duplicate it

Start a new cart from an existing one with **Duplicate** on the Carts page. It's the fastest way to build a seasonal or campaign variant without touching the live cart.

### Back it up and restore it

[Export](https://docs.aftersell.com/aftersell/cart/import-export.md#exporting-a-cart) a cart before a big change. If you want the old version back, import the file and publish it.

### Move it between stores

Export from one store and [import](https://docs.aftersell.com/aftersell/cart/import-export.md#importing-a-cart) into another, for example from a staging store to production, or across the stores in a brand portfolio. The layout, blocks, design, custom CSS, and custom scripts all carry over. Store-specific references are handled for you:

* **Same store**: product, variant, image, and upsell strategy references are kept as-is.
* **Different store**: those references are cleared, since they point at the other store's catalog. The upsells block gets a fresh upsell strategy on the new store, and a product add-on block is turned off until you pick a product. The import preview lists everything to reconfigure.

Imported carts always arrive as **drafts**, so nothing changes on your storefront until you publish.

### Generate it with AI

Because a cart is a well-defined file, an AI assistant can write one:

1. On the **Carts** page, click **Download AI prompt**.
2. Give that file to an AI assistant with a description of the cart you want, or a screenshot of a cart you like. To change an existing cart instead, attach its exported file too.
3. The AI returns a cart file. [Import](https://docs.aftersell.com/aftersell/cart/import-export.md#importing-a-cart) it, review the preview, then refine it in the editor.

## Next steps

* [How do carts work?](https://docs.aftersell.com/aftersell/cart/how-carts-work.md)
* [Importing and exporting carts](https://docs.aftersell.com/aftersell/cart/import-export.md)
* [Create a cart](https://docs.aftersell.com/aftersell/cart/creating-carts.md)
