<%= render layout: 'plugins/ecommerce/layouts/ecommerce', locals: {} do %> <% warning = [] warning << "Not Found Product" if @products.size == 0 %>

Checkout

<%= form_tag(plugins_ecommerce_checkout_processing_path, :method => "post", :class => "form form-validate-ec") do %>

User Details

Name: <%= current_user.fullname %>

<%= render partial: 'plugins/ecommerce/partials/form_address' %>

Coupon

Shipping Option

<% total_weight = 0 weight_price = 0 exist_shipping_method = false @products.each do |product| product_options = @cart.get_option("product_#{product.id}") total_weight += product_options[:weight].to_f * product_options[:qty].to_f end %> <% warning << "Not Found Shipping Methods by Products" unless exist_shipping_method %>
<% if warning.present? %>
<%= raw warning.join("
") %>
<% else %>
<% end %>

Total

<% total = 0 tax_total = 0 @products.each do |product| product = product.decorate product_options = @cart.get_option("product_#{product.id}") price = product_options[:price].to_f qty = product_options[:qty].to_f tax_product = product_options[:tax].to_f tax_total_product = tax_product * qty tax_total += tax_total_product sub_total = price * qty total += sub_total %> <% end %> <% total += tax_total %>
Quantity Item Price Tax Subtotal
<%= qty.to_i %> <%= product.the_title %> <%= current_site.current_unit %> <%= price %> <%= current_site.current_unit %> <%= tax_product %> <%= current_site.current_unit %> <%= sub_total + tax_total_product %>
Total (excluding Tax) <%= current_site.current_unit %> <%= total %>
Tax <%= current_site.current_unit %> <%= tax_total %>
Shipping <%= current_site.current_unit %> <%= weight_price %>
Total <% total += weight_price %> <%= current_site.current_unit %> <%= total %>
<% end %>
<% end %>