saleor / saleor-storefront

A GraphQL-powered, NextJs-based, PWA storefront for Saleor. IMPORTANT: This project is [DEPRECATED] in favor of saleor/react-storefront soon to become our default demo and storefront starter pack.
https://demo.saleor.io/
BSD 3-Clause "New" or "Revised" License
770 stars 672 forks source link

Adding a product to cart through Saleor Api #1063

Open SalmanTayyab454 opened 3 years ago

SalmanTayyab454 commented 3 years ago

Hello, By using Saleor api I am adding a product into the cart.Like this this.$saleor.cart.addItem('UHJvZHVjdFZhcmlhbnQ6MjA5', 1); I am getting a response that you have to add the product in the cart to create the checkout process. What is the correct way of adding a product in cart through api?

krzysztofwolski commented 3 years ago

Hello, documentation can be found here: https://docs.saleor.io/docs/3.0/developer/checkout#creating-a-checkout-session