Sha256: fd90dcc0ec342436f239937a9f59e0a092dd170b7a938daefd8064050aa97fc1

Contents?: true

Size: 1.46 KB

Versions: 1

Compression:

Stored size: 1.46 KB

Contents

<%= form_for(current_order, method: :post, url: new_order_path, id: 'bodega-checkout') do |form| %>
  <table id="bodega-cart">
    <thead>
      <tr><th class="product-name" colspan="2"><%= t 'bodega.product' %></th><th class="product-price"><%= t 'bodega.price' %></th><th class="product-total" colspan="2"><%= t 'bodega.total' %></th></tr>
    </thead>
    <tbody>
      <%= form.fields_for(:order_products) do |order_product_form| -%>
      <%= render partial: 'cart_row', locals: {form: order_product_form, order_product: order_product_form.object} %>
      <% end =%>
      <%= render partial: 'email_row', locals: {form: form} if Bodega.config.collect_email %>
      <%= render partial: 'shipping_row', locals: {form: form} if current_order.shipping_method %>
    </tbody>
    <tfoot>
      <% if current_order.ready? -%>
      <tr>
        <td class="product-total-label" colspan="3"><%= t 'bodega.total' %></td>
        <td class="product-total" nowrap="nowrap"><%= humanized_money_with_symbol current_order.total %></td>
        <td></td>
      </tr>
      <% end -%>
    </tfoot>
  </table>
  <% if current_order.ready? -%>
  <%= button_tag t('bodega.update_cart'), id: 'bodega-update', name: :update, value: 1 %>
  <%= button_tag t('bodega.check_out'), id: 'bodega-checkout', name: :checkout, value: 1 %>
  <% else -%>
  <%= button_tag t('bodega.calculate_shipping'), id: 'bodega-update', name: :update, value: 1 %>
  <% end -%>
<% end =%>
<%= render Bodega.config.payment_method.to_s %>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
bodega-0.4.12 app/views/bodega/orders/_cart.html.erb