Skip to content
Snippets Groups Projects
Commit d89e1543 authored by Michael Drury's avatar Michael Drury
Browse files

made all of the prices on the website look like actual prices and not just floats

parent 1b4bdc81
No related branches found
No related tags found
No related merge requests found
......@@ -42,9 +42,9 @@
{% endif %}
{% if cart_size > 0: %}
<p class = "total_price">Total price: £{{ total_price }}</p>
<p class = "total_price">Total price: £{{ '{:,.2f}'.format(total_price) }}</p>
<p class = "total_price">Shipping price: £{{ shipping_price }}</p>
<p class = "total_price">Final price: £{{ final_price }}</p>
<p class = "total_price">Final price: £{{ '{:,.2f}'.format(final_price) }}</p>
{% endif %}
......@@ -53,7 +53,7 @@
<a href="/item?id={{item.product_id}}">
<img class = "item_cart_img" src = "{{ url_for('static', filename='images/' + item.product_image) }}" alt="background image"/></a>
<p><a class = "item_cart_name" href="/item?id={{item.product_id}}"><b>{{ item.product_name }}</b></a></p>
<p>price: £{{ item.product_price }}</p>
<p>price: £{{ '{:,.2f}'.format(item.product_price) }}</p>
<p>item id: {{ item.product_id }}</p>
</div>
{% endfor %}
......
......@@ -6,9 +6,9 @@
<h1 class = "checkout_title">Checkout</h1>
<p class = "checkout_price">Total to pay: £{{ total_price }}</p>
<p class = "checkout_price">Total to pay: £{{ '{:,.2f}'.format(total_price) }}</p>
<p class = "checkout_price">Shipping price: £{{ shipping_price }}</p>
<p class = "checkout_price">Final price: £{{ final_price }}</p>
<p class = "checkout_price">Final price: £{{ '{:,.2f}'.format(final_price) }}</p>
<div class = "checkout_box">
......
......@@ -24,7 +24,7 @@
Information:
</h1>
<p class = "item_page_text">
Price: £{{ product.product_price }}
Price: £{{ '{:,.2f}'.format(product.product_price) }}
</p>
<p class = "item_page_text">
Carbon footprint CO2 emissions: {{ product.product_footprint }}kg
......
......@@ -69,7 +69,7 @@
<a href="/item?id={{item.product_id}}">
<img class = "item_shopping_img" src = "{{ url_for('static', filename='images/' + item.product_image) }}" alt="product image"/></a>
<p><a class = "item_shopping_name" href="/item?id={{item.product_id}}"><b>{{ item.product_name }}</b></a></p>
<p class = "shopping_item_text">price: £{{ item.product_price }}</p>
<p class = "shopping_item_text">price: £{{ '{:,.2f}'.format(item.product_price) }}</p>
<p class = "shopping_item_text">product type: {{ item.product_type }}</p>
{% if current_user.is_authenticated %}
<form method = "post">
......
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