Skip to content
Snippets Groups Projects
Commit 537f9546 authored by Butler, Alexis (UG - Computer Science)'s avatar Butler, Alexis (UG - Computer Science)
Browse files

Final touches and tests

parent df917a42
No related branches found
No related tags found
No related merge requests found
...@@ -8,7 +8,11 @@ ...@@ -8,7 +8,11 @@
</td> </td>
<td> <td>
<% order.order_entries.each do |i| %> <% order.order_entries.each do |i| %>
<p><%=i.product.name%> x <%=i.quantity %></p> <%if i.product.presence%>
<p><%=i.product.name%> x <%=i.quantity %></p>
<%else %>
<p><%=t('.no_longer') %></p>
<%end %>
<%end %> <%end %>
</td> </td>
<td> <td>
......
<!--Collect and display entry info in a table row --> <!--Collect and display entry info in a table row -->
<% @order.order_entries.each do |i| %> <% @order.order_entries.each do |i|%>
<tr> <%if i.product.presence%>
<td> <tr>
<%= image_tag i.product.image.small.url %> <td>
</td> <%= image_tag i.product.image.small.url %>
<td> </td>
<h5><%=i.product.name %></h5><br> <td>
<p><%=i.product.description %></p> <h5><%=i.product.name %></h5><br>
</td> <p><%=i.product.description %></p>
<td> </td>
<%=i.quantity %> <td>
</td> <%=i.quantity %>
<td> </td>
<%= humanized_money_with_symbol i.totalprice %> <td>
</td> <%= humanized_money_with_symbol i.totalprice %>
</tr> </td>
<% end %> </tr>
<%else %>
<tr>
<td>
</td>
<td>
<h5><%=t('orders.show.no_longer')%></h5>
</td>
<td>
<%=i.quantity %>
</td>
<td>
<%= humanized_money_with_symbol i.totalprice %>
</td>
</tr>
<%end %>
<%end%>
...@@ -16,6 +16,13 @@ ...@@ -16,6 +16,13 @@
<dd><%= @product.stockCount %></dd> <dd><%= @product.stockCount %></dd>
<dt><%=t('.price_title') %></dt> <dt><%=t('.price_title') %></dt>
<dd><%= humanized_money_with_symbol @product.price %></dd> <dd><%= humanized_money_with_symbol @product.price %></dd>
<dd>
<% if @product.stockCount >0 %>
<%= link_to add_item_carts_path(product_id: @product.id), method: :put do %>
<%= fa_icon "shopping-cart", text: t('.add_cart') %>
<%end%>
<%end%>
</dd>
</dl> </dl>
</div> </div>
<div class="col-lg-8 col-sm-9 col-xs-8"> <div class="col-lg-8 col-sm-9 col-xs-8">
......
...@@ -64,6 +64,7 @@ en: ...@@ -64,6 +64,7 @@ en:
lvl0: "Give me my money back" lvl0: "Give me my money back"
sub_button: "Submit review and rating" sub_button: "Submit review and rating"
remove_button: "Remove Review" remove_button: "Remove Review"
add_cart: "Add To Cart"
product: product:
add_cart: "Add To Cart" add_cart: "Add To Cart"
...@@ -86,6 +87,7 @@ en: ...@@ -86,6 +87,7 @@ en:
quan_title: "Quantity" quan_title: "Quantity"
price_title: "Price" price_title: "Price"
total_title: "Total spend" total_title: "Total spend"
no_longer: "Product No longer stocked/tracked"
contact: contact:
new: new:
...@@ -144,6 +146,7 @@ en: ...@@ -144,6 +146,7 @@ en:
email_title: "customer email" email_title: "customer email"
order: order:
confirm: "Are you sure?" confirm: "Are you sure?"
no_longer: "Product No longer stocked/tracked"
products: products:
new: new:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment