<commit_before><h3><%= Spree.t(:order_summary) %></h3>

<table data-hook="order_summary">
  <tbody>
    <tr data-hook="item_total">
      <td><strong><%= Spree.t(:item_total) %>:</strong></td>
      <td><strong><%= order.display_item_total.to_html %></strong></td>
    </tr>
    <tr data-hook="item_total">
      <td><strong><%= Spree.t(:shipping_total) %>:</strong></td>
      <td><strong><%= order.shipment_total %></strong></td>
    </tr>
    <% if order.adjustments.eligible.exists? %>
      <tbody id="summary-order-charges" data-hook>
        <tr>
          <td colspan="2">Order adjustments</td>
        </tr>
        <% order.adjustments.eligible.each do |adjustment| %>
        <% next if (adjustment.source_type == 'Spree::TaxRate') and (adjustment.amount == 0) %>
          <tr class="total">
            <td><%= adjustment.label %>: </td>
            <td><%= adjustment.display_amount.to_html %></td>
          </tr>
        <% end %>
      </tbody>
    <% end %>

    <% if order.shipment_adjustments.exists? %>
      <tbody data-hook="order_details_price_adjustments">
        <tr>
          <td colspan="2">Shipment adjustments</td>
        </tr>
        <% @order.shipment_adjustments.each do |adjustment| %>
          <tr class="total">
            <td><%= adjustment.label %></td>
            <td><%= adjustment.amount %></strong></td>
          </tr>
        <% end %>
      </tbody>
    <% end %>

    <% if order.line_item_adjustments.exists? %>
      <tbody data-hook="order_details_price_adjustments">
        <tr>
          <td colspan="2">Item adjustments</td>
        </tr>
        <% @order.line_item_adjustments.each do |adjustment| %>
          <tr class="total">
            <td><%= adjustment.label %></td>
            <td><%= adjustment.amount %></td>
          </tr>
        <% end %>
      </tbody>
    <% end %>

    <tr data-hook="order_total">
      <td><strong><%= Spree.t(:order_total) %>:</strong></td>
      <td><strong><span id='summary-order-total'><%= @order.display_total.to_html %></span></strong></td>
    </tr>
  </tbody>
</table>
<commit_msg>Order checkout/_summary information in a sensible manner<commit_after><h3><%= Spree.t(:order_summary) %></h3>

<table data-hook="order_summary">
  <tbody>
    <tr data-hook="item_total">
      <td><strong><%= Spree.t(:item_total) %>:</strong></td>
      <td><strong><%= order.display_item_total.to_html %></strong></td>
    </tr>

    <% if order.line_item_adjustments.exists? %>
      <tbody data-hook="order_details_price_adjustments">
        <tr>
          <td colspan="2">Item adjustments</td>
        </tr>
        <% @order.line_item_adjustments.each do |adjustment| %>
          <tr class="total">
            <td><%= adjustment.label %></td>
            <td><%= adjustment.display_amount.to_html %></td>
          </tr>
        <% end %>
      </tbody>
    <% end %>

    <tr data-hook="shipping_total">
      <td><strong><%= Spree.t(:shipping_total) %>:</strong></td>
      <td><strong><%= Spree::Money.new(order.shipment_total).to_html %></strong></td>
    </tr>

    <% if order.shipment_adjustments.exists? %>
      <tbody data-hook="order_details_price_adjustments">
        <tr>
          <td colspan="2">Shipment adjustments</td>
        </tr>
        <% @order.shipment_adjustments.each do |adjustment| %>
          <tr class="total">
            <td><%= adjustment.label %></td>
            <td><%= adjustment.display_amount.to_html %></strong></td>
          </tr>
        <% end %>
      </tbody>
    <% end %>


    <% if order.adjustments.eligible.exists? %>
      <tbody id="summary-order-charges" data-hook>
        <tr>
          <td colspan="2">Order adjustments</td>
        </tr>
        <% order.adjustments.eligible.each do |adjustment| %>
        <% next if (adjustment.source_type == 'Spree::TaxRate') and (adjustment.amount == 0) %>
          <tr class="total">
            <td><%= adjustment.label %>: </td>
            <td><%= adjustment.display_amount.to_html %></td>
          </tr>
        <% end %>
      </tbody>
    <% end %>

    <tr data-hook="order_total">
      <td><strong><%= Spree.t(:order_total) %>:</strong></td>
      <td><strong><span id='summary-order-total'><%= @order.display_total.to_html %></span></strong></td>
    </tr>
  </tbody>
</table>

{'fraction_non_alphanumeric': 0.20396270396270397, 'fraction_numerical': 0.002797202797202797, 'mean_word_length': 2.4191235059760956, 'pattern_counts': {'":': 0, '<': 205, '<?xml version=': 0, '>': 205, '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': '3949464', 'n_tokens_mistral': 1514, 'n_tokens_neox': 1390, 'n_words': 238}