<commit_before><table id="order_summary" class="split">
  <tr>
    <td>Number</td>
    <td><%= order.number %></td>
  </tr>
  <tr class="alt">
    <td>Payment Method</td>
    <td><%= order.payments.collect {|p| p.payment_method.name }.join(', ') %></td>
  </tr>
  <% if order.canceled? %>
    <tr>
      <td>Status</td>
      <td>Canceled</td>
    </tr>
  <% else %>
    <tr>
      <td>Submitted</td>
      <td><%= l(order.completed_at, :format => :short) %></td>
    </tr>
  <% end %>
</table>

<table id="addresses">
  <tr>
    <td>
      <h2><span><%= t(:billing_address) %></span></h2>
      <%= render :partial => 'spree/shared/email/address', :locals => {:address => order.bill_address} %>
    </td>
    <td>
      <h2><span><%= t(:shipping_address) %></span></h2>
      <%= render :partial => 'spree/shared/email/address', :locals => {:address => order.ship_address} %>
    </td>
  </tr>
</table>

<div class="spacer_15">&nbsp;</div>
<h2><span>Order Details</span></h2>

<table id="order_details">
  <tbody id="line-items">
    <tr data-hook="order_details_line_items_headers">
      <th><%= t(:items_purchased) %></th>
      <th class="price number"><%= t(:price) %></th>
      <th class="qty number"><%= t(:qty) %></th>
      <th class="total number"><%= t(:total) %></th>
    </tr>
    <% order.line_items.each do |item| %>
      <tr data-hook="order_details_line_item_row" class="<%= cycle('', 'alt') %>">
        <td class="name">
          <%= item.variant.product.name %>
          <%= "(" + variant_options(item.variant) + ")" unless item.variant .option_values.empty? %>
        </td>
        <td class="price number"><%= number_to_currency(item.price) %></td>
        <td class="qty number"><%= item.quantity %></td>
        <td class="total number"><%= number_to_currency(item.price * item.quantity) %></td>
      </tr>
    <% end %>
  </tbody>
  <tbody id="subtotal" data-hook="order_details_subtotal">
    <tr id="subtotal-row">
      <td class="title" colspan="3">
        <%= t(:subtotal) %>
      </td>
      <td class="total number">
        <%= number_to_currency order.item_total %>
      </td>
    </tr>
  </tbody>
  <tbody id="order-charges" data-hook="order_details_adjustments">
    <% order.adjustments.eligible.each do |adjustment| %>
      <% next if (adjustment.originator_type == "TaxRate") and (adjustment.amount == 0) %>
      <tr class="total">
        <td class="title" colspan="3">
          <%= adjustment.label %>
        </td>
        <td class="total number">
          <%= number_to_currency adjustment.amount %>
        </td>
      </tr>
    <% end %>
  </tbody>
  <tbody id="order-total" data-hook="order_details_total">
    <tr class="total">
      <td class="title" colspan="3">
        <%= t(:order_total) %>
      </td>
      <td class="total number">
        <span id="order_total"><%= number_to_currency order.total %></span>
      </td>
    </tr>
  </tbody>
</table><commit_msg>Added support for spree_digital<commit_after><table id="order_summary" class="split">
  <tr>
    <td>Number</td>
    <td><%= order.number %></td>
  </tr>
  <tr class="alt">
    <td>Payment Method</td>
    <td><%= order.payments.collect {|p| p.payment_method.name }.join(', ') %></td>
  </tr>
  <% if order.canceled? %>
    <tr>
      <td>Status</td>
      <td>Canceled</td>
    </tr>
  <% else %>
    <tr>
      <td>Submitted</td>
      <td><%= l(order.completed_at, :format => :short) %></td>
    </tr>
  <% end %>
</table>

<table id="addresses">
  <tr>
    <td>
      <h2><span><%= t(:billing_address) %></span></h2>
      <%= render :partial => 'spree/shared/email/address', :locals => {:address => order.bill_address} %>
    </td>
    <td>
      <h2><span><%= t(:shipping_address) %></span></h2>
      <%= render :partial => 'spree/shared/email/address', :locals => {:address => order.ship_address} %>
    </td>
  </tr>
</table>

<div class="spacer_15">&nbsp;</div>
<h2><span>Order Details</span></h2>

<table id="order_details">
  <tbody id="line-items">
    <tr data-hook="order_details_line_items_headers">
      <th><%= t(:items_purchased) %></th>
      <th class="price number"><%= t(:price) %></th>
      <th class="qty number"><%= t(:qty) %></th>
      <th class="total number"><%= t(:total) %></th>
    </tr>
    <% order.line_items.each do |item| %>
      <tr data-hook="order_details_line_item_row" class="<%= cycle('', 'alt') %>">
        <td class="name">
          <%= item.variant.product.name %>
          <%= "(" + variant_options(item.variant) + ")" unless item.variant .option_values.empty? %>
        </td>
        <td class="price number"><%= number_to_currency(item.price) %></td>
        <td class="qty number"><%= item.quantity %></td>
        <td class="total number"><%= number_to_currency(item.price * item.quantity) %></td>
      </tr>
    <% end %>
  </tbody>
  <tbody id="subtotal" data-hook="order_details_subtotal">
    <tr id="subtotal-row">
      <td class="title" colspan="3">
        <%= t(:subtotal) %>
      </td>
      <td class="total number">
        <%= number_to_currency order.item_total %>
      </td>
    </tr>
  </tbody>
  <tbody id="order-charges" data-hook="order_details_adjustments">
    <% order.adjustments.eligible.each do |adjustment| %>
      <% next if (adjustment.originator_type == "TaxRate") and (adjustment.amount == 0) %>
      <tr class="total">
        <td class="title" colspan="3">
          <%= adjustment.label %>
        </td>
        <td class="total number">
          <%= number_to_currency adjustment.amount %>
        </td>
      </tr>
    <% end %>
  </tbody>
  <tbody id="order-total" data-hook="order_details_total">
    <tr class="total">
      <td class="title" colspan="3">
        <%= t(:order_total) %>
      </td>
      <td class="total number">
        <span id="order_total"><%= number_to_currency order.total %></span>
      </td>
    </tr>
  </tbody>
</table>

<% if Rails.application.railties.all.map(&:railtie_name).include? 'spree_digital' %>
<div class="spacer_15">&nbsp;</div>
<h2><span><%= t(:digital_download_links) %></span></h2>
<p>Each link will only work a SINGLE TIME! Also, they will only work WITHIN 24 HOURS!</p>

<% @order.line_items.select{ |i| i.digital? }.each do |item| %>
<p><%= item.variant.name %>:<br/>
<%
for link in item.digital_links
  digital_url = digital_url(:host => Spree::Config.get(:site_url), :secret => link.secret)
%>
<%= link_to digital_url, digital_url%>
</p>
<% end %>
<% end %>
<% end %>
{'fraction_non_alphanumeric': 0.22322120601457138, 'fraction_numerical': 0.004650441791970238, 'mean_word_length': 2.995046439628483, 'pattern_counts': {'":': 0, '<': 281, '<?xml version=': 0, '>': 297, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3949977', 'n_tokens_mistral': 2442, 'n_tokens_neox': 2291, 'n_words': 445}