2.0 Beta

Smootify 2.0 is in public beta. Your 1.x store keeps working. Move when you want.

What changed

smootify-add-to-cart

Product form that turns the selection into cart lines.

v2.0 beta
Open .md
On this page
  1. Where it can go
  2. What it requires
  3. Fields in the form
  4. Attributes on the element
  5. Attributes inside it
  6. Loading

Where it can go

  • Inside smootify-product.
  • Must contain form.
  • Out of place, Smootify removes it from the page.

What it requires

Nothing beyond Smootify: it works on every plan.

Fields in the form

Each field’s Name setting in Webflow tells Smootify what the field holds. It is a setting of the field, not a custom attribute.

NameFieldWhat it does
quantitynumber field (quantity-input)The quantity of the line.
sellingPlanIdRadio button, Select field (written by subscription-swatches)The selling plan of the line.
option1, option2, option3Select fieldA bare select[name="optionN"] picks that option; never a line property.
Recipient emailText field, Type EmailGift card: Shopify sends the card to this address.
Recipient nameText fieldGift card: the recipient’s name, in the email Shopify sends with the card (with a filled Recipient email).
MessageText field, Text areaGift card: the message in that email.
Send ondate fieldGift card: the day the card is sent (Smootify sets today as the minimum).
buy-now (submit button)buttonThe line goes straight to checkout.
any Name on a field of an add-on widget (addon-checkbox, addon-select, addon-dropdown, addon-popover, addon-swatches, the add-on’s quantity-input)any fieldNever a property of the main line, whatever the Name (Webflow needs one). From mount the widget names its fields ##ignore-addon, left out of the line; once the add-on’s product loads they get the names of the add-on line (2.0).
any other name, or properties[Name]any fieldA line item property named as the field’s data-name; a checkbox with data-name sends its data-value, else ✓; a file is sent as JSON; empty values are not sent; a name starting with _ is hidden at checkout and in the cart.

Attributes on the element

  • It reads use-magic-box, box-title, box-image, single-addon-swatch, allow-unavailable, avoid-option-update.

Attributes inside it

GroupAttribute nameValues
Add to cartbundle8
Add to cart (condition)condition3

Loading

Defined at boot on every page.

    ↑ ↓ to moveEnter to openEsc to close