<commit_before><table>
  <tr>
    <td valign="top">
      <div id="product-image">
				<%= render :partial => 'image' -%>
      </div>
      <div id="product-thumbnails">
        <%= render :partial => 'thumbnails', :locals => {:product => @product} -%>
      </div>
    </td>
    <td valign="top">
      <% form_for :order, :url => orders_url do |f| %>
	      <table>
          <% if @taxon %>
            <tr><td><%= breadcrumbs(@taxon) %><br/></td></tr>
          <%end %>
					<tr>
					  <td class="product-name"><%= @product.name %></td>
					</tr>
					<tr>
					  <td class="product-description"><%= product_description(@product) %></td>
					</tr>
					<tr>
					  <td>
					    <%="<span class='product-price'>#{t("price")}: </span> #{product_price(@product)}" if product_price(@product) %>
					  </td>
					</tr>
					<% if @product.variants? %>
						<tr>
						  <td class="product-variants"><%= t('variants') %>:</td>
						</tr>
						<tr>
						  <td>
						    <div id="variants">
						      <ul>
										<% @product.variants.each do |v| %>
											<% next if v.option_values.empty? %>
											<li>
                        <input type="radio" name="quantities[<%= @product.id %>]" value="<%= "#{v.id}=1" %>" <%= @product.variants.first == v ? 'checked="checked"' : '' %> <%= 'disabled' unless v.in_stock or Spree::Config[:show_zero_stock_products]  %> />
											  <%= variant_options v %>
											  <% if variant_price_diff v %>
											  	<span class="price-diff"><%= variant_price_diff v %></span>
											  <% end %>
											</li>
										<% end%>
						      </ul>
						    </div>
						  </td>
						</tr>
					<% else %>
	  				<tr><td><input type="hidden" name="quantities[<%= @product.id %>]" value="<%= "#{@product.variants.first.id}=1" %>"/></td></tr>
					<% end%>						
					<tr>
					  <td>
              <%=
                if @product.has_stock? || Spree::Config[:allow_backorders]
                  submit_tag t('add_to_cart')
                else
                  content_tag('strong', t('out_of_stock'))
                end
            %>
					  </td>
					</tr>
				</table>
			<% end %>
		</td>
	</tr>
</table>

<commit_msg>bug fix #280, deleted variants are shown in product page (cherry picked from commit <PASSWORD>)<commit_after><table>
  <tr>
    <td valign="top">
      <div id="product-image">
				<%= render :partial => 'image' -%>
      </div>
      <div id="product-thumbnails">
        <%= render :partial => 'thumbnails', :locals => {:product => @product} -%>
      </div>
    </td>
    <td valign="top">
      <% form_for :order, :url => orders_url do |f| %>
	      <table>
          <% if @taxon %>
            <tr><td><%= breadcrumbs(@taxon) %><br/></td></tr>
          <%end %>
					<tr>
					  <td class="product-name"><%= @product.name %></td>
					</tr>
					<tr>
					  <td class="product-description"><%= product_description(@product) %></td>
					</tr>
					<tr>
					  <td>
					    <%="<span class='product-price'>#{t("price")}: </span> #{product_price(@product)}" if product_price(@product) %>
					  </td>
					</tr>
					<% if @product.variants? %>
						<tr>
						  <td class="product-variants"><%= t('variants') %>:</td>
						</tr>
						<tr>
						  <td>
						    <div id="variants">
						      <ul>
										<% @product.variants.active.each do |v| %>
											<% next if v.option_values.empty? %>
											<li>
                        <input type="radio" name="quantities[<%= @product.id %>]" value="<%= "#{v.id}=1" %>" <%= @product.variants.first == v ? 'checked="checked"' : '' %> <%= 'disabled' unless v.in_stock or Spree::Config[:show_zero_stock_products]  %> />
											  <%= variant_options v %>
											  <% if variant_price_diff v %>
											  	<span class="price-diff"><%= variant_price_diff v %></span>
											  <% end %>
											</li>
										<% end%>
						      </ul>
						    </div>
						  </td>
						</tr>
					<% else %>
	  				<tr><td><input type="hidden" name="quantities[<%= @product.id %>]" value="<%= "#{@product.variants.first.id}=1" %>"/></td></tr>
					<% end%>						
					<tr>
					  <td>
              <%=
                if @product.has_stock? || Spree::Config[:allow_backorders]
                  submit_tag t('add_to_cart')
                else
                  content_tag('strong', t('out_of_stock'))
                end
            %>
					  </td>
					</tr>
				</table>
			<% end %>
		</td>
	</tr>
</table>


{'fraction_non_alphanumeric': 0.2153880563632297, 'fraction_numerical': 0.00156564526951465, 'mean_word_length': 1.777639751552795, 'pattern_counts': {'":': 0, '<': 178, '<?xml version=': 0, '>': 188, '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': '6623708', 'n_tokens_mistral': 2085, 'n_tokens_neox': 1482, 'n_words': 284}