{% assign image = product.featured_image %}
{% if image == nil %}
-
+
{% else %}
-
+
{% endif %}
- +
diff --git a/templates/show.liquid b/templates/show.liquid
index 1d10e94..fa264c2 100644
--- a/templates/show.liquid
+++ b/templates/show.liquid
@@ -142,9 +142,14 @@
// (needs to be in a liquid file)
{% if product.has_variants? %}
{% for variant in product_variants %}
+ {% if current_user.is_wholesale? == true %}
+ {% assign variant_price = variant.wholesale_price %}
+ {% else %}
+ {% assign variant_price = variant.price %}
+ {% endif %}
{% capture first_index %}{{ forloop.index0 }}{% endcapture %}
window.product_variants[{{ first_index }}] = {
- "price": "{{ variant.price }}",
+ "price": "{{ variant_price }}",
"options_text": "{{ variant.options_text }}",
"image": "{{ variant.featured_image.src }}"
};
+
{% else %}
- {{ product.name }}
-{{ product.price_with_currency }}
- + {% if current_user.is_wholesale? == true %} + {% assign product_price_with_currency = product.wholesale_price_with_currency %} + {% else %} + {% assign product_price_with_currency = product.price_with_currency %} + {% endif %} +{{ product_price_with_currency }}
+ {% endif %} @@ -66,11 +71,11 @@ {% endif %}- +
{{ paginate | default_pagination }}
-
+
{% endpaginate %}
-
+