Skip to content

Instantly share code, notes, and snippets.

Created Jul 8, 2017
What would you like to do?
<%= form_for @order_changeset, checkout_path(@conn, :update), fn f -> %>
<div class="row">
<div class="col-md-6 col-md-offset-3">
<h2>Order Summary</h2>
<table class="table">
<th>Product name</th>
<th>Pack size</th>
<th class="text-right">Quantity</th>
<th class="text-right">Subtotal</th>
<%= for {item, i} <- Enum.with_index(@order.line_items, 1) do %>
<td><%= i %></td>
<td><%= item.product_name %></td>
<td><%= item.pack_size %></td>
<td class="text-right"><%= item.quantity %></td>
<td class="text-right">₹ <%= %></td>
<% end %>
<td colspan=4 class="text-right">Total</td>
<td class="text-right">₹ <%= %></td>
<div class="form-group">
<%= label f, :comments, class: "control-label" %>
<%= textarea f, :comments, class: "form-control" %>
<%= error_tag f, :comments %>
<div class="form-group float-right">
<%= submit "Confirm", class: "btn btn-primary" %>
<% end %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment