Skip to content

Commit

Permalink
Add comments to liquid code
Browse files Browse the repository at this point in the history
  • Loading branch information
cetinajero committed Sep 28, 2019
1 parent ad9a6a5 commit 6c7d25f
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions _includes/components/product-cards/progressive.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,24 +21,24 @@
{% for collection in collections %}
{% unless collection.prices == false %} <!-- disable prices per collection thru config file -->

{% unless site.product.price.disabled %}
{% unless site.product.price.disabled %} <!-- disable prices to all products -->
<div class="text-right mb-1 mt-2">

<span class="product-price badge badge-primary text-white text-sm {% if doc.promotion-price and site.original == false %}{{ 'disabled-price' }}{% endif %}">
{% assign doc-price-size = doc.price | downcase | split: '.' | last | size %}
{% if doc.price %}{{ doc.price | prepend: '$ ' }}{% endif %}{% if doc-price-size == 1 %}{{ "0" }}{% endif %}
{% if doc.price %}{{ doc.price | prepend: '$ ' }}{% endif %}{% if doc-price-size == 1 %}{{ "0" }}{% endif %} <!-- add decimals and currency sing ($) to prices -->
{% if doc.currency %}
{{ doc.currency | prepend: ' ' }}
{{ doc.currency | prepend: ' ' }} <!-- prepand currency (USD) -->
{% endif %}
</span>

{% capture promotion-price %}
{% unless site.original %}
{% if site.special-offers.customers %}
{% unless site.original %} <!-- only to customers -->
{% if site.special-offers.customers %} <!-- if the product has an special offer -->
{% assign promotion-price-size = doc.promotion-price | downcase | split: '.' | last | size %}
{% if doc.promotion-price %}{{ doc.promotion-price | prepend: '$ ' }}{% endif %}{% if promotion-price-size == 1 %}{{ "0" }}{% endif %}
{% if doc.promotion-price %}{{ doc.promotion-price | prepend: '$ ' }}{% endif %}{% if promotion-price-size == 1 %}{{ "0" }}{% endif %} <!-- add decimals and currency sing ($) to prices -->
{% if doc.promotion-currency %}
{{ doc.promotion-currency | prepend: ' ' }}
{{ doc.promotion-currency | prepend: ' ' }} <!-- prepand currency (USD) -->
{% endif %}
{% endif %}
{% endunless %}
Expand Down

0 comments on commit 6c7d25f

Please sign in to comment.