Attach custom key-value metadata to the cart line item created by an add-to-cart action. Properties appear on the order in the backend and can be used for personalisation, engravings, or any order-level metadata.
Attribute
Description
data-next-property-container
CSS selector for a container element. Any [data-next-property-key] inputs inside it are collected and sent as properties on the line item. Scoped to this button — does not affect other buttons on the page.
data-next-default-property-key="<key>"
Place on any <input>, <textarea>, or <select> anywhere on the page. Its value is applied as a property to every add-to-cart (and every bundle line item) on the page. Container-scoped properties with the same key take precedence.
Place data-next-property-key="<key>" on <input>, <textarea>, or <select> elements inside the container named by data-next-property-container to define the property key for each field.
Properties are resolved at click time, so the current field values are captured when the user submits. When the item is already in the cart, any change to a data-next-property-key or data-next-default-property-key input immediately updates the cart item's properties.
For a property that should apply to every item regardless of which button is clicked, use data-next-default-property-key on a standalone input anywhere on the page: