Jump to content

Access data in cart

Recommended Posts

I would like to access the information that was added to the cart. 

I can see in the source page of the cart that a json message is used like the one I show below. 

My question is how canI access this information using injection code from another page?

{"cart":

{"id":"6449661d6425dd3ce121b64b",

 "cartToken":"5it6x3HFD4XZnjDC2dDaR1TwRK4I1pp08h7S-u3u",

 "items":[{"id":"6449661d36d9b40c9cbd5c71",

           "productId":"641749825cf2ca012575a394",

           "productType":"PHYSICAL",

           "sku":"SQ5692676",

           "variantId":"fcdfcc6a-6061-46f9-a18e-a08f43eaab36",

           "productName":"Cabaz Gourmet Mil e Uma Noites",

           "productDescription”:,

           "productUrl":"/produtos/p/1001box",

           "quantity":3,"multipleQuantityAllowed":true,

           "unitPrice":{"currencyCode":"EUR","value":7000,"decimalValue":"70.00","fractionalDigits":2},

           "itemTotal":{"currencyCode":"EUR","value":21000,"decimalValue":"210.00","fractionalDigits":2},

           "variantOptions":[],"image”:{},”….

           "subtotal":{"currencyCode":"EUR","value":21000,"decimalValue":"210.00","fractionalDigits":2},

           "shippingTotal":{"currencyCode":"EUR","value":0,"decimalValue":"0.00","fractionalDigits":2},

           "discountTotal":{"currencyCode":"EUR","value":0,"decimalValue":"0.00","fractionalDigits":2},

           "taxTotal":{"currencyCode":"EUR","value":0,"decimalValue":"0.00","fractionalDigits":2},

           "appliedGiftCardBalanceTotal":{"currencyCode":"EUR","value":0,"decimalValue":"0.00","fractionalDigits":2},

           "grandTotal":{"currencyCode":"EUR","value":21000,"decimalValue":"210.00","fractionalDigits":2},

           

…}

 

 

Link to comment
  • Replies 0
  • Views 280
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment


×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.