<commit_before><%= form_for order, :url => update_cart_path, :remote => true, :html=>{:id=>'updatecart'} do |order_form| %>
  <table>
    <thead>
      <tr>
        <th><%= t("item")  %>
        <th><%= t("price") %>
        <th><%= t("qty")   %>
        <th>-</td>
    <tbody class="line_items">
      <%= order_form.fields_for :line_items do |item_form| %>
        <%- line_item = item_form.object %>
        <tr>
          <td>
            <%= link_to line_item.product.name, line_item.product %>
          <td>
            <%= number_to_currency line_item.price %>
          <td>
            <%= item_form.text_field :quantity, :size => 3, :class => "line_item_quantity" %>
          <td>
            <%= link_to image_tag('/images/ajax_cart/delete.png'), '#', :class => 'delete' %>
          </td>
        </tr>
      <% end %>
      
      <tr>
        <td>
          <%= order_form.submit 'Update cart' %>
        </td>
        <td>
          <%= button_to 'Checkout', checkout_path %>
        </td>
      </tr>
    </tbody>
  </table>
<% end %>

<div class=".total">
  <%= link_to_cart(t('total')) %>
</div><commit_msg>get checkout button working w/ a JS redirect<commit_after><%= form_for order, :url => update_cart_path, :remote => true, :html=>{:id=>'updatecart'} do |order_form| %>
  <table>
    <thead>
      <tr>
        <th><%= t("item")  %>
        <th><%= t("price") %>
        <th><%= t("qty")   %>
        <th>-</td>
    <tbody class="line_items">
      <%= order_form.fields_for :line_items do |item_form| %>
        <%- line_item = item_form.object %>
        <tr>
          <td>
            <%= link_to line_item.product.name, line_item.product %>
          <td>
            <%= number_to_currency line_item.price %>
          <td>
            <%= item_form.text_field :quantity, :size => 3, :class => "line_item_quantity" %>
          <td>
            <%= link_to image_tag('/images/ajax_cart/delete.png'), '#', :class => 'delete' %>
          </td>
        </tr>
      <% end %>
      
      <tr>
        <td>
          <%= order_form.submit 'Update cart' %>
        </td>
        <td>
          <%= button_to 'Checkout', {}, :onclick => "window.location = '#{cart_path}';" %>
        </td>
      </tr>
    </tbody>
  </table>
<% end %>

<div class=".total">
  <%= link_to_cart(t('total')) %>
</div>
{'fraction_non_alphanumeric': 0.20619888075764098, 'fraction_numerical': 0.0008609556607834697, 'mean_word_length': 1.9159347553324968, 'pattern_counts': {'":': 0, '<': 85, '<?xml version=': 0, '>': 100, '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': '2959897', 'n_tokens_mistral': 875, 'n_tokens_neox': 804, 'n_words': 148}