.audio {
margin-top: 2em;
}
+
+.error-msg {
+ font-size: 85%;
+}
<div class="col-xs-6 col-sm-4 col-lg-3 product-thumb slim_margins">
<a href="{{ product.get_absolute_url }}" class="thumbnail">
{% if product.image %}
- <img src="{{ MEDIA_URL }}{% thumbnail product.image 148 148 %}">
+ <img src="{{ MEDIA_URL }}{% thumbnail product.image 148 148 %}">
{% else %}
- <div class="placeholder"></div>
+ <div class="placeholder"></div>
{% endif %}
- <div class="caption">
- <h6>{{ product }}</h6>
- <div class="price-info">
- {% if product.has_price %}
- {% if product.on_sale %}
- <span class="old-price">{{ product.unit_price|currency }}</span>
- {% trans "On sale:" %}
+ <div class="caption">
+ <h6>{{ product }}</h6>
+ <div class="price-info">
+ {% if product.variations.all %}
+ {% with product.variations.all as variations and True as category %}
+ {% if product.available %}
+ {% include "shop/includes/price.html" %}
+ {% else %}
+ <span class="error-msg">{% trans "This product is currently unavailable." %}</span>
{% endif %}
- <span class="price">{{ product.price|currency }}</span>
- {% else %}
- <span class="coming-soon">{% trans "Coming soon" %}</span>
- {% endif %}
- </div>
+ {% endwith %}
+ {% endif %}
+ </div>
</div>
</a>
</div>
<ul id="variations" class="list-unstyled">
{% for variation in variations %}
- <li id="variation-{{ variation.sku }}"
- {% if not variation.default %}style="display:none;"{% endif %}>
+ <li id="variation-{{ variation.sku }}" {% if not variation.default %}style="display:none;"{% endif %}>
{% if variation.has_price %}
{% if product.available %}
- {% if not variation.unit_price %}
+ {% if not variation.unit_price and not category %}
<span class="price">{% trans "Price" %} : <a href="{% url 'page' 'about/contact-form' %}">{% trans "Make an offer" %}</a></span>
+ {% elif not variation.unit_price and category %}
+ <span class="price">{% trans "Price" %} : {% trans "Make an offer" %}</span>
{% else %}
<span class="price">{% trans "Price" %} : {{ variation.unit_price|currency }}</span>
{% endif %}
{% endif %}
{% else %}
- oo
{% if has_available_variations %}
<span class="error-msg">
{% trans "The selected options are currently unavailable." %}
<li><strong>{{ product.record.artist }}</strong></li>
<li><em>{{ product.record.title }}</em></li>
<li>
- {% trans "Label:" %}
+ {% trans "Label:" %}
{{ product.record.label }}
</li>
<li>
</a>
</li>
{% if product.available and has_available_variations %}
- {% errors_for add_product_form %}
<li>{% include "shop/includes/price.html" %}</li>
{% else %}
<li><span class="error-msg">{% trans "This product is currently unavailable." %}</span></li>
{% endeditable %}
</div>
-{% if product.available and has_available_variations %}
+{% if product.available and has_available_variations and product.variation.first.unit_price %}
+
<br/>
+{% errors_for add_product_form %}
<form method="post" id="add-cart" class="shop-form">{% csrf_token %}
<div style="display: none;">
{% fields_for add_product_form %}