<commit_before><%= form_for :order, html: { id: 'add-to-cart-form' } do |f| %>
  <div class="row" id="inside-product-cart-form" data-hook="inside_product_cart_form" itemprop="offers" itemscope itemtype="https://schema.org/Offer">
    <% if @product.variants_and_option_values(current_currency).any? %>
      <div id="product-variants" class="col-md-6">
        <h3 class="product-section-title"><%= Spree.t(:variants) %></h3>
        <ul class="list-group">
          <% @product.variants_and_option_values(current_currency).each_with_index do |variant, index| %>
            <li>
              <%= radio_button_tag "variant_id", variant.id, index == 0,
                  'data-price' => variant.price_in(current_currency).money,
                  'data-in-stock' => variant.can_supply?,
                  'data-backordered' => variant.backordered?
              %>
              <%= label_tag "variant_id_#{ variant.id }" do %>
                <span class="variant-description">
                  <%= variant.options_text %>
                </span>
                <% if variant_price variant %>
                  <span class="price diff"><%= variant_price variant %></span>
                <% end %>
                <% unless variant.can_supply? %>
                  <span class="out-of-stock"><%= Spree.t(:out_of_stock) %></span>
                <% end %>
              <% end %>
            </li>
          <% end%>
        </ul>
      </div>
    <% else %>
      <%= hidden_field_tag "variant_id", @product.master.id %>
    <% end %>

    <% if @product.price_in(current_currency) && !@product.price.nil? %>
      <div data-hook="product_price" class="col-md-5">
        <div id="product-price">
          <h6 class="product-section-title"><%= Spree.t(:price) %></h6>
          <div>
            <span class="lead price selling" itemprop="price" content="<%= @product.price_in(current_currency).amount.to_d %>">
              <%= display_price(@product) %>
            </span>
            <span itemprop="priceCurrency" content="<%= current_currency %>"></span>
          </div>

          <% if @product.master.can_supply? %>
            <link itemprop="availability" href="https://schema.org/InStock" />
          <% elsif @product.variants.empty? %>
            <br />
            <span class="out-of-stock"><%= Spree.t(:out_of_stock) %></span>
          <% end %>
          <% if @product.backordered? %>
            <div class="alert alert-warning" id="cart-backordered-info">
              <%= Spree.t(:backordered_info) %>
            </div>
          <% end %>
        </div>

        <% if @product.can_supply? %>
          <div class="add-to-cart">
            <br />
            <div class="input-group">
              <%= number_field_tag :quantity, 1, class: 'title form-control', min: 1 %>
              <span class="input-group-btn">
                <%= button_tag class: 'btn btn-success', id: 'add-to-cart-button', type: :submit, disabled: true do %>
                  <%= Spree.t(:add_to_cart) %>
                <% end %>
              </span>
            </div>
          </div>
        <% end %>
      </div>
    <% else %>
      <div id="product-price">
        <br />
        <div><commit_msg>Cart form updates to latest bootstrap markup and classes<commit_after><%= form_for :order, html: { id: 'add-to-cart-form' } do |f| %>
  <div class="row" id="inside-product-cart-form" data-hook="inside_product_cart_form" itemprop="offers" itemscope itemtype="https://schema.org/Offer">
    <% if @product.variants_and_option_values(current_currency).any? %>
      <div id="product-variants" class="col-md-6">
        <h3 class="product-section-title"><%= Spree.t(:variants) %></h3>
        <ul class="list-group">
          <% @product.variants_and_option_values(current_currency).each_with_index do |variant, index| %>
            <li class="list-group-item <%= "active" if index == 0 %>">
              <div class="form-check">
                <%= radio_button_tag "variant_id", variant.id, index == 0,
                    'data-price' => variant.price_in(current_currency).money,
                    'data-in-stock' => variant.can_supply?,
                    'data-backordered' => variant.backordered?,
                    class: 'form-check-input'
                %>
                <%= label_tag "variant_id_#{ variant.id }", class: "form-check-label" do %>
                  <span class="variant-description">
                    <%= variant_options variant %>
                  </span>
                  <% if variant_price variant %>
                    <span class="price diff"><%= variant_price variant %></span>
                  <% end %>
                  <% unless variant.can_supply? %>
                    <span class="out-of-stock"><%= Spree.t(:out_of_stock) %></span>
                  <% end %>
                <% end %>
              </div>
            </li>
          <% end%>
        </ul>
      </div>
    <% else %>
      <%= hidden_field_tag "variant_id", @product.master.id %>
    <% end %>

    <% if @product.price_in(current_currency) && !@product.price.nil? %>
      <div data-hook="product_price" class="col-md-5">
        <div id="product-price">
          <h3 class="product-section-title"><%= Spree.t(:price) %></h3>
          <div>
            <span class="lead price selling" itemprop="price" content="<%= @product.price_in(current_currency).amount.to_d %>">
              <%= display_price(@product) %>
            </span>
            <span itemprop="priceCurrency" content="<%= current_currency %>"></span>
          </div>

          <% if @product.master.can_supply? %>
            <link itemprop="availability" href="https://schema.org/InStock" />
          <% elsif @product.variants.empty? %>
            <span class="out-of-stock d-block mt-2">
              <%= Spree.t(:out_of_stock) %>
            </span>
          <% end %>
          <% if @product.backordered? %>
            <div class="alert alert-warning" id="cart-backordered-info">
              <%= Spree.t(:backordered_info) %>
            </div>
          <% end %>
        </div>

        <% if @product.can_supply? %>
          <div class="add-to-cart">
            <div class="input-group">
              <%= number_field_tag :quantity, 1, class: 'title form-control', min: 1 %>
              <span class="input-group-btn">
                <%= button_tag class: 'btn btn-success', id: 'add-to-cart-button', type: :submit, disabled: true do %>
                  <%= Spree.t(:add_to_cart) %>
                <% end %>
              </span>
            </div>
          </div>
        <% end %>
      </div>
    <% else %>
      <div id="product-price">
        <div>
{'fraction_non_alphanumeric': 0.17278972520908004, 'fraction_numerical': 0.002986857825567503, 'mean_word_length': 1.8317124735729386, 'pattern_counts': {'":': 0, '<': 163, '<?xml version=': 0, '>': 169, 'https://': 4, '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': '1212257', 'n_tokens_mistral': 2166, 'n_tokens_neox': 1969, 'n_words': 355}