Skip to content

Instantly share code, notes, and snippets.

@jonathanmoore
Created March 4, 2022 22:51
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 jonathanmoore/b3ad6f1c4d5892dc2e5590c208c7f753 to your computer and use it in GitHub Desktop.
Save jonathanmoore/b3ad6f1c4d5892dc2e5590c208c7f753 to your computer and use it in GitHub Desktop.
Cart Liquid Block Custom Attributes
<div class="cart-block__attributes flex items-center space-x-2 justify-center md:justify-end">
<input form="cart" type="hidden" name="attributes[Gift]" value="No">
<input id="Cart-Attribute-Gift" form="cart" type="checkbox" name="attributes[Gift]" value="Yes"{% if cart.attributes["Gift"] == "Yes" %} checked{% endif %}>
<label for="Cart-Attribute-Gift" class="text-primary-text p-0 text-sm font-body font-weight-body normal-case tracking-normal">Is this a gift?</label>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment