<h2>Your Cart</h2>

<table>
  <%= render(cart.line_items) %>

  <tr class="total_line">
    <td colspan="2">Total</td>
    <td class="total_cell"><%= number_to_currency(cart.total_price) %></td>
  </tr>  
</table>
<%= button_to "Checkout", new_order_path, method: :get %>
<%= button_to 'Empty cart', cart, method: :delete, data: { confirm: 'Are you sure?' } %>


<h2>Your Cart</h2>

<table>
  <%= render(cart.line_items) %>

  <tr class="total_line">
    <td colspan="2">Total</td>
    <td class="total_cell"><%= number_to_currency(cart.total_price) %></td>
  </tr>  
</table>
<% unless current_page?(:controller => 'orders', :action => 'new') %>
  <%= button_to "Checkout", new_order_path, method: :get %>
<% end %>
<%= button_to 'Empty cart', cart, method: :delete, data: { confirm: 'Are you sure?' } %>


Hide checkout button on checkout page
Hide checkout button on checkout page
