Website Building » Shopify » How Do I Disable Ajax Cart on Shopify?

How Do I Disable Ajax Cart on Shopify?

Last updated on October 1, 2022 @ 9:10 pm

If you’re using Shopify’s default ajax cart, there are a few ways to disable it. The first is to add a snippet of code to your theme.liquid file. This code will remove the ajax functionality from the cart, and instead show the regular cart page when items are added to the cart. To do this, follow these steps:

1. Log in to your Shopify admin and go to Online Store > Themes.

2. Find the theme you want to edit, and then click Actions > Edit code.

3.

In the Layout folder, click on theme.liquid.

4. Scroll down to the very bottom of the file, and add this code:


{{ 'cart.js' | asset_url | script_tag }}

5. Save your changes.

Another way to disable the ajax cart is by downloading an app from the Shopify App Store. There are a few different apps that offer this functionality, so you can browse through them and find one that suits your needs. Once you’ve installed the app, follow the instructions on how to disable the ajax cart.

PRO TIP: If you are considering disabling Ajax Cart on your Shopify store, be aware that this may adversely affect your store’s performance and user experience.

Or, if you’re comfortable editing code, you can disable the ajax cart by editing your theme’s JavaScript file. To do this, follow these steps:

1. Log in to your Shopify admin and go to Online Store > Themes.

2. Find the theme you want to edit, and then click Actions > Edit code.

>In the Assets folder, click on theme.js.

// at the very top of the file add this line:   var ajaxCart = false;  

>3.

This snippet of code will remove the ajax functionality from the cart, and instead show the regular cart page when items are added to the cart.

Another way to disable the ajax cart is by downloading an app from the Shopify App Store. There are a few different apps that offer this functionality, so you can browse through them and find one that suits your needs.

Or, if you’re comfortable editing code, you can disable the ajax cart by editing your theme’s JavaScript file.

Madison Geldart

Madison Geldart

Cloud infrastructure engineer and tech mess solver.