Created
February 5, 2018 18:27
-
-
Save essmahr/89f5d159ceae6c09c7b50c52f3952be5 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
{% include 'saw_compute_discount' with item.product %} | |
{% include 'saw_variant' with item.variant %} | |
{% if saw_has_discount == false or saw_variant_price >= saw_variant_compare_at_price %} | |
{{ item.price | money }} | |
{% else %} | |
{{ saw_variant_price | round | money }}<br> | |
<del>{{ saw_variant_compare_at_price | money }}</del> | |
<!-- line_price: | |
{{saw_variant_price | round | times: item.quantity | money }}<br> | |
<del>{{ saw_variant_compare_at_price | times: item.quantity | money }}</del> | |
--> | |
{% endif %} | |
<div style="text-align: right;" class="saw-extra-note"></div> | |
<span class="saw-cart-original-total">{{ cart.total_price | money }}</span><br> | |
<span class="saw-cart-total"></span> | |
<script> | |
function SAWOrderNote(note) { | |
note = note.replace("some text to replace", | |
"new text"); | |
return note | |
} | |
function SAWComplete(res) { | |
setTimeout(function() { | |
jQuery(".cart__note-add").click() | |
}, 500); | |
if (res.warning_note != "") { | |
var checkout_selectors = [".purchase-benefits", "input[name='checkout']", "button[name='checkout']", "[href$='checkout']","input[name='goto_pp']", "button[name='goto_pp']", "input[name='goto_gc']", "button[name='goto_gc']", ".google-wallet-button-holder", ".amazon-payments-pay-button", ".alt-payment-list-amazon-button-image", ".additional-checkout-button__logo"]; | |
checkout_selectors.forEach(function(selector) { | |
jQuery(selector).remove(); | |
}) | |
return | |
} | |
setTimeout(function() { | |
//jQuery(".saw-cart-original-total").remove(); | |
}, 10) | |
return | |
} | |
</script> | |
{% include 'saw_cart' %} | |
{% if customer.tags == blank %} | |
{% else %} | |
{% endif %} | |
{% if customer.tags contains 'Wholesale' or customer.tags contains 'wholesale' %} | |
{% else %} | |
{% endif %} | |
{% unless template contains "cart" %} | |
{% endunless %} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment