Commit 480cc163 by Nguyen Quoc Kien

Fix format html #2

parent 3ab34a38
...@@ -28,4 +28,4 @@ ...@@ -28,4 +28,4 @@
<h1> Not found</h1> <h1> Not found</h1>
<% end %> <% end %>
</div> </div>
<%= will_paginate @products %> <div><%= will_paginate @products %></div>
\ No newline at end of file
...@@ -15,42 +15,40 @@ ...@@ -15,42 +15,40 @@
<td colspan="4"><h4><b>Cart: <%= cart_to_user.created_at %></b></h4></td> <td colspan="4"><h4><b>Cart: <%= cart_to_user.created_at %></b></h4></td>
</tr> </tr>
<% cart_products.each do |cart_product| %> <% cart_products.each do |cart_product| %>
<tbody> <% product = Product.find(cart_product.product_id) %>
<% product = Product.find(cart_product.product_id) %>
<tr>
<td><%= product.name %></td>
<td><%= number_to_currency(product.price/100.00) %></td>
<td><%= cart_product.number %></td>
<td><%= number_to_currency(cart_product.price/100.00 * cart_product.number) %></td>
</tr>
<% end %>
<tr> <tr>
<td colspan="3">Total:</td> <td><%= product.name %></td>
<td><b><%= number_to_currency(cart_to_user.total_price/100.00) %></b></td> <td><%= number_to_currency(product.price/100.00) %></td>
<td><%= cart_product.number %></td>
<td><%= number_to_currency(cart_product.price/100.00 * cart_product.number) %></td>
</tr> </tr>
<tr> <% end %>
<td>Name: </td> <tr>
<td colspan="3"> <%= cart_to_user.full_name %> <td colspan="3">Total:</td>
</tr> <td><b><%= number_to_currency(cart_to_user.total_price/100.00) %></b></td>
<tr> </tr>
<td>E-Mail: </td> <tr>
<td colspan="3"> <%= cart_to_user.email %> <td>Name: </td>
</tr> <td colspan="3"> <%= cart_to_user.full_name %>
<tr> </tr>
<td>Phone: </td> <tr>
<td colspan="3"> <%= cart_to_user.phone %> <td>E-Mail: </td>
</tr> <td colspan="3"> <%= cart_to_user.email %>
<tr> </tr>
<td>Address: </td> <tr>
<td colspan="3"> <%= cart_to_user.address %> <td>Phone: </td>
</tr> <td colspan="3"> <%= cart_to_user.phone %>
<tr> </tr>
<td>Status: </td> <tr>
<td colspan="3"><%= cart_to_user.status %></td> <td>Address: </td>
</tr> <td colspan="3"> <%= cart_to_user.address %>
<% end %> </tr>
<tr> <tr>
<td><%= link_to 'Back', :back, class: "btn btn-info" %></td> <td>Status: </td>
</tr> <td colspan="3"><%= cart_to_user.status %></td>
</tbody> </tr>
<% end %>
<tr>
<td><%= link_to 'Back', :back, class: "btn btn-info" %></td>
</tr>
</table> </table>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment