Skip to content

Instantly share code, notes, and snippets.

@stuartchaney
Last active June 5, 2017 19:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stuartchaney/971ec47988b5ffbf53f54e0d4189e269 to your computer and use it in GitHub Desktop.
Save stuartchaney/971ec47988b5ffbf53f54e0d4189e269 to your computer and use it in GitHub Desktop.
1. a) replace variable.price with wh_price
b) DO NOT replace inside of script tags
c) Only replace if inside {{ }} or {% %}
{{variable.price}} <!-- replace this with --> {{wh_price}}
{{random_stuff | times: 1 | variable.price}} <!-- replace this with --> {{random_stuff | times: 1 | wh_price}}
{% variable.price %} <!-- replace this with --> {% wh_price %}
<script type="text/javascript">
{{variable.price}} <!-- DONT REPLACE THIS -->
<img></img>
</script>
====================================
2. Replace the following
ajaxifyDerp.init({
disableAjaxCart: false,
enableQtySelectors: true
});
with
{% if wh_customer_tags.size > 0 %}
{% else %}
ajaxifyDerp.init({
disableAjaxCart: false,
enableQtySelectors: true
});
{% endif %}
===================================
3. Replace the following
new Derp.OptionSelectors('product-select', {
product: currentProduct,
onVariantSelected: setVariant,
enableHistoryState: true
});
with
function(){var ok='pal';}
new Derp.OptionSelectors('product-select', {
product: wh_product_hash(currentProduct),
onVariantSelected: setVariant,
enableHistoryState: true
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment