> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://support.customall.io/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# How to Set Up the Cart Drawer on Shopify store

By default, Customall may redirect customers to the Shopify cart page after they add a personalized product to the cart. If your Shopify theme normally uses a cart drawer/ mini cart, you can configure Customall to work with it by following the steps below.

# How to set up the cart drawer

1. Open your Shopify theme code

From your Shopify Admin: **Online Store** → Click the **three dots (...)** next to your desired theme → **Edit code**

![](https://storage.crisp.chat/users/helpdesk/website/-/a/8/3/6/a836ece0c4805800/image_nx4mo2.png)

2. Add the cart drawer code

Add the following code to your theme:

```
window.cartType = 'mini-cart';
window.addToCartCallback = () => {
    // Add your theme's code here to:
    // 1. Refresh the cart drawer content
    // 2. Open/show the cart drawer
};
```

3. Click **Save**.

# What does this code do?

* The first line tells Customall that your store is using a mini cart / cart drawer instead of redirecting customers to the full cart page.

```
window.cartType = 'mini-cart';
```

* The second part runs automatically after a product has been successfully added to the cart:

```
window.addToCartCallback = () => {
    // Add your theme's code here to:
    // 1. Refresh the cart drawer content
    // 2. Open/show the cart drawer
};
```

Inside this function, you need to add the code your Shopify theme uses to:
* Refresh the cart drawer with the newly added product.
* Open the cart drawer so customers can see their updated cart.

### Important

The code used to open and refresh the cart drawer is different for each Shopify theme. Therefore, the following part is only a placeholder and needs to be replaced with your theme's cart drawer code:

```
window.addToCartCallback = () => {
    // Add your theme's code here to:
    // 1. Refresh the cart drawer content
    // 2. Open/show the cart drawer
};
```