Skip to content

Instantly share code, notes, and snippets.

@msmithstubbs
Created October 30, 2013 10:12
Show Gist options
  • Select an option

  • Save msmithstubbs/7230136 to your computer and use it in GitHub Desktop.

Select an option

Save msmithstubbs/7230136 to your computer and use it in GitHub Desktop.
Set visibility of the Notify Me button from the template
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