Created
October 13, 2014 21:30
-
-
Save davidbbe/f86066d0bdf9aa8cdc99 to your computer and use it in GitHub Desktop.
Math in a Liquid logic statement
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% if product.metafields.preorder.qty && variant.inventory_quantity <= 0 && product.metafields.preorder.qty | plus: variant.inventory_quantity >= 0 %} | |
Preorders left: {{ product.metafields.preorder.qty | plus: variant.inventory_quantity }} | |
<input id="add-to-cart" type="submit" class="green-btn" value="Preorder"> | |
{% elsif %} | |
<input id="add-to-cart" type="submit" class="green-btn" value="Add to Cart"> | |
{% endif %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment