I have a scenario where the storefront supports adding to cart and also a "buy now" option. Since there is no cart system in saleor, I have adapted to use the checkout as a cart. When using checkoutCreate, each user is limited to only one open checkout at a time. Meaning that a new checkout cannot be created for the "buy now" while the user has items in their cart.
The current design does make sense for most common use cases, and is quite convenient for cart systems. But having the option to create an instant disposable checkout would be a big help.
One possible hack I can use is to back up the user's existing checkout (cart) as metadata, freeing up the checkout to be used for the buy now. Once completed, the cart can be restored. This would have some pitfalls and drawbacks, but should be possible.
Edit:
Oh looks like there's a related issue #5116
@khalibloo Hey! Thank you for your suggestion. We'll discuss it within the team. Currently, we're working on some essential and important features. So we have other priorities for now. Once I have any feedback on that, I'll let you know.
Best
Thanks very much @karolkielecki. I understand. I'll look into possible workarounds for now. Looking forward to your update on this!
@gsoec any chance you could discuss some of the approaches you tried and the challenges you faced? Or maybe your saleor branch where you tried to implement the feature.
@khalibloo I created a PR #5215, only tested in development environment.
@gsoec thank you very much. I'm sure it'll be very helpful.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Most helpful comment
@gsoec thank you very much. I'm sure it'll be very helpful.