Skip to content

Instantly share code, notes, and snippets.

<div class="product-price-right-top">
{% if product.handle == 'chocolate-chip-cookie' %}
{% for variant in product.variants %}
<h2>{{ variant.title }} - {{ variant.price | money_with_currency }} </h2>
{% endfor %}
{% endif %}
</div>
@malachi358
malachi358 / age-verification.js
Created December 3, 2020 11:29 — forked from alison-mk/age-verification.js
Age verification cookie: Check cookie on every page load, display pop up window if no cookie is found. In every instance, set cookie to expire after one day. Live and in action here: http://www.leefoil.com/
ageVerify: function() {
function setCookie(cname, cvalue, exdays) {
var d = new Date();
d.setTime(d.getTime() + (exdays*24*60*60*1000));
var expires = "expires="+d.toUTCString();
document.cookie = cname + "=" + cvalue + "; " + expires;
}
function getCookie(cname) {
var name = cname + "=";