<commit_before><tr class="line-item" id="line-item-<%= item.id %>">
      <td class="line-item-image image text-center">
        <%= mini_image(item.variant) %>
      </td>
      <td class="line-item-name text-center" style="text-align: left;">
        <%= item.name %>
        <br />
        <%= "(#{item.options_text})" if item.options_text.present? %>
        <% product_type = item.product.product_type.name%>
        <%if product_type %>
          <%= hidden_field_tag 'product_type_' + item.id.to_s, product_type%>

          <%item.context.option_values.includes(option_value: :option_type).each do |context_option_value| %>
            <%
              option_type = context_option_value.option_value.option_type
              name        = option_type.name
              attr_type   = option_type.attr_type
            %>
            <div>
              <strong><%= option_type.presentation %></strong>:
              <span class="context-option-type-show" data-attribute="<%=name%>">
                <%= item.context.get_persisted_option_value(name)%><br/>
              </span>
              <span class="context-option-type-edit is-hidden" data-attribute="<%=name%>">
                <% tag_name = product_type + '_' + name.to_s%>
                <% if  attr_type == 'date' %>
                  <%= text_field_tag tag_name,
                                     item.context.get_persisted_option_value(name),
                                     class: "#{product_type}_inputs admin_datepicker"%><br/>
                <% elsif attr_type == 'integer'%>
                  <%= number_field_tag tag_name, item.context.get_persisted_option_value(name), class: "#{product_type}_inputs", :min => 0 %><br/>
                <% elsif attr_type == 'destination' || attr_type == 'selection'%>
                  <%=
                    options = option_type.option_values.map { |ov| [ov.presentation, ov.id] }
                    select_tag tag_name, options_for_select(options, [item.context.get_persisted_option_value(name),item.context.get_persisted_option_value(name, :id)]),
                                 class:  "select2 #{product_type}_inputs form-control", include_blank: true, required: true
                  %>
                <%end%>
              </span>
            </div>
          <%end%>
        <%end%>
      </td>
      <td class="line-item-pax text-center">
        <%if item.variant.product.product_type %>
          <ul class=""  style="list-style-type: none">
            <% item.paxes.each do |p| %>
              <li class="pax-<%=p.id%>">
                <%= p.first_name %>
                <%= p.last_name %>
                <%= link_to_with_icon 'delete', Spree.t('delete'), "#", :class => 'delete-pax btn btn-danger btn-sm', :data => { 'line-item-id' => item.id, 'pax-id' => p.id, :action => 'remove'}, :title => Spree.t('delete'), :no_text => true %>
              </li>
            <% end %>
          </ul>
          <%= link_to_with_icon 'add', Spree.t('add'), "#", :class => 'add-pax btn btn-success btn-sm', :data => { 'line-item-id' => item.id, :action => 'add'}, :title => Spree.t('add'), :no_text => true %>
        <%end%>
      </td>
      <td class="line-item-price text-center"><%= item.single_money.to_html %></td>
      <td class="line-item-qty-show text-center">
        <%= item.quantity %>
      </td>
      <td class="line-item-qty-edit is-hidden">
        <%= number_field_tag :quantity, item.quantity, min: 0, class: "line_item_quantity form-control", size: 5 %>
      </td>
      <td class="line-item-total text-center"><%= line_item_shipment_price(item, item.quantity) %></td>
      <td class="cart-line-item-delete actions actions-4 text-center" data-hook="cart_line_item_delete">
        <% if can? :update, item %>
          <%= link_to_with_icon 'arrow-left', Spree.t('actions.cancel'), "#", class: 'cancel-line-item btn btn-outline-secondary btn-sm', data: {action: 'cancel'}, title: Spree.t('actions.cancel'), style: 'display: none', no_text: true %>
          <%= link_to_with_icon 'save', Spree.t('actions.save'), "#", class: 'save-line-item btn btn-success btn-sm', no_text: true, data: { :'line-item-id' => item.id, action: 'save'}, title: Spree.t('actions.save'), style: 'display: none' %>
          <%= link_to_with_icon 'edit', Spree.t('edit'), "#", class: 'edit-line-item btn btn-primary btn-sm', data: {action: 'edit'}, title: Spree.t('edit'), no_text: true %>
          <%= link_to_with_icon 'delete', Spree.t('delete'), "#", class: 'delete-line-item btn btn-danger btn-sm', data: { 'line-item-id' => item.id, action: 'remove'}, title: Spree.t('delete'), no_text: true %>
        <% end %>
      </td>
    </tr><commit_msg>Why: The existing value in combo boxes where not been shown when you edit the order. This was becuase it was not getting it correctly based on the attribute id. Changed: Order Edit now shows the actual value of option_values and also improve te way that value is looked<commit_after><tr class="line-item" id="line-item-<%= item.id %>">
      <td class="line-item-image image text-center">
        <%= mini_image(item.variant) %>
      </td>
      <td class="line-item-name text-center" style="text-align: left;">
        <%= item.name %>
        <br />
        <%= "(#{item.options_text})" if item.options_text.present? %>
        <% product_type = item.product.product_type.name%>
        <%if product_type %>
          <%= hidden_field_tag 'product_type_' + item.id.to_s, product_type%>

          <% item.context.context_option_values.includes(option_value: :option_type).each do |context_option_value| %>
            <%
              option_type  = context_option_value.option_value.option_type
              name         = option_type.name
              attr_type    = option_type.attr_type
              presentation = item.context.get_persisted_option_value(name)
            %>
            <div>
              <strong><%= option_type.presentation %></strong>:
              <span class="context-option-type-show" data-attribute="<%=name%>">
                <%= presentation %><br/>
              </span>
              <span class="context-option-type-edit is-hidden" data-attribute="<%=name%>">
                <% tag_name = product_type + '_' + name.to_s%>
                <% if  attr_type == 'date' %>
                  <%= text_field_tag tag_name,
                                     presentation,
                                     class: "#{product_type}_inputs admin_datepicker"%><br/>
                <% elsif attr_type == 'integer'%>
                  <%= number_field_tag tag_name, presentation, class: "#{product_type}_inputs", :min => 0 %><br/>
                <% elsif attr_type == 'destination' || attr_type == 'selection'%>
                  <%=
                    options = option_type.option_values.map { |ov| [ov.presentation, ov.id] }
                    select_tag tag_name, options_for_select(options, [presentation,item.context.get_persisted_option_value(name, :id)]),
                                 class:  "select2 #{product_type}_inputs form-control", include_blank: true, required: true
                  %>
                <%end%>
              </span>
            </div>
          <%end%>
        <%end%>
      </td>
      <td class="line-item-pax text-center">
        <%if item.variant.product.product_type %>
          <ul class=""  style="list-style-type: none">
            <% item.paxes.each do |p| %>
              <li class="pax-<%=p.id%>">
                <%= p.first_name %>
                <%= p.last_name %>
                <%= link_to_with_icon 'delete', Spree.t('delete'), "#", :class => 'delete-pax btn btn-danger btn-sm', :data => { 'line-item-id' => item.id, 'pax-id' => p.id, :action => 'remove'}, :title => Spree.t('delete'), :no_text => true %>
              </li>
            <% end %>
          </ul>
          <%= link_to_with_icon 'add', Spree.t('add'), "#", :class => 'add-pax btn btn-success btn-sm', :data => { 'line-item-id' => item.id, :action => 'add'}, :title => Spree.t('add'), :no_text => true %>
        <%end%>
      </td>
      <td class="line-item-price text-center"><%= item.single_money.to_html %></td>
      <td class="line-item-qty-show text-center">
        <%= item.quantity %>
      </td>
      <td class="line-item-qty-edit is-hidden">
        <%= number_field_tag :quantity, item.quantity, min: 0, class: "line_item_quantity form-control", size: 5 %>
      </td>
      <td class="line-item-total text-center"><%= line_item_shipment_price(item, item.quantity) %></td>
      <td class="cart-line-item-delete actions actions-4 text-center" data-hook="cart_line_item_delete">
        <% if can? :update, item %>
          <%= link_to_with_icon 'arrow-left', Spree.t('actions.cancel'), "#", class: 'cancel-line-item btn btn-outline-secondary btn-sm', data: {action: 'cancel'}, title: Spree.t('actions.cancel'), style: 'display: none', no_text: true %>
          <%= link_to_with_icon 'save', Spree.t('actions.save'), "#", class: 'save-line-item btn btn-success btn-sm', no_text: true, data: { :'line-item-id' => item.id, action: 'save'}, title: Spree.t('actions.save'), style: 'display: none' %>
          <%= link_to_with_icon 'edit', Spree.t('edit'), "#", class: 'edit-line-item btn btn-primary btn-sm', data: {action: 'edit'}, title: Spree.t('edit'), no_text: true %>
          <%= link_to_with_icon 'delete', Spree.t('delete'), "#", class: 'delete-line-item btn btn-danger btn-sm', data: { 'line-item-id' => item.id, action: 'remove'}, title: Spree.t('delete'), no_text: true %>
        <% end %>
      </td>
    </tr>
{'fraction_non_alphanumeric': 0.1768445185493956, 'fraction_numerical': 0.0010421008753647354, 'mean_word_length': 2.3104518799586065, 'pattern_counts': {'":': 0, '<': 155, '<?xml version=': 0, '>': 187, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '826790', 'n_tokens_mistral': 3176, 'n_tokens_neox': 2985, 'n_words': 596}