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

[Woo POS] M2: Make sure that product passed to the totals is in the database #11981

Closed
kidinov opened this issue Jul 11, 2024 · 4 comments
Closed
Assignees
Labels

Comments

@kidinov
Copy link
Contributor

kidinov commented Jul 11, 2024

As pull to refresh clears the DB, we may, in some cases, end up with the products being deleted from the DB

Convo on this topic, with one potential solution

#11923 (comment)

@kidinov kidinov added the feature: point of sale POS project label Jul 11, 2024
@dangermattic
Copy link
Collaborator

🚫 Please add a type label (e.g. type: enhancement) and a feature label (e.g. feature: stats) to this issue.

@kidinov kidinov changed the title [Woo POS] Make sure that product passed to the totals is in the database [Woo POS] M2 make sure that product passed to the totals is in the database Jul 15, 2024
@kidinov kidinov changed the title [Woo POS] M2 make sure that product passed to the totals is in the database [Woo POS] M2: make sure that product passed to the totals is in the database Jul 15, 2024
@backwardstruck
Copy link
Contributor

backwardstruck commented Jul 26, 2024

@kidinov you mentioned "Anyway let's think about that latter as this an edge case - maybe not even worths thinking for the POC"

Do we want to keep this in M2 or move to "Consider after MVP"?

Also, do we want to proceed with @samiuelson approach or something simpler?

What do you think about looking for the product in DB first, and if not found, fetching from remote as a backup?

1. productStore.getProductByRemoteId(selectedSite.get(), remoteProductId)
2. store.fetchSingleProduct()
3. Show error if product not found on backend

@kidinov
Copy link
Contributor Author

kidinov commented Aug 5, 2024

@backwardstruck, my opionion is that we should just clear up the cart if a user makes PTR of the products as:

  • It's simple to implement and keep all kinda stateless -> potentially less bags
  • It matches the UX, as we currently hide the cart in loading/error/empty state

@kidinov kidinov self-assigned this Aug 7, 2024
@kidinov kidinov changed the title [Woo POS] M2: make sure that product passed to the totals is in the database [Woo POS] M2: Make sure that product passed to the totals is in the database Aug 7, 2024
@kidinov kidinov linked a pull request Aug 8, 2024 that will close this issue
2 tasks
@kidinov
Copy link
Contributor Author

kidinov commented Aug 15, 2024

We discussed that this not neccesary now

p1723641605617179-slack-C025A8VV728

@kidinov kidinov closed this as completed Aug 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants