Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Both REST /add-smartphone-to-cart/ and /add-to-cart/ not working #9

Open
Pengu1no opened this issue Jun 18, 2019 · 4 comments
Open

Comments

@Pengu1no
Copy link

Pengu1no commented Jun 18, 2019

What happened?

I've created Angular 7 frontend application. Each endpoint worked well except cart adding. Sending POST request does not adds products to cart. When I tried to add serializer.save() into core shop.views.catalog I got errors and I have no idea how to proceed
P.S. User is authenticated

What should've happened instead?

Product should appear in the cart

Steps to reproduce

  • Add new product to database
  • Authenticate (ex. JWT)
  • Send POST to add to cart

OR

  • Add new product to database
  • Authenticate (in-box authentication)
  • Open /slug/add-smartphone-to-cart/
  • Send any value in post

Profit!

OS: Ubuntu 18.04, local run

@Pengu1no
Copy link
Author

P.P.S. Library code is not needed to be changed to reproduce issue

@jrief
Copy link
Member

jrief commented Jun 19, 2019

Could you please tell me which values you are sending to the endpoint .../add-to-cart/.
Did you compare these values with those sent by the browser, if the project has been set up through cookiecutter?

@Pengu1no
Copy link
Author

Yep, I've followed readme

@Pengu1no
Copy link
Author

My screenshots
Screenshot 1 (rest)
Screenshot 2 (rest)
Screenshot Cart
And since my "qwerty" product is smartphone I cannot use /add-to-cart/ (screenshot below)
Error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants