2.0 Beta

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

What changed

create-address

Form that creates an address, with country and zone selects filled from the shop.

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

Where it can go

  • Anywhere on the page.
  • Must contain form, select[name="countryCode"], select[name="zoneCode"].
  • Out of place, Smootify removes it from the page: no form or country/zone selects; logs a warning.

What it requires

Fields in the form

Each field’s name attribute tells Smootify what the field holds.

NameFieldWhat it does
countryCodeselectRequired (removed without it). The country, made required (1.x and the first 2.0 builds: territoryCode, which Shopify deprecated; the debugger flags it); Smootify fills the options with the countries the shop ships to, keeping an option without a value as the placeholder.
zoneCodeselectRequired (removed without it). The province or state; Smootify replaces every option with the zones of the chosen country, the select is required only when the country has zones, and the host has no-zone until it does.
firstName, lastName, company, address1, address2, city, zipinput type="text"The address lines; in edit-address every field named like a key of the address is prefilled.
phoneNumberinput type="text"The phone, sent without spaces.
defaultAddressinput type="checkbox"Checked: the address becomes the default; unchecked: the default stays.
any other name—Sent to Shopify, which refuses the address: leave it out.

Attributes inside it

GroupAttribute nameValues
Address form (condition)address-condition1

Loading

Its code loads only on pages that have create-address.

    ↑ ↓ to moveEnter to openEsc to close