title: How to Store purchases of "N of the same Product" in an Orders table
body: <p>So We have our basic tables for the categories, products, and variants of products</p>
  
  <p><strong>categories</strong><br>
  <code>id | name | active | parent_id</code></p>
  
  <p><strong>products</strong><br>
  <code>id | name | price | active</code></p>
  
  <p><strong>c_p_link</strong><br>
  <code>category_id | product_id</code></p>
  
  <p><strong>variants</strong><br>
  <code>id | product_id | price | price_override | active | stock</code></p>
  
  <p>Which works great.</p>
  
  <p>But I have two queries.</p>
  
  <p>The first being how to structure the orders.</p>
  
  <p>We have an <strong>orders</strong> table<br>
  <code>id | customer_id | ordered | status</code></p>
  
  <p>And we also have a <strong>order_products</strong> table<br>
  <code>id | order_id ..?</code></p>
  
  <p>this is the one I am curious about.
  Say a customer orders 30 of a product. do we </p>
  
  <ul>
  <li>Add 30 rows, and add the price for each individual item on each row.</li>
  <li>Add one row, add the combined total onto the row</li>
  <li>Add one row, add the individual price onto the row</li>
  </ul>
  
  <p>The next part is, later we are expecting to add voucher support to the cart. e.g. 10% off, buy two, get one free etc. the overall design of this I am not too fussed about right now (this is a couple of months off at least). but I am wondering if that is going to affect which version of the <strong>order_products</strong> table I should choose?</p>