Copy-paste a Liquid snippet for cart & checkout - A checkbox that adds a gift message and wrap note as line-item properties - easy AOV lift around gifting seasons.
Cart & checkoutTheme snippet Members sourceOS 2.0 themes
Travels as line-item properties - visible on the packing slip.
How to install on your store
1Back up your theme (Online Store > Themes > Actions > Duplicate) before changing any code.
2Create snippets/gift-wrap.liquid, paste the code and CSS.
3Render it inside your product <form> so the properties travel with the add-to-cart request.
4Fulfil it as a line-item property (shows on the packing slip). Charge for it via a separate product or free - your call.
gift-wrap.liquid
1{%- comment -%}2 Adds properties[Gift wrap] and properties[Gift message] to the line item.3 Render INSIDE the product form so they submit with Add to cart.4{%- endcomment -%}5<divclass="gpl-gift">6<labelclass="gpl-gift__check">7<inputtype="checkbox"name="properties[Gift wrap]"value="Yes" data-gpl-gift>8<span>{{label| default: 'Add gift wrap & a handwritten note'| escape}}<em>{{price_note| default: '+ Rs. 49'| escape}}</em></span>9</label>10<divclass="gpl-gift__msg" data-gpl-gift-msg hidden>11<labelclass="gpl-gift__msglabel"for="gpl-gift-msg">Your message (optional)</label>12<textareaid="gpl-gift-msg"name="properties[Gift message]"rows="2"maxlength="200"placeholder="Happy birthday! Love, Priya"></textarea>13</div>14</div>