From: Guillaume Pellerin Date: Thu, 24 Sep 2015 13:13:18 +0000 (+0200) Subject: fix price display X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=da0ca0020b5e0afda899030c9dbe4b9c058e4989;p=diggersdigest.git fix price display --- diff --git a/app/templates/shop/includes/price.html b/app/templates/shop/includes/price.html index 8df59a5..adcf167 100644 --- a/app/templates/shop/includes/price.html +++ b/app/templates/shop/includes/price.html @@ -5,12 +5,15 @@
  • {% if variation.has_price %} - {% if variation.on_sale %} - {{ variation.unit_price|currency }} - {% trans "On sale:" %} + {% if product.available %} + {% if not variation.unit_price %} + {% trans "Price" %} : {% trans "Make an offer" %} + {% else %} + {% trans "Price" %} : {{ variation.unit_price|currency }} + {% endif %} {% endif %} - {% trans "Price" %}: {{ variation.price|currency }} {% else %} + oo {% if has_available_variations %} {% trans "The selected options are currently unavailable." %} diff --git a/app/templates/shop/product.html b/app/templates/shop/product.html index e49718b..e04b801 100644 --- a/app/templates/shop/product.html +++ b/app/templates/shop/product.html @@ -97,16 +97,16 @@ $(function () {
  • {{ product.record.artist }}
  • {{ product.record.title }}
  • - {% trans "Label:" %} + {% trans "Label:" %} {{ product.record.label }}
  • - {% trans "Country:" %} + {% trans "Country" %}: {{ product.record.country }}
  • {% if product.record.release_year %}
  • - {% trans "Release year:" %} + {% trans "Release year" %}: {{ product.record.release_year }}
  • {% else %} @@ -115,7 +115,7 @@ $(function () { {{ product.record.release_decade }} {% endif %}
  • - {% trans "Cover:" %} + {% trans "Cover state" %}: @@ -123,14 +123,19 @@ $(function () {
  • - {% trans " Vinyl:" %} + {% trans " Vinyl state" %}: {{ product.record.vinyl_condition.abbr }}
  • + {% if product.available and has_available_variations %} + {% errors_for add_product_form %}
  • {% include "shop/includes/price.html" %}
  • + {% else %} +
  • {% trans "This product is currently unavailable." %}
  • + {% endif %}
    @@ -151,9 +156,7 @@ $(function () {
    {% if product.available and has_available_variations %} - -{% errors_for add_product_form %} - +
    {% csrf_token %}
    {% fields_for add_product_form %} @@ -165,8 +168,6 @@ $(function () { {% endif %}
    -{% else %} -

    {% trans "This product is currently unavailable." %}

    {% endif %} {% if settings.SHOP_USE_RATINGS %}