# Cart Drawer does not Automatically Update

### Overview

In this article, you will learn about a PageFly page’s issue that the [cart drawer (cart icon) does not automatically update](https://help.pagefly.io/manual/cart-drawer-does-not-automatically-update/) when you add product(s) to your cart. It means that when customers click on the Add to Cart button, the cart drawer of your store’s theme stays static instead of automatically updating the products.

Basically, PageFly works well with Shopify themes. However, with some themes, especially the cart mechanism working makes conflict with PageFly, therefore there is the cart drawer not updating automatically.

### How To Fix

To fix this problem, please follow these steps:

* Go to Shopify Admin > Online Store > Themes.
* In the Current theme > click Customize.
* On the left sidebar, click App embeds.
* Check the box next to PageFly Theme Helper.
* Click Save.

![](https://2800568630-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeLf471SpmnojuhVGQb2E%2Fuploads%2Fgit-blob-e8a7fc19878695986fea3f435515de5af8fba50d%2FZRVVfSpl1c8vToQ9n792XROmEZlFFWPz5Gj7cmQ8bmifvNHUfFN5FBKHLLaUX3RS-r5ORW2QSvy4jURK8fOBQF3TKFJzOnMtj6248wZfOIr0tRd22TRQgPssgAYhZT6s-CmtShnar93CuCzx.gif?alt=media)

This will fix the issue for 60% of Shopify themes. If the issue persists, please check the solutions below for your specific theme. If you do not find your theme listed, please contact our support team.

{% hint style="info" %}
Please note that you need to know the original theme name in case you have changed it.
{% endhint %}

For more details, you can check the video tutorial below:

{% embed url="<https://youtu.be/QEnI_5uNiWE>" %}

### How to Fix When The PageFly Theme Helper Doesn't Work

First of all, you need to access the theme files of Shopify Admin

Go to your Shopify Admin > Online Store > Themes > Edit code

{% hint style="info" %}
Note that for each theme, the code to fix this issue is different. You can find the code for your theme in the list below.
{% endhint %}

![](https://2800568630-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeLf471SpmnojuhVGQb2E%2Fuploads%2Fgit-blob-03822b2870240051c538a81ee5df1308f51d1bf3%2FXcjkTJGgmyckdaFazz7Tly9uo6Y-kjq_EE8uYOw5CbjpzntXOzRJP8cO46ivjGuM0G6qNOWZaFm3mAGWQgBN08Slvc3pyaTynC4gdTiA06mt0ApNllMKrBpayc1jpZ9oldJK4UrvX_GEffUv.png?alt=media)

#### Narrative Theme

With the Narrative theme, you just need to add [the required code](https://gist.github.com/Sally165/a3a767bb00cef6095be33146f6598253) inside the theme.liquid file

#### Venue Theme

With the Venue theme, you just need to add [the required code](https://gist.github.com/Sally165/851202cc615adacf5bc8deee740ffe81) inside the theme.liquid file

#### Turbo Theme

1. Go to app.js.liquid file and search refreshCart
2. Add window\.refreshCart like this[video](https://www.loom.com/share/df2741c74e7141d9b1e30ba01cec4c09)
3. Search add.js in app.js.liquid file and copy the code below that like this[video](https://www.loom.com/share/e6688044dd6943d3be71f774680a7e1e)
4. Add the above copied code inside window.\_\_pagefly\_helper\_store code in theme.liquid file to make add to cart work like this[video](https://www.loom.com/share/ccf6a075e8454b18951e60ef2e79a5d0)

#### Dawn - Origin - Taste - Craft - Refresh - Sense With Theme Popup Notification

With Dawn Theme, please add [this code](https://gist.github.com/Sally165/f09f6a42fa5a42d9b064531290a7a4c8) to the theme.liquid file

Note: You have to change the "View my cart" text in the code accordingly to your store language.

![](https://2800568630-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeLf471SpmnojuhVGQb2E%2Fuploads%2Fgit-blob-42d937b341f7806597ba5ac6357ab92aa0959a5b%2F1QXA24MbXt1QNJtt953dPQ6AGBpzTYjgtycZb_XD0scbkPTpwAQOdumT61VQWBIf5zqrvrg2_8ZnHn0blxq4H0kQm99ONOxrDiWWjoqJpxwtglqtE_AteM94UUBDHBkSnHn5o2OB_TVmU9W6.png?alt=media)

#### Dawn - Origin - Taste - Craft - Refresh - Sense Theme New Version With Cart Drawer

With the Dawn - cart drawer, please add[this code](https://gist.github.com/Sally165/bc2ce12e65f60d750cc33a7233388bf5) to theme.liquid file

#### Blockshop Theme

With the Blockshop theme, you just need to add [the required code](https://gist.github.com/Sally165/8b29ba47e0b3c1700f5b071e33f93e23) inside the theme.liquid file

#### Boundless Theme

1. Go to javascript files of theme and find ajaxCart
2. Add window\.ajaxCart after ajaxCart like var ajaxCart = window\.ajaxCart
3. Add[this code](https://gist.github.com/Sally165/09a91f05bb358ee484583f274244ac89) in theme.liquid

#### Porto Theme

With Porto theme, please check this link [here](https://www.loom.com/share/0dba917df8db49659da686282fb40f70) for the solution

#### Cospora Theme

With Cospora theme, please check this link [here](https://www.loom.com/share/aa591ad4b9da4fc98f5cb688336d3c37) for the solution

#### Flex Theme

With Flex theme, please check this link [here](https://www.loom.com/share/1980b8622ba241d9ad47a6edecbf0852) for the solution

#### Grid Theme

With Grid theme, please check this link [here](https://www.loom.com/share/81c401fdb94c48e581ef3c4b663f347e) for the solution

#### Galleria Theme

With Galleria theme, please check this link [here](https://www.loom.com/share/7ef22e4b6363490a871325c012c0f700) for the solution

#### Debutify & Palo Alto Theme

With Debutify theme, please follow these steps

1. Go to theme.js.liquid file and then search theme.ajaxCart, ajaxify, ajaxCart
2. Check in live view with this keyword to see there is an load function or update function or not

Example: theme.ajaxCart.update() or ajaxCart.load()

If there is one of keywords above, add [this code](https://gist.github.com/Sally165/e5089e044e649bc7841283e1f56aaccc) into theme.liquid file

Here is the tutorial link [here](https://www.loom.com/share/b83db68e633f402db51816f23b7a6025)

If you follow the guide above but it is not working and the cart drawer show blank

Please add[this code](https://gist.github.com/Sally165/3496f05e390553e508883f95d97f954b)

#### Avone Theme

With Avone theme, please check this link [here](https://www.loom.com/share/dbbccfff11a040ef8a17366cc1cad0e6) for the solution

#### Showtime Theme

With Showtime Theme, please check this link [here](https://www.loom.com/share/ad7344504dd842ae80fee115808cc8b4) for the solution

#### Rebranding Theme

With Rebranding Theme, please add [this code](https://gist.github.com/Sally165/fdfd1dff38d1e87f729b9bccf34be3fe) to the theme.liquid file

#### Envy Theme

With Envy Theme, please check this link [here](https://www.loom.com/share/9ee6239c09274b708e82c4fdf33e8265) for the solution

#### Basel Theme

With Basel Theme, please check this link [here](https://www.loom.com/share/7d0c864eede34554aea6dda428d2997d) for the solution

#### Ella Theme

With Ella Theme, please check this link [here](https://www.loom.com/share/0429a44b0b944d8db2f621171ac6a029) for the solution

#### Lusion Theme

With Lusion Theme, please check this link [here](https://www.loom.com/share/7676070a25c043f0b2f11484529387dc) for the solution

#### Atlantic Theme

With Atlantic Theme, please add [this code](https://gist.github.com/Sally165/caa88a839bc70aead266a9af94230db6) to the theme.liquid file

#### Motion Theme

With Motion Theme, please add [this code](https://gist.github.com/Sally165/813490651278ddaada97a2d6a6c98fa3) to the theme.liquid file

#### Maker Theme

With Maker Theme, please add [this code](https://gist.github.com/Sally165/f8fab62646848f85781a8070bcc6a2ce) to the theme.liquid file

#### Debut Theme

With Debut Theme, please add [this code](https://gist.github.com/Sally165/3d86b8e3a2536654df484b26e8509b1e) to the theme.liquid file

Note: When you added this code into theme and this does not work. You can open console.log() in live view and see there is any error for this. If you see this error “$ is not define…”

You should copy and paste this line into theme.liquid file

#### Express Theme

With Express Theme, please add [this code](https://gist.github.com/Sally165/128019b21efd09bf5becaf691ff1aa4c) to the theme.liquid file

#### Impulse Theme

With Impulse Theme, please add [this code](https://gist.github.com/Sally165/4b21a41e53cb666566962f527e949d71) to the theme.liquid file

If the code above not work, you can try add[this code](https://gist.github.com/Sally165/0e7725c5f9a1407ae34de92680be92ce) instead

#### Wokiee Theme

With Wokiee Theme, please add [this code](https://gist.github.com/Sally165/1f01eb3d44c37e8b4a65cfa7556abde2) to the theme.liquid file

#### ABZ - Icon

With ABZ - Icon, please add [this code](https://gist.github.com/Sally165/3f7c98bf70668bda17ec3763f829ea21) to the theme.liquid file

#### Streamline Theme

With Streamline Theme, please add [this code](https://gist.github.com/Sally165/75e1b5afb256ddde23311929c38f0591) to the theme.liquid file

#### Bold-Movivatior

With Bold-Movivatior Theme, please add [this code](https://gist.github.com/Sally165/d0565c177a47ed56bf9280a1fd7ff622) to the theme.liquid file

#### Brooklyn Theme

With Brooklyn theme, please check out this [video](https://www.loom.com/share/3e3a7151a3d946d19e6d08c4a6e4de94) for solution

If you follow the guide above but it is not working and the cart drawer show blank

Please add[this code](https://gist.github.com/Sally165/eaf5b72c20f69dbbf7aceb07d56c3bff)

#### Lorenza Theme

With Lorenza theme - you need to make sure that the theme shouldn’t be minified

Please check this[video](https://www.loom.com/share/7cb564dff8294544a3283efae77ab69e) for solution

#### Kalles Theme

With Kalles theme please add[this code](https://gist.github.com/Sally165/b94be5cc3ca1692f9615ea3bad57ad12) to theme.liquid file

#### Prestige - Warehouse Theme

With Prestige or Warehouse theme, please add[this code](https://gist.github.com/Sally165/96aa890aad4db3e78406cf479ca06e5c) to the theme.liquid file

If the code above not work, please[add this](https://gist.github.com/Sally165/9797856cceaca9289750f6dc57736d95) code instead

#### EcomSolid

With EcomSolid Theme, please add [this code](https://gist.github.com/Sally165/626a6a83e45ddb89cbd60743803a59ac) to the theme.liquid file

#### Focal

With Focal Theme, please add [this code](https://gist.github.com/Sally165/3f1748103c334afed45b517ddb0caa04) to the theme.liquid file

#### Focal 8.10

With Focal 8.10 Theme, please add[this code](https://gist.github.com/Sally165/c06301c529e1540a7c6315e5ddfd2a37) to the theme.liquid file

#### Retina

* Step 1: Update code on retina.js

###

![](https://2800568630-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeLf471SpmnojuhVGQb2E%2Fuploads%2Fgit-blob-039c67679cc2766ae0251eca2112c01e05ffa07a%2FZNQVp2T0ejFHDqnEGjo4JeRN_DxrXvGQYsObXE9_zfdgIwdg8QeyiTGHuRL30WP2n4OdTw7NjmkSl1x36q6OS4geFpndAyajOqJJn-W5UjzpfZ5qttihLncR6aCGAr1TN8jbACUVmJpAnY0U.png?alt=media)

* Step 2: Use[this code](https://gist.github.com/Sally165/920248bb27c0eed0bab17410631e5eb8) on theme.liquid

#### Slate Theme

Follow[this video](https://www.loom.com/share/910bcc882b744c91a41ec1373e96eced) instruction for solution

#### Expanse Theme

Follow[this video](https://www.loom.com/share/7fd6fbd761b344798dc0ecb22d1132a9) instruction for solution

#### Custom Theme (minimog)

Please add[this code](https://gist.github.com/Sally165/a954a258ccb375b85fbcf00b988a9d7b) to the theme.liquid file.

#### MeroxIO Custom Theme

Please follow[this video](https://www.loom.com/share/d9bb720e635343b1975782c598756eb3?provider%3Dslack-openid-connect) for solution.

#### Showcase Theme

With Showcase Theme, please add[this code](https://gist.github.com/Sally165/f13262bd36bb640e9c391e6400232667) to the theme.liquid file

#### Lorenza Theme

Please follow[this video](https://www.loom.com/share/7cb564dff8294544a3283efae77ab69e) for solution.

#### MODULAR Theme

With MODULAR Theme, please add[this code](https://gist.github.com/Sally165/50f261e1179d1f3d532f36a5cbbae9d6) to the theme.liquid file

#### Electro - Zeexo Theme

Step 1: search and open bc.script.js.liquid in theme code

Step 2: search AT\_AddCart and move it to window like this video : [link](https://www.loom.com/share/9a66094b31fa4a0c938d14c29df1c7a0)

Step 3: please add[this code](https://gist.github.com/Sally165/580478ab50744ec81e3375f399e29e27) to the theme.liquid file

#### Boost Theme

With Boost Theme, please add[this code](https://gist.github.com/Sally165/9763058b8fe572a3c4705d4d155e6b28) to the theme.liquid file

#### Reach

With Reach Theme, please add [this code](https://gist.github.com/Sally165/ec7499177b190e5b5c6e189d2e6fd217) to the theme.liquid file

#### District Theme

Please follow[this video](https://www.loom.com/share/49d472b9c43242da82a0d7886d80abb8) for solution.

#### Vela Theme

* Step 1: Move this function to window in ‘vela.js’ and added the code helper.

![](https://2800568630-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeLf471SpmnojuhVGQb2E%2Fuploads%2Fgit-blob-f5f4020e1ed8d9e9222ea3b1ab1df823a3f6f1f4%2Fc4dlz8kKzRTl5XI07NyOHzViIZPA3ARrX12ln7wGyF6oRMwCK0eBFTsgoTVm9EIy-PErsM8z9PEwUZ3BmVpcpFlZWjx01cs3oKpI8T1gOK_HYevE3sShZ2z_AGWOtX7RfHhQ8n-rjRxXFK36.png?alt=media)

* Step 2: Add[this code](https://gist.github.com/Sally165/6880bfafd68aae02153136f4bc847687) to the theme.liquid file

#### Pipeline, Testament Theme

* Step 1: Move cartUpdateCallback to window first.

![](https://2800568630-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeLf471SpmnojuhVGQb2E%2Fuploads%2Fgit-blob-337a259c7dfae4d30db3add1c39b52600be258da%2FoB8jHDYKPFt4HUNKhulmV0sed9lV5fz2f-OsmjMkBbKIluawUZUsWCXnKkAECnU-i22nzSxWc8yJMFCYMqRfLt2jycudXrdI3S4H3awUPQuvMgEcLmbSsmDMasbDGAV_21cpvhRN-Aiz95nm.png?alt=media)

* Step 2: Add[this code](https://gist.github.com/Sally165/155ca92998d134d48453b85e2d1a2dcc) to the theme.liquid file

#### Shella Theme

* Step 1: Please follow[this video](https://www.loom.com/share/eb72da190c14494a83e37a074651b370) for solution.
* Step 2: Add[this code](https://gist.github.com/Sally165/df7109d694c5128ebd2044b293bfcf09) to theme.liquid file

#### Shella Theme Version 5.0.1

With Shella Theme 5.0.1, please add[this code](https://gist.github.com/Sally165/e0cba48f692997871f943ddc6581566a) to the theme.liquid file

#### Prestige Theme - Warehouse

With Prestige theme - Warehouse (for some version only), please add[this code](https://gist.github.com/Sally165/e3872f14599707d65e925421c4e4575f) to the theme.liquid file

#### Lammer Theme 4.0.0

With Lammer theme 4.0.0, please add[this code](https://gist.github.com/Sally165/fa886d1a740277148a21b4e990cf63a2) to the theme.liquid file

#### Warehouse 2.5.2 Theme

With Warehouse 2.5.2 theme, please add[this code](https://gist.github.com/Sally165/7a4d44aee4b5e97aa6e9aa8cf8d53ade) to the theme.liquid file

#### Turboant Theme

With Turboant theme, please add[this code](https://gist.github.com/Sally165/0b8341b78bd691ef9759fe01f2fd0c24) to the theme.liquid file

#### Broadcast Theme

With Broadcast theme, please add[this code](https://gist.github.com/Sally165/3e4188ced370022b67375e4e8f784215) to the theme.liquid file

#### Be Yours 4.1.0 Theme

With Be Yours 4.1.0 theme, please add[this code](https://gist.github.com/Sally165/de7f7398f356cdf311a6ac60f75917ef) to the theme.liquid file

#### Solodrop-2.4.0 Theme

With Solodrop-2.4.0 theme, please add[this code](https://gist.github.com/Sally165/5a97b8a66b731307da5db53d892d3541) to the theme.liquid file

#### Pop version 3.0.4 Theme

With Pop version 3.0.4 theme, please add[this code](https://gist.github.com/Sally165/4ce3c3c0be10afe167b83e20f1144f94) to the theme.liquid file

You can watch this[video guide](https://www.loom.com/share/0795eecd0b7b45728994c02bcd2f83e9) for more information.

#### Flow version 16.3.1 Theme

With Flow version 16.3.1 theme, please add[this code](https://gist.github.com/Sally165/a85f01603634a5372c7839a831809c2e) to the theme.liquid file

You can watch this[video guide](https://www.loom.com/share/66f3136b18324219b814a75a20fa2d96) for more information.

### Tips And Best Practice

For all themes, it’s required to have[this same code](https://gist.github.com/Sally165/d7d22565d27f3f9297c057b70812e04d).

If your theme is not listed above, please ask your Theme Provider to have their own theme code so they can update their code in the red box as the demonstration below:

![](https://2800568630-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeLf471SpmnojuhVGQb2E%2Fuploads%2Fgit-blob-1981aa5596464a2eec136c15e06bb4a02c3a4df6%2FK03215HkG5BEoWcQR9n-Pc3DQt9hFDGKwcZ7F4A1i-bFbOxaM5_sq0vLAbJTrdLuZgMvoxToPUQRxD0CzUrNjVJLFKNPfMVFwoUo376z1LJrJ3fn6GrFgWr6XClZgqEJ4Ffw6kVIL98YMUR-.png?alt=media)

This code also needs to be added to the theme.liquid file.
