Sha256: 81f70c17e2222bf9ada8962f66e333b23c8a0215b99da3986e15a6f9c6c01d71
Contents?: true
Size: 1.87 KB
Versions: 8
Compression:
Stored size: 1.87 KB
Contents
<%= form_for :order, :url => populate_orders_url do |f| %> <div data-hook="inside_product_cart_form"> <% if @product.price %> <div data-hook="product_price"> <dl id="product-price"> <dt><%= t(:price) %></dt> <dd><span class="price selling"><%= product_price(@product) %></span></dd> </dl> </div> <% end %> <% if @product.has_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> <%= radio_button_tag "products[#{@product.id}]", v.id, checked, :disabled => !v.in_stock && !Spree::Config[:allow_backorders] %> <label for="<%= ['products', @product.id, v.id].join('_') %>"> <span class="variant-description"> <%= variant_options v %> </span> <% 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.has_variants? ? :quantity : "variants[#{@product.master.id}]"), 1, :class => 'title', :size => 3 %> <%= button_tag :class => 'large primary', :id => 'add-to-cart-button' do %> <%= image_tag('icons/add-to-cart.png') + t(:add_to_cart) %> <% end %> <% else %> <%= content_tag('strong', t(:out_of_stock)) %> <% end %> </div> <% end %>
Version data entries
8 entries across 8 versions & 1 rubygems