How to get Cart Items with Ajax in Shopify

Put the following code in your liquid file:get-cart-items-with-ajax-in-shopify

$.ajax({
        type: 'GET',
        url: '/cart.js',
        cache: false,
        dataType: 'json',
        success: function(data) {
          console.log(data);
        }
    });

Now you can see items data which are added in your cart.

get-cart-items-with-ajax-in-shopifyget-cart-items-with-ajax-in-shopify

get-cart-items-with-ajax-in-shopify