/?section_id=cart-drawer ajax call returns product but with an empty price and title

JasperB
Visitor
2 0 0

Hi.

 

After I added a product to the cart I have set up a ajax call in a liquid file:
$.ajax({
url: '/?section_id=cart-drawer',
type: 'GET',
dataType: 'html'

....

}}

 

But for some reason it takes sometimes half a minute to retrieve the right information. All calls return the cart with a product in it with the right custom properties I added, but the product's title is empty and the price shows €0,00.

 

I've been working on something custom which creates a new product variant server side upon clicking add to cart, returns once that's successful. So the product variant exists at the time of adding it to the cart. But for some reason there's still a delay.

 

Would there be a fitting solution?

Replies 0 (0)