Created
February 5, 2018 18:27
-
-
Save essmahr/fae6a429ccfcaed9fcf71edef39fcc12 to your computer and use it in GitHub Desktop.
This file contains 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
theme.liquid | |
{% if customer.tags == blank %}{% else %} | |
<script> | |
{% if template != 'cart' %} | |
jQuery(function(){ | |
jQuery('body').on('click', "input[name='checkout'], input[value='Checkout'], button[name='checkout'], input[name='goto_pp'], button[name='goto_pp'], input[name='goto_gc'], button[name='goto_gc'], [href$='checkout']", function(e){ | |
e.preventDefault(); | |
window.location = "/cart"; | |
}); | |
}); | |
{% endif %} | |
jQuery(function(){ | |
jQuery('body').on('click', "[href$='checkout']", function(e){ | |
e.preventDefault(); | |
window.location = "/cart"; | |
}); | |
}); | |
</script> | |
{% endif %} | |
<!-- product prices --> | |
{% include 'saw_compute_discount' with product %} | |
{% if saw_has_discount == false or saw_product_price >= saw_product_compare_at_price %} | |
<!-- original prices here --> | |
{% else %} | |
{{ saw_product_price | money }} | |
<del>{{ saw_product_compare_at_price | money }}</del> | |
{% endif %} | |
<!-- variant prices --> | |
{% include 'saw_compute_discount' with product %} | |
{% include 'saw_variant' with variant %} | |
{% if saw_has_discount == false or saw_variant_price >= saw_variant_compare_at_price %} | |
<!-- original prices here --> | |
{% else %} | |
{{ saw_variant_price | money }} | |
<del>{{ saw_variant_compare_at_price | money }}</del> | |
{% endif %} | |
{%- include 'saw_product_json' with product -%} | |
{{- saw_json -}} | |
{{- saw_json | escape -}} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment