Created
October 30, 2013 10:12
-
-
Save msmithstubbs/7230136 to your computer and use it in GitHub Desktop.
Set visibility of the Notify Me button from the template
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
| You can set the button visibility off by including the following config in the template: | |
| <script> | |
| var _BISConfig = { button: { visible: false } }; | |
| </script> | |
| This could combined with some Liquid variables to control it for certain situations. For example, if the product is in the Clearance collection then don't show the Notify Me button: | |
| {% for collection in product.collections %} | |
| {% if collection.handle == 'clearance' %} | |
| <script> | |
| _BISConfig = { button: { visible: false } }; | |
| </script> | |
| {% endif %} | |
| {% endfor %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment