Sha256: 9196d6865fdd5b151957c39de647bd5e54bb5479018e70851e6637a490ea0218

Contents?: true

Size: 1.67 KB

Versions: 1

Compression:

Stored size: 1.67 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.variant.product) %>
          </td>
          <td valign="top">              
            <%=link_to @item.variant.product.name, :controller => 'store', :action => 'show', :id => @item.variant.product %>
            <%= variant_options @item.variant %><br/>
            <%=truncate(@item.variant.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

1 entries across 1 versions & 1 rubygems

Version Path
spree-0.0.8 starter-app/vendor/plugins/spree/app/views/cart/index.rhtml