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

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

JasperB
Visitor
3 0 1

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?

Reply 1 (1)

liuchengweihua
Shopify Partner
4 0 0

"/products/{handle}/?section_id=product-quickview", How to output product data in product-quickview.liquid