Sha256: 760d141f652183cf953acc827a886e4cc042c3f53b3c31b1fa957c7068b42f9c
Contents?: true
Size: 1.7 KB
Versions: 1
Compression:
Stored size: 1.7 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"> <%=image_tag ('products/' + @item.product.filename, :size => '85x57')%> </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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
railscart-0.0.3 | starter_app/vendor/plugins/railscart/app/views/cart/index.rhtml |