Cart API not working

I have been facing the issue of adding a product to cart using cart AJAX API from the theme app extension code.

Somehow I tried to fix it and it worked. Stores using custom shopify themes are making an issue again. Some of the scripts written in the theme is not allowing request from our app embed block. Also, other apps installed on the same store also making the same impact. I’m not sure which one is doing this.

Does anyone faced this same situation ?? If so, how did you overcome this.

Hi Narayanan,

Are you still seeing this?

Stores using custom shopify themes are making an issue again.

When you say custom themes - are these any non-theme store themes? (Ie: this issue can’t be replicated on themes from the theme store)

Yes @Liam-Shopify I’m still facing the same issue.

It’s like, the initial request sent is being denied and I’m not able to find the actual reason like whether it is because of the custom theme’s scripts or other apps are doing it?

Actually the theme that the store uses is not from the theme store. I think it is a custom built one out from the themes available in theme store.

Can you replicate the issue on a theme like Dawn?

yes @Liam-Shopify . I’m facing the same issue in Dawn theme also. Sometimes, the /cart/add api seems to be not working fine because, when I try to add a product to cart, the products aren’t getting added to cart. But when I track the API’s response separately it returns 200 status. When comes to UI, it doesn’t work the same as expected.