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
25 changes: 15 additions & 10 deletions templates/index.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</ul>
{% endunless %}
</div>

</div>

<div id="content" class="index">
Expand All @@ -19,7 +19,7 @@
{{ breadcrumbs }}
{% endif %}

{% paginate products by 12 %}
{% paginate products by 12 %}

{% if products.size > 0 %}
{% if keywords != nil %}
Expand All @@ -33,15 +33,20 @@
<div>
{% assign image = product.featured_image %}
{% if image == nil %}
<a href="/products/{{ product.to_param }}" class="image-link-container"><img alt="No image" src="/images/noimage/product.jpg" /></a>
<a href="/products/{{ product.to_param }}" class="image-link-container"><img alt="No image" src="/images/noimage/product.jpg" /></a>
{% else %}
<a href="/products/{{ product.to_param }}" class="image-link-container"><img alt="{{ image.alt }}" src="{{ image.src }}" /></a>
<a href="/products/{{ product.to_param }}" class="image-link-container"><img alt="{{ image.alt }}" src="{{ image.src }}" /></a>
{% endif %}

<div class="product-info">
<h4 class="product-name"><a href="/products/{{ product.to_param }}">{{ product.name }}</a></h4>
<p class="product-price"><a href="/products/{{ product.to_param }}">{{ product.price_with_currency }}</a></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"><a href="/products/{{ product.to_param }}">{{ product_price_with_currency }}</a></p>

<div class="social-container">
<div class="fb-like-container">
<!-- facebook like button -->
Expand All @@ -55,7 +60,7 @@
</div>
<div>
</div>

</div>
</li>
{% endif %}
Expand All @@ -66,11 +71,11 @@
{% endif %}

<hr class="space" />

<div class="pagination">
{{ paginate | default_pagination }}
</div>

{% endpaginate %}

</div><!-- end "content" -->
7 changes: 6 additions & 1 deletion templates/show.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}"
};
Expand Down