Closed zombor closed 7 years ago
cart line items are accessed through the getter lineItems
on the cart object. attrs
is internal implementation details.
The right way to get to the title attribute is cart.lineItems[0].title
. If you're accessing it through attrs
, you're getting the raw data from out APIs before it's been wrapped in a model.
I'm having a similar problem where the cart.lineItems[0].title value is undefined.
I'm passing the whole variant object through, but is there something else I should be passing the addLineItemToCart function?
Looking to write a js app on top of shopify data for a store. The cart line item model documentation page has data documented which isn't available: http://shopify.github.io/js-buy-sdk/api/classes/CartLineItemModel.html
For example, it says there's
title
which seems to be missing:It appears there's no actual way to get the product title for an item in a cart. Is there another way to get this data?