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

No items added to cart #27

Closed
christarroja opened this issue Apr 28, 2022 · 3 comments
Closed

No items added to cart #27

christarroja opened this issue Apr 28, 2022 · 3 comments

Comments

@christarroja
Copy link

christarroja commented Apr 28, 2022

After clicking "Add to Cart", the Bag (upper right) is not updated, and the cart is empty.

Steps I did to check if anything is working or not:

1 inspect page

  • go to Network > two items/ show up
  • first items/ (POST) show the correct Headers, Preview, and Response
  • second items/ (GET) do not show anything in Preview and Response (only [])
  • go to Application tab > my next-cart is 'null'

Screen Shot 2022-04-28 at 5 18 22 PM

Screen Shot 2022-04-28 at 5 19 39 PM

2 But in Postman, everything works. (POST, GET, DELETE)

3 Double checked .env file and WooCommerce keys; I even "reinstalled" everything from the latest repo commit, npm install, etc... still the same result

@christarroja
Copy link
Author

Not sure why it works today, didn't change anything but the Add to Cart feature works as of now. Maybe some issue related to sessions?

@christarroja
Copy link
Author

I was able to replicate the issue and solution. When returning to the same browser history (using old cookies/session), then I am not able to add to cart. Cart is not updating at all.

But when I open localhost:3000 in a private/incognito window, then add to cart is now working. Deleting the browser cookies and site data for the site: localhost (127.0.0.1) will also solve this add to cart issue.

Not sure if this solves any problem, but hope you can comment about it.

@wchorski
Copy link

did you ever encounter this problem again? I seem to be running into the same problem on My Issue

it's as if axios.post is not feeding the data to the API, but in POST MAN post | get | delete works out as they should

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