Sha256: 680a9ae50a4ac0a9b2db65da4c85f7d452dd5bcd40276bbea445548043e3765b

Contents?: true

Size: 770 Bytes

Versions: 1

Compression:

Stored size: 770 Bytes

Contents

<h1>Shopping Cart</h1>

<% unless @cart.line_items.any? %>
  <p>You don't have any items in your cart. <%= link_to "Go Add Some", products_path %>
<% end %>

<table width="100%">
  <tr>
    <th>Product</th>
    <th>Price</th>
  </tr>
  <% for line_item in @cart.line_items %>
    <tr>
      <td><%= line_item.product.name %></td>
      <td><%= number_to_currency line_item.price %></td>
      <td><%= link_to "Remove", remove_from_cart_path(line_item), :method => :post %></td>
    </tr>
  <% end %>
  <tr>
    <td>Total:</td>
    <td><%= number_to_currency @cart.total_price %></td>
  </tr>
</table>

<hr />
<%= form_tag checkout_path, :style => "text-align: right" do |f| %>
  <%= link_to "Continue Shopping", root_path %>
  or
  <%= submit_tag "Checkout"%>
<% end %>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ecom-0.1.1 app/views/ecom/cart/show.html.erb