0

I was able to sign in using /rest/V1/integration/customer/token and add items to cart. How do I view the cart(items I added using REST API) from front-end?

asked Apr 13, 2016 at 21:58
1

1 Answer 1

0

just make get request to

V1/carts/mine/items

You should get a json response with the data.

The cart needs to be create first, you do that by posting to

V1/carts/mine
answered Aug 19, 2016 at 9:42
5
  • This doesn't answer the question at all.OP wants to view the cart in the Magento storefront, not list the items in the API. Commented May 21, 2019 at 9:14
  • @DougMcLean the store front doesn't use rest api... storefront != frontend.. Commented May 22, 2019 at 10:52
  • Magento themselves treat the two terms as synonymous, pretty much: see devdocs.magento.com/guides/v2.3/architecture/archi_perspectives/…. But we are at risk of arguing over semantics. My understanding of the question is that OP wants to generate a cart via the API, add items to it via the API, but then link to the storefront and have that cart shown there. It's a requirement I've seen before: browse and pick via an app, but then be sent to a single point of checkout (the storefront) to complete the order. Commented May 22, 2019 at 15:40
  • 1
    I see your point.. And magento should use the term more visely as the store front is made from both backend (PHP) and frontend (HTML/JS/CSS).. Guess we just assume different things.. OP talked about managed to login using rest so I was just assuming that he/she was talking about making at xhr request to post cart items and then retrieving them in the same way :) Commented May 24, 2019 at 5:23
  • 1
    Guess it´s good that we post about both options here as comments :) Commented May 24, 2019 at 5:25

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.