Sha256: 09222f2a54f045650c0eb0cf70f7953c62294df20e0667c01f828e05fb2b1c2c

Contents?: true

Size: 1.66 KB

Versions: 4

Compression:

Stored size: 1.66 KB

Contents

<%= stylesheets %>

<div id="shopping-cart">
  <h1>Shopping Cart</h1>
  
  <% form_tag do-%>
    <table class="cart-summary" width="100% ">
      <tr>
        <th colspan="2">Item</th>
        <th>Price</th>
        <th>Qty</th>
        <!--
        <th>Delete</th>
        -->
        <th>Total</th>
      </tr>
      <% for @item in @cart.cart_items %>
        <tr class="<%= cycle('even', 'odd') %>">
          <td width="100">
            <%= small_image(@item.product) %>
          </td>
          <td valign="top">              
            <%=link_to @item.product.name, :controller => 'store', :action => 'show', :id => @item.product-%>
            <%= variation_options @item.variation if @item.variation %><br/>
            <%=truncate(@item.product.description, length = 100, truncate_string = "...")-%>
          </td>
          <td valign="top" width="75">$ <%= sprintf("%0.2f", @item.price) %></td>
          <td valign="top" width="50"><%= text_field "item[]", :quantity, :size => 1 -%></td>
          <td valign="top" width="75">$ <%= sprintf("%0.2f", @item.price * @item.quantity)-%></td>
        </tr>
      <% end %>      
    </table>
    <div id="subtotal">
      <h3>Subtotal $ <%= sprintf("%0.2f", @cart.total) %></h3>
      <%= submit_tag 'Update' %>
      <%= link_to "Checkout", :controller => 'checkout' %> <!-- todo: replace with image and surround with link -->
    </div>
  <% end %>
  <%if previous_location %>
    <p><a href="<%=previous_location%>">Continue Shopping</a></p>
  <%end%>  
  <% unless @cart.cart_items.empty? %>
    <p id="clear_cart_link">
      <small>
        <%= link_to "Empty Cart", :action => 'empty' %>
      </small>
    </p>
  <% end %>
</div>

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
railscart-0.0.4 starter_app/vendor/plugins/railscart/app/views/cart/index.rhtml
spree-0.0.5 starter-app/vendor/plugins/spree/app/views/cart/index.rhtml
spree-0.0.6 starter-app/vendor/plugins/spree/app/views/cart/index.rhtml
spree-0.0.7 starter-app/vendor/plugins/spree/app/views/cart/index.rhtml