So, I'm currently building out an eCommerce site for a client. I'm adding products to the cart via AJAX. I'm then sliding out a 'Cart' view panel with the current cart contents, which is being updated with Craft's JSON response for the cart. (Via
My problem is this: I need to display the thumbnail image of a product, and there doesn't seem to be anywhere I can get the asset field (or any fields) associated with the product. There is no
purchasable key in the cart object, just a
purchasableId. I've looked in the
snapshot object within
lineItems, and in the
product object within that
snapshot object. There doesn't seem to be any asset field (or any field) attached to this information at all.
I know I can make an additional request to fetch that information, but I'd like to avoid that if at all possible; I'm hoping it's just buried somewhere in the response.
Any help is greatly appreciated! Let me know if I need to clarify something.