Sha256: fa6cea5354d9b5914c858623f46accec189a29e9f6f1498ad7b9dd6dc87bc975
Contents?: true
Size: 1.5 KB
Versions: 6
Compression:
Stored size: 1.5 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> <p>Quantity: <%= text_field_tag :quantity, 1 %></p> <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> <% else %> <%= text_field_tag "variants[#{@product.variant.id}]", 1 , :class => "title", :size => 3%> <% end%> <%= if @product.has_stock? || Spree::Config[:allow_backorders] "<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
6 entries across 6 versions & 1 rubygems