Sha256: 9990885dd75a3ca645c6426c96f4705a52b281911002729c4cc30254cbf84952

Contents?: true

Size: 1.61 KB

Versions: 1

Compression:

Stored size: 1.61 KB

Contents

<div id="minicart">
  <% @body_id = 'cart' %>

  <% if current_order.nil? || current_order.line_items.empty? %>

    <div data-hook="empty_minicart">
      <p><%= t(:your_cart_is_empty) %></p>
      <p><%= link_to t(:continue_shopping), products_path, :class => 'button continue' %></p>
    </div>

  <% else %>
    <div data-hook="outside_minicart_form">
      <div id="minicart-details" data-hook="minicart_details" class="clearfix">
        <p>
          <span><%= t(:subtotal) %>: <span class="order-total"><%= order_subtotal(current_order.reload) %></span></span>
          <%= link_to t(:checkout), checkout_path, :class => 'button checkout primary', :id => 'checkout-link' %>
        </p>
      </div>
      <%= form_for current_order, :url => update_cart_path, :html => {:id => 'update-minicart'}, :remote => true do |order_form| %>
        <div data-hook="inside_minicart_form">

          <div data-hook="minicart_items" class="clearfix">
            <%= render :partial => 'spree/shared/error_messages', :locals => { :target => @order } %>
            <ul id='minicart-items' class="clearfix">
              <%= order_form.fields_for :line_items do |item_form| %>
                <%= render :partial => 'spree/shared/minicart_line_items', :locals => { :variant => item_form.object.variant, :line_item => item_form.object, :item_form => item_form } %>
              <% end %>
            </ul>
          </div>
        <div id="minicart-footer" data-hook="minicart_footer">
          <p><%= link_to t("view_shopping_cart"), cart_path, :class => 'cart' %></p>
        </div>
        </div>
      <% end %>
    </div>
  <% end %>

</div>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
spree_minicart-1.1.2 app/views/spree/shared/_minicart.html.erb