Skip to content

Instantly share code, notes, and snippets.

@willbroderick
Created February 20, 2019 09:31
Show Gist options
  • Save willbroderick/357b17f1a641f3dbed88e26bae81242f to your computer and use it in GitHub Desktop.
Save willbroderick/357b17f1a641f3dbed88e26bae81242f to your computer and use it in GitHub Desktop.
Pre-order in a Clean Themes Sectioned theme (excluding Boost)
Warning: This does NOT work with quick-buys.
1. Copy and paste the following to the bottom of Templates/product.liquid:
{% for collection in product.collections %}
{% if collection.handle == 'pre-order' %}
<script>$('[action^="/cart/add"] input[type=submit]').val('Pre order'); theme.OptionManager.strings.buttonDefault = 'Pre order';</script>
{% endif %}
{% endif %}
2. Create a new collection called "Pre order", and add any pre-order products to it.
Done.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment