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] Order Update vs Recreation - summarize pros and cons #12385

Open
kidinov opened this issue Aug 21, 2024 · 6 comments
Open

[Woo POS] Order Update vs Recreation - summarize pros and cons #12385

kidinov opened this issue Aug 21, 2024 · 6 comments
Labels
feature: point of sale POS project type: enhancement A request for an enhancement.

Comments

@kidinov
Copy link
Contributor

kidinov commented Aug 21, 2024

Android currently creates a completely new order whenever the user goes back to the product selection from the checkout screen => this makes the code quite simple as a new order is always created and no comparisons are being done. The main downside is that we are creating gaps in the order numbers.

iOS in such cases updates the original order. It's also quite simple, but requires a custom logic to compare what is new and what to update. More importantly, as we introduce more features - discounts, coupons, ... - this logic might get more complex and less reliable.

Goal of this task is to consider all the tradeoffs and publish a P2 proposal so we can make a final decision and ensure consistency between the platforms.

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

dangermattic commented Aug 21, 2024

Thanks for reporting! 👍

@malinajirka
Copy link
Contributor

@joshheald @staskus @iamgabrielma Is the behavior on iOS still the same? If so, please consider whether we want to move to the Android solution or continue re-using the order. I'd personally vote for syncing the platforms, as the solution which throws away the order feels more robust and future-proof to me. Wdyt?

@malinajirka malinajirka added the type: enhancement A request for an enhancement. label Jan 25, 2025
@joshheald
Copy link
Contributor

The situation's still the same, yes.

We could move to discarding the order.

From a merchant's perspective, the only slight argument against that I can see is the potential for the creation of a lot of Order objects on their site over time; I'm not sure whether unused drafts get discarded or not, and their order numbers will go up rapidly. I don't think either of these are a big problem.

From our perspective, there's been lots of testing of the current approach, moving to a new one may not be a huge benefit right now... but it's not going to get any easier, and I agree that it would be better if both platforms did the same thing here.

@staskus @iamgabrielma what do you think?

@kidinov
Copy link
Contributor Author

kidinov commented Jan 27, 2025

@joshheald

From a merchant's perspective, the only slight argument against that I can see is the potential for the creation of a lot of Order objects on their site over time; I'm not sure whether unused drafts get discarded or not, and their order numbers will go up rapidly. I don't think either of these are a big problem.

I recall that @samiuelson told me that auto-draft orders got cleaned up automatically after some time

@iamgabrielma
Copy link

From our perspective, there's been lots of testing of the current approach, moving to a new one may not be a huge benefit right now... but it's not going to get any easier, and I agree that it would be better if both platforms did the same thing here.

I have no strong opinion in one or the other, only a personal preference of "there's no need to create a new order if the previous one its still ongoing". As mentioned, the only downside seems to be creating useless drafts in the merchant's end, but this shouldn't happen often enough to be an issue.

@staskus
Copy link

staskus commented Jan 28, 2025

@staskus @iamgabrielma what do you think?

Creating a new order seems more fail-proof. And it's appealing especially if auto-draft orders are removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature: point of sale POS project type: enhancement A request for an enhancement.
Projects
None yet
Development

No branches or pull requests

6 participants