Really need help for this - Creating order problem

I would change how that DB is structured. Personally, I wouldn’t use a cart. I know it’s traditional for ecommerce to have it and it would be nice to have users return and see all the items in the cart.

What I would do is when the user selects an item, add it to a draft or unpaid order (you can have an order status field and a binary paid field). When they check out, simply update the order status.

Note: you can take all the items from the cart to an order using a bulk action with a timer. There’s a lot of materials already about there for this - Bulk operations and Timer Tricks, part 3: mass update for the records

1 Like