Shopify Predictive Search API Product not returning Variant ID

JosePila
New Member
3 0 0

Hello,

I was working on adding a quick add to cart button in search requests based on an Ajax call, however the returned product object is returning an empty variants array.

This empty variants array is returned for both products with & without variants.

The documentation says that I am supposed to be able to access the products variant ID through this request.

https://shopify.dev/docs/themes/ajax-api/reference/predictive-search

Does anyone know how to fix this? 

0 Likes