Skip to content

Instantly share code, notes, and snippets.

Avatar

Christian Jauvin cjauvin

View GitHub Profile
@chrisjhoughton
chrisjhoughton / remove.liquid
Last active Nov 12, 2020
Remove a Shopify cart attribute
View remove.liquid
{% if cart.attributes.yourCartAttribute %}
<script>
$.ajax({
type: 'POST',
url: '/cart/update.js',
data: 'attributes[yourCartAttribute]=',
dataType: 'json'
});
</script>
{% endif %}
You can’t perform that action at this time.