<%= render layout: 'plugins/ecommerce/layouts/ecommerce', locals: {} do %>

Shopping Cart

<%= form_tag(plugins_ecommerce_checkout_cart_update_path, :method => "post", :class => "form") do %> <% total = 0 @products.each do |product| product = product.decorate product_options = @cart.get_option("product_#{product.id}") price = product_options[:price].to_f tax = product_options[:tax].to_f qty = product_options[:qty].to_f sub_total = (price + tax) * qty total += sub_total %> <% end %>
Item Price Tax Quantity Subtotal
<%= product.the_title %> <%= current_site.current_unit %> <%= price %> <%= current_site.current_unit %> <%= tax %> <%= current_site.current_unit %> <%= sub_total.to_f.round(2) %> Remove
Subtotal <%= current_site.current_unit %> <%= total.to_f.round(2) %>
<% if @products.size > 0 %>
Proceed to Checkout
<% end %> <% end %> <% end %>