Skip to content

Instantly share code, notes, and snippets.


shankardevy/show.html.eex Secret

Created Jul 8, 2017
What would you like to do?
<%= if Enum.empty?(@cart.line_items) do %>
<p>Your cart is empty</p>
<% else %>
<table class="table">
<th>Product name</th>
<th>Pack size</th>
<th>Unit Price</th>
<%= for item <- @cart.line_items do %>
<td><%= item.product_name %></td>
<td><%= item.pack_size %></td>
<td><%= item.quantity %></td>
<td>₹ <%= item.unit_price %></td>
<td>₹ <%= %></td>
<% end %>
<td colspan=4>Order Total</td>
<td>₹ <%= %></td>
<% end %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment