diff --git a/shop/templates/cart.html b/shop/templates/cart.html index 3d7e103fe5f5e77fe1e877304586d4744088fa45..367bed7b4591092f5fee9a391b2fa0d71546d49f 100644 --- a/shop/templates/cart.html +++ b/shop/templates/cart.html @@ -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 %} diff --git a/shop/templates/checkout.html b/shop/templates/checkout.html index 5b668213e973cc39e824902944dba68d88faecb5..5d74eb3eb2c8743b580145f5dc986646a6b40767 100644 --- a/shop/templates/checkout.html +++ b/shop/templates/checkout.html @@ -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"> diff --git a/shop/templates/item_page.html b/shop/templates/item_page.html index a6e04542a96a83662a3895334010eeb69afeeea9..3aab10cade55457578d99e5249289b994aeaab80 100644 --- a/shop/templates/item_page.html +++ b/shop/templates/item_page.html @@ -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 diff --git a/shop/templates/shopping.html b/shop/templates/shopping.html index 96d98e65ddc2b0d1d5842d3bd52b46256b8ade71..bad9acd00ec3e563b0e3bf8af474581922b597f2 100644 --- a/shop/templates/shopping.html +++ b/shop/templates/shopping.html @@ -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">