Cart form and buttons
The values of `data-name` inside `smootify-cart`.
On this page
At a glance
Name: Coupon
A discount code
- Field
- A Text field
- Applied by
- A button with
data-action="coupon", or Enter. - Shows
- In the list of
cart="discount".
Name: gift-card
A gift card
- Field
- A Text field
- Applied by
- A button with
data-action="gift-card". - Shows
- In the list of
cart="gift-card".
Name: Note
The order note
- Field
- A Text area or a Text field
- Applied by
- Saved when the visitor checks out.
- Shows
- As the note of the order, in Shopify.
Name: Delivery day
Any other name: a cart attribute
- Field
- A Text field, Select, Checkbox or Radio button
- Applied by
- Saved when the visitor checks out.
- Shows
- In the order's additional details, in Shopify.
More in the guide.
Where it can go
- Inside
smootify-cart.
Values
| Attribute and value | What it is | Notes |
|---|---|---|
data-name="attribute name" | Cart attribute | The field becomes a cart attribute; on input |
name="coupon" | Coupon field | Applied with the coupon button; on input |
name="gift-card" | Gift card field | Applied with the gift card button; on input |
name="note" | Note for the seller | A textarea; on input |
data-action="open-cart" | Open the cart | on button |
data-action="close-cart" | Close the cart | on button |
data-action="open" | Open the cart (short) | Same as open-cart; on button |
data-action="close" | Close the cart (short) | Same as close-cart; on button |
data-action="coupon" | Apply the coupon | on button |
data-action="gift-card" | Apply the gift card | on button |
data-action="remove" | Remove the line | on button; inside box-item, cart-item, smootify-cart [cart=“discount”], smootify-cart [cart=“gift-card”] |
name="draft-order" | Ask for a quote | A draft order instead of checkout; on button |
data-wait="Updating…" | Label while waiting | Only on a Form Button (an input); on a <button>, use data-state children; on input |