Skip to content

Instantly share code, notes, and snippets.

@rdallaire
Created October 30, 2014 23:00
Show Gist options
  • Save rdallaire/b58c7abfc30a8f32f990 to your computer and use it in GitHub Desktop.
Save rdallaire/b58c7abfc30a8f32f990 to your computer and use it in GitHub Desktop.
products
{% comment %} This replaces product.sell_price with the top variants price {% endcomment %}
{% for variant in product.variants %}
{% if forloop.first %}
{% assign productTopPrice = variant.sell_price %}
{% if product.msrp_to_f > variant.sell_price_to_f %}
{% assign productMsrp = true %}
{% endif %}
{% endif %}
{% endfor %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment