Sha256: 64a4d02868978e2872d72e177829973410b4b8843a6ba2e12284bc2b54aa1c11

Contents?: true

Size: 914 Bytes

Versions: 4

Compression:

Stored size: 914 Bytes

Contents

<%= form_for :order, :url => populate_orders_url do |f| %>
<%= hook :inside_product_cart_form do %>

  <% if product_price(@product) %>
    <%= hook :product_price do %>
      <p class="prices">
        <%= t("price") %>
        <br />
        <span class="price selling"><%= product_price(@product) %></span>
      </p>
    <% end %>
  <% end %>

  <%= render 'variant_options' %>
    
  <% if @product.has_stock? || Spree::Config[:allow_backorders] %>
    <%= text_field_tag (@product.has_variants? ? :quantity : "variants[#{@product.master.id}]"),
      1, :class => "title", :size => 3 %>
    &nbsp;
    <button type='submit' class='large primary'>
      <%= image_tag('/images/add-to-cart.png') + t('add_to_cart') %>
    </button>
  <% else %>
    <%= content_tag('strong', t('out_of_stock')) %>
  <% end %>

<% end %>
<% end %>

<% content_for :head do %>
  <%= javascript_include_tag 'product' %>
<% end %>

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
spree_variant_options-0.2.0 app/views/products/_cart_form.html.erb
spree_variant_options-0.1.1 app/views/products/_cart_form.html.erb
spree_variant_options-0.1.0 app/views/products/_cart_form.html.erb
spree_variant_options-0.1.0.rc1 app/views/products/_cart_form.html.erb