<% content_for :head do %>
  <%= stylesheet_link_tag "front/cart" %>
  <%= javascript_include_tag :defaults %>
  <%= javascript_include_tag 'cart_delivery' %>
<% end %>

<%# 発送選択 %>
<h2 class="main_t">発送方法選択</h2>
<div id="cart">
  <%= image_tag("cart/route03.gif", :width => "583", :height => "31", :alt => "ご購入の流れ", :class => "route") %>
  <%- if flash.now[:error] %>
    <div class="errorExplanation" id="errorExplanation">
      <p><%=h flash[:error] %></p>
    </div>
  <% end %>
  <% form_for :order_delivery, :url => {:action => :purchase} do |f| %>
    <% @carts_map.each do |retailer_id, cart_array| %>
      <%= render :partial => "set_delivery_each_retailer", :locals => {:carts => cart_array, :retailer_id => retailer_id, :f => f} %>
    <% end %>
    <%= render :partial => "order_deliveries" %>

    <div class="my_btn2">
      <%=hidden_field_tag "back"%>
      <% if @not_login_customer%>
        <%= image_submit_tag '/images/cart/cart_btn05.gif', {:onclick => "this.form.action='/cart/temporary_shipping'; this.form.submit();document.getElementById('back').value=1",:width=>'101', :height=>'28', :alt=>'戻る', :class=>'hoverImg'} %>
      <% elsif @login_customer%>
        <%= image_submit_tag '/images/cart/cart_btn05.gif', {:onclick => "this.form.action='/cart/shipping'; this.form.submit();document.getElementById('back').value=1",:width=>'101', :height=>'28', :alt=>'戻る', :class=>'hoverImg'} %>
      <% end %>
      <%= image_submit_tag '/images/entry/entry_btn3.gif', :width=>'101', :height=>'28', :alt=>'次へ', :class=>'hoverImg' %>
    </div>


  <% end %>
</div>
