Sha256: 1b0b52fa472e0ec3d9d960428723daf6ebe9d2d13e632a1fef6b287e86edc384
Contents?: true
Size: 1.52 KB
Versions: 1
Compression:
Stored size: 1.52 KB
Contents
<% form_for :order, :url => orders_url do |f| %> <% if product_price(@product) %> <p class="prices"> <%= t("price") %> <br /> <span class="price selling"><%= product_price(@product) %></span> </p> <% end %> <% if @product.variants? %> <div id="product-variants"> <h2><%= t('variants') %></h2> <ul> <% has_checked = false @product.variants.active.each_with_index do |v,index| next if v.option_values.empty? || (!v.in_stock && !Spree::Config[:show_zero_stock_products]) checked = !has_checked && (v.in_stock || Spree::Config[:allow_backorders]) has_checked = true if checked %> <li> <label> <%= radio_button_tag "products[#{@product.id}]", v.id, checked, :disabled => !v.in_stock && !Spree::Config[:allow_backorders] %> <%= variant_options v %> <% if variant_price_diff v %> <span class="price diff"><%= variant_price_diff v %></span> <% end %> </label> </li> <% end%> </ul> </div> <% end%> <% if @product.has_stock? || Spree::Config[:allow_backorders] %> <%= text_field_tag (@product.variants? ? :quantity : "variants[#{@product.variant.id}]"), 1, :class => "title", :size => 3 %> <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 %>
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
kdmny-spree-0.0.1 | app/views/products/_cart_form.html.erb |