title: Checkout form calculation based on radio-button - Laravel 5.2
body: <p>i am building an e-commerce website with laravel 5.2</p>
  
  <p>I can add my products to my shopping cart, which is stored in a session. I can view my shopping cart &amp; when i click confirm i go to a checkout page.</p>
  
  <p><strong>Shopping Cart (working as intended)</strong>:
  <a href="https://i.stack.imgur.com/qpyNi.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qpyNi.png" alt="shopping-cart"></a></p>
  
  <p>All my items on the checkout page are still only in the session. Is this good practice or should i store stuff in de database after i go to the checkout page? .</p>
  
  <p>On my checkout page i have a couple of radio-buttons to select the shipping method. I would like to make a calculation based upon my selection. What is the best way to handle this? I would like to avoid putting a submit button below the radio-buttons to confirm the selection. An important notice is that i also have a field for a Coupon code on this page which i calculate using a get request. So refreshing the page is not really an option because my coupon calculation will be gone.</p>
  
  <p><strong>Checkout page: (Radio-buttons are here)</strong>
  <a href="https://i.stack.imgur.com/nj7QX.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/nj7QX.png" alt="enter image description here"></a></p>
  
  <p>2 Options i can think of:</p>
  
  <ul>
  <li><p>Make the calculation on the client side with javascript and add hidden input fields for when the user clicks confirm order they get saved into the database table for orders. </p></li>
  <li><p>Start saving data in de database after the shopping cart, the problem with this approach is that a lot of data is still missing. Like the correct shipping/billing address.</p></li>
  </ul>