<commit_before><%= form_for :order, :url => populate_orders_url, :class => "form-inline" do |f| %>
  <div id="inside-product-cart-form" data-hook="inside_product_cart_form" itemprop="offers" itemscope itemtype="http://schema.org/Offer">

    <% if @product.has_variants? %>
      <div id="product-variants" class="span6">
        <h6 class="product-section-title"><%= t(:variants) %></h6>
        <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.price %>
      <div class="span6" data-hook="product_price">
        <div id="product-price">
          <h2>
            <strong><%= number_to_currency @product.price %></strong>
          </h2>
        </div>
      </div>
      <div class="span6">
        <div class="span3 no_margin_left">
          <% if @product.has_stock? || Spree::Config[:allow_backorders] %>
            <%= number_field_tag (@product.has_variants? ? :quantity : "variants[#{@product.master.id}]"), 1, :class => 'span1', :in => 1..@product.on_hand %>
            <%= button_tag :class => 'btn btn-primary', :id => 'add-to-cart-button', :type => :submit do %>
              <i class="icon-shopping-cart icon-white"></i>
              <%= t(:add_to_cart) %>
            <% end %>
          <% else %>
            <%= content_tag('strong', t(:out_of_stock)) %>
          <% end %>
        </div>
      </div>
    <% end %>
  </div>
<% end %><commit_msg>Mas mejoras<commit_after><%= form_for :order, :url => populate_orders_url, :class => "form-inline" do |f| %>
  <div id="inside-product-cart-form" data-hook="inside_product_cart_form" itemprop="offers" itemscope itemtype="http://schema.org/Offer">

    <% if @product.has_variants? %>
      <div id="product-variants" class="span6">
        <h6 class="product-section-title"><%= t(:variants) %></h6>
        <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.price %>
      <div class="span6" data-hook="product_price">
        <div id="product-price">
          <h2>
            <strong><%= number_to_currency @product.price %></strong>
          </h2>
        </div>
      </div>
      <div class="span6">
        <% if @product.has_stock? || Spree::Config[:allow_backorders] %>
          <%= number_field_tag (@product.has_variants? ? :quantity : "variants[#{@product.master.id}]"), 1, :class => 'span1', :in => 1..@product.on_hand %>
          <%= button_tag :class => 'btn btn-primary', :id => 'add-to-cart-button', :type => :submit do %>
            <i class="icon-shopping-cart icon-white"></i>
            <%= t(:add_to_cart) %>
          <% end %>
        <% else %>
          <%= content_tag('strong', t(:out_of_stock)) %>
        <% end %>
      </div>
    <% end %>
  </div>
<% end %>
{'fraction_non_alphanumeric': 0.18914107699154428, 'fraction_numerical': 0.004672897196261682, 'mean_word_length': 2.1499649614576035, 'pattern_counts': {'":': 0, '<': 109, '<?xml version=': 0, '>': 125, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2391677', 'n_tokens_mistral': 1522, 'n_tokens_neox': 1413, 'n_words': 261}