<% if @cart.sellables.any? -%> <%= form_tag piggybak.cart_update_url do -%> <% if page == "cart" -%> <% end -%> <% @cart.sellables.each do |item| %> <% if page == "cart" -%> <% end -%> <% end -%> <% if page != "cart" -%> <% Piggybak.config.line_item_types.each do |k, v| -%> <% if v.has_key?(:display_in_cart) -%> " style="display:none;"> <% end -%> <% end -%> <% end -%>
Item Price Quantity Subtotal
<%= item[:sellable].description %> <%= number_to_currency item[:sellable].price %> <% if page == "cart" -%> <%= text_field_tag "quantity[#{item[:sellable].id}]", item[:quantity] %> <% else -%> <%= item[:quantity] %> <% end -%> <%= number_to_currency item[:quantity]*item[:sellable].price %> <%= link_to "Remove", piggybak.remove_item_url(item[:sellable].id), :method => :delete %>
">
"> Subtotal <%= number_to_currency @cart.total %>
"> Tax
"> Shipping
"> <%= v[:display_in_cart] %> $0.00
"> Total
<% if page == "cart" %> <%= link_to "Proceed to Checkout", piggybak.orders_url, :id => "checkout" %> <%= submit_tag "Update", :id => "update" %> <% end -%> <% end -%> <% else -%>

Your cart is empty.

<% end -%>