Tags:
- API
Additional cart item properties available in Shopify's AJAX API response
We've added new properties on cart items listed in the JSON response of Shopify's AJAX API. Each cart item listed in the items array has the following additional properties.
: an object with the varaint image'salt text,andurl.: an array of objects with each product option'snameandvalue.: a boolean describing if the product only has a default variant.
This gives theme developers more information about cart items when working with the AJAX API to build storefront designs.
To learn more about interacting with the cart through AJAX calls, read about the Shopify's AJAX API in the Shopify Help Center.
You can also read about these new properties' Liquid equivalent in the object in the Shopify Help Center.
Was this section helpful?