Created
April 16, 2014 13:47
-
-
Save msmithstubbs/10878145 to your computer and use it in GitHub Desktop.
Add Back In Stock button to the product page for the Shopify Timber theme
This file contains hidden or 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 (variant.available) { | |
| // We have a valid product variant, so enable the submit button | |
| addToCart.removeClass('disabled').removeAttr('disabled').val('Add to Cart'); | |
| } else { | |
| // Variant is sold out, disable the submit button | |
| addToCart.val('Sold Out').addClass('disabled').attr('disabled', 'disabled'); | |
| } | |
| // rest of the function continues... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment