I have the following scenario in my database:
With this structure, I can show the following information to my user:
"Your cart has 2 products, with the total of $400
- Product 1, $100
- Product 2, $300
- Total: $400 ".
My company wants to sell products inside groups to give discounts to its customers. And I need to show information like this:
"You are buying Product Group 1 which has the following products:
- Product 1, $100
- Product 2, $300
- Product 3, $240 .... Total: $1000".
So I've remodelled the database to something like this:
But I'm facing some problems, and would like to know if this the best way to work with item grouping in an ecommerce application?
A customer can choose this package into his cart with (or without) other individual products, what kind of generalization can be used here?