FROM CACHE - en_header

Cart line item partially working (missing product image, price)

Shopify Partner
23 1 6


I hope you are doing great!

I am facing an issue with the cart line item since yesterday.

While adding a product to the cart page with product properties using Ajax API call "/cart/add.js"

It was working fine since yesterday and Now it is not showing price and product image in the line item of cart page cart.

When I redirect customer to cart page after clicking add to cart button and get response in success callback of the jQuery Ajax. I am getting lineitem with missing image ,zero price and after refresh this cart page again it will show the cart item properly.

Below is the code of ajax cart api if you want to test this scenario.


var productProperties = {};
productProperties['first'] ='first';
productProperties['Second'] = 'Second';
productProperties['test'] = 'test';
var productData = { quantity: 1, 
                                 id: , 12345678 // add your shop variant id here.
                                 properties: productProperties
 var url = "/cart/add.js";
       type: "POST",
       url: url,
       data: productData,
       dataType: "json",
       success: function (response) {
                   window.location.href = '/cart';
        }, error: function (response) {


Sometimes it works fine and sometimes it not working.




Replies 2 (2)
Shopify Partner
23 1 6


I need your help on this issue. It will be great if you find some time and reply on this thread.

Looking forward to hearing from you soon.

Thanks in advance.

Shopify Partner
23 1 6

Actually, this is not the Cart Ajax API issue. Sometimes cart is taking 15 - 20 seconds time to load the cart line items.

It will be great if Shopify support can investigate this issue. 

Your contribution is required on this issue. @SBD_ , @vix , @Busfox@Shopify