Nostromos / what.ecom

PERN Ecom app for Codecademy's Full Stack path.
MIT License
0 stars 0 forks source link

Add a status to carts to tell what's inactive, cleared, abandoned, checkout failed, etc. #50

Open Nostromos opened 8 months ago

Nostromos commented 8 months ago
// TODO

If I were building a real ecom site, I wouldn't want to have carts removed from db when users clear them. I'd want to keep that data to track what/why users were clearing. Rather, I'd want the "clear cart" action to set cart status to "cleared" or something like that. When/if they add again, I'd create a new cart for them.

Perhaps I want to create a cart for each user immediately, even if empty... Unsure.

https://github.com/Nostromos/what.ecom/blob/d2d0c9710add85d6a3c3170bd644b1925e82829d/backend/routes/CartRouter.js#L44