conedevelopment / bazar

Bazar is an e-commerce package for Laravel applications.
https://root.conedevelopment.com
MIT License
421 stars 56 forks source link

[QUESTION] Converting carts to orders #200

Closed LarryBarker closed 11 months ago

LarryBarker commented 2 years ago

Is your feature request related to a problem? Please describe

Just a question on how to implement checkout flows. Looking for docs on how to convert a cart to an order. Currently, my process is:

  1. User adds item to cart (this creates an "item" record with "cart" as the "type")
  2. User checks out
  3. Backend creates order, attaches items from cart, etc.

My question is, when I attach items to the order, this will insert additional "items" with "order" as the "type." Is it better to "convert" the existing items to "order" type?

Also, after the order is created, is the cart "deleted?"