Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion templates/index.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,12 @@ File: index.liquid
{% endif %}
<div class="product-info">
<h4 class="product-name">{{ product.name }}</h4>
<p class="product-price">{{ product.price_with_currency }}</p>
{% 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 %}
<p class="product-price">{{ product_price_with_currency }}</p>
</div>
</a><!-- end .product-link -->

Expand Down
7 changes: 6 additions & 1 deletion templates/show.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,14 @@ File: show.liquid
// (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 }}"
};
Expand Down