Home
Wiki
Home
Wiki
  1. 3. Reusables
  • Back to home
  • 1. Themes
  • Vs Code
    • Getting Started
  • Kitchenware
    • Layout
      • New Layout
      • Legacy Layout
    • Components
      • Announcement
      • Banner Carousel
      • Banner With Products Carousel
      • Blog Category List
      • Blog List
      • Brand List
      • Brands Carousel
      • Breadcrumb
      • Call To Action
      • Cart
      • Categories List
      • Change Password
      • Checkout
      • Cookie Manager
      • Filter list
      • Footer
      • Forgot Password
      • Form
      • Hero Carousel
      • Icon Block
      • Invitation
      • Last Visited Products
      • Layout
      • Login
      • Map
      • Nav Bar
      • Offer
      • Product Attachments
      • Product Attributes
      • Product Documentation
      • Product Expected
      • Product Modal
      • Products Block
      • Products Carousel
      • Product Single
      • Profile
      • Quote
      • Register
      • Related Products
      • Search
      • Stores
      • Subscribe Newsletter
      • Text with Image
      • Top Bar
      • Video
    • Reusables
      • Getting Started
    • Assets
      • Getting Started
    • SDK
      • Products
        • _findProductsByCategory
        • _findProductsByIds
        • _findProductsByTitle
        • _findProductsByFilter
        • _findProductsByCriteria
        • _findProductsAndCalculate
        • _findProductsThenCalculate
        • _getProductAttributeSet
        • _setLastVisited
      • Categories
        • _findCategoryTreeById
        • _findCategoriesByIds
        • _findCategoryByAlias
        • _findCategoryTreeByAlias
        • _getCategoryContent
      • Collections
        • _getCollectionContent
        • _findCollectionsByIds
        • _findCollectionsByIdsThenCalculate
      • Brands
        • _getBrandContent
        • _findBrandsByIds
      • Cart
        • _addToCartMulti
        • _addToCart
        • _setCart
        • _clearCart
        • _setCartListener
        • _removeFromCart
        • _calculateCart
      • Checkout
        • _startCheckout
        • _updateCheckout
        • _completeCheckout
      • Shopping Lists
        • _getShoppingLists
        • _updateShoppingList
        • _createShoppingList
        • _deleteShoppingList
        • _getShoppingListByAlias
      • Navigation
        • _getFooterMenu
        • _getHeaderMenu
      • Users
        • _getUserById
      • Utils
        • _calculateCurrency
        • _getCurrencySymbol
        • _getCulture
        • _subscribeToNewsletter
        • _findUnitsByIds
  • Noir
    • 0. Introduction
    • 6. FAQ
    • 1. Structure
      • _Overview
      • LayoutA.liquid
      • ComponentsList.liquid
      • Metas.liquid
      • CssVariables.liquid
      • Json.liquid
      • GoogleTagManager.liquid
      • StagingButton.liquid
    • 2. Components
      • _Overview
      • Announcement
      • BannerCarousel
      • BlogCategoryList
      • BlogList
      • BrandList
      • Breadcrumb
      • Cart
      • CategoriesList
      • ChangePassword
      • Checkout
      • CookieManager
      • FilterList
      • Footer
      • ForgotPassword
      • Form
      • IconBlock
      • Invitation
      • LastVisitedProducts
      • Login
      • Map
      • NavBar
      • ProductAttachments
      • ProductAttributes
      • ProductComparison
      • ProductDocumentation
      • ProductMixList
      • ProductsBlock
      • ProductsCarousel
      • ProductSingle
      • Profile
      • Quote
      • Register
      • RelatedProducts
      • SingleBlog
      • Stores
      • TextWithImage
      • ThankYouPage
      • TopBar
      • Wishlist
    • 3. Reusables
      • _Overview
      • Addresses
      • AddressForm
      • AnnouncementModal
      • BackToTop
      • BillingRetail
      • Company
      • General
      • Login
      • LoginModal
      • MonthlyTransactions
      • Orders
      • Payment
      • ProductAttachments
      • ProductAttributes
      • ProductComparisonButton
      • ProductComparisonFloatingButton
      • ProductGridItem
      • ProductListItem
      • ProductModal
      • ProfileInfo
      • PromptModal
      • Quotes
      • Register
      • Services
      • Shipping
      • ShoppingLists
      • ShoppingListsButton
      • ShoppingListsNavbar
      • Toast
      • Transactions
      • Users
      • VariantContent
      • WishlistButton
    • 4. Assets
      • Fonts
      • Images
      • Templates
      • Javascript
        • _Overview
        • theme.js
      • Css - Scss
        • _Overview
        • ThemeClasses
    • 5. SDK
      • _Overview
      • LiquidGlobals
      • ServicesSDK
  1. 3. Reusables

Register

Purpose#

The Register reusable renders the customer registration form (first/last name, email, password, confirm password, terms consent), validates user input client-side, and submits the registration via the SDK.
It’s used both as a standalone Register page and inside the Login modal.

Where it's rendered#

Standalone Register page#

Components/Register/Default.liquid renders:
{% render 'Reusables\\Register\\Default', uniquekey: uniquekey %}

Login modal#

Reusables/LoginModal/Default.liquid renders:
{% render 'Reusables\\Register\\Default', uniquekey: uniquekey %}

Inputs (Liquid render parameters)#

Liquid parameters#

uniquekey (string)
Used to make DOM ids/names unique.
The template appends it to all field id/name attributes.

Model shape (storefront example)#

Sanitized real storefront example (provided by the user) of the component/page model that renders registration:
{
  "name": "Register",
  "view": "Default",
  "section": "SectionA",
  "settings": {
    "retypePassword": false,
    "id": "Component Id",
    "section": "SectionA",
    "type": "Register",
    "name": "Register",
    "configuredInContentApi": false,
    "view": "Default",
    "displayName": "",
    "cssClass": "",
    "header": "",
    "alignment": "Left"
  },
  "translations": {
    "registerAccount": "Sample text",
    "alreadyAccount": "Sample text",
    "login": "Sample text"
  }
}
Notes:
The reusable itself relies mostly on Reusables.Register.Translations.* and does not read the page translations object directly.
Registration is feature-gated by GlobalData.Settings.showRegistration inside the reusable template.

Template behavior (Liquid + Alpine)#

Feature flag#

The form is rendered only when:
GlobalData.Settings.showRegistration is truthy.

Alpine wiring#

Alpine component: x-data="registerreusabledefault"
Submission handler:
@submit.prevent="checkForm(uniquekey, successMessage, errorMessageFail, errorMessageUserExists)"

Fields#

All fields are required unless stated otherwise:
First name (register-firstname-<uniquekey>) (required)
Last name (register-lastname-<uniquekey>) (required)
Email (register-email-<uniquekey>) (required, email format)
Password (register-password-<uniquekey>) (required, must pass weak-password rules)
Confirm password (register-confirm-password-<uniquekey>) (required, must match password)
Terms consent checkbox (register-terms-<uniquekey>) (required)

Password visibility#

Both password fields include a toggle checkbox that triggers toggleVisibility($event) to switch the input type between password and text.

JavaScript#

Global object#

File: Reusables/Register/Default.js
Exposes: registerreusabledefault

init#

validateField#

toggleVisibility#

updateFormValidity#

clearForm#

checkForm#

Global Alpine stores#

This reusable uses:
$store.toast
removeAll()
add(message, icon, type, autoClose)
$store.loginModal
close(preserveToasts)

Services / API calls#

servicesreusabledefault.accountRegister(info)
Request payload shape (as built by the JS):
{
  "FirstName": "Sample text",
  "LastName": "Sample text",
  "Email": "sample@example.com",
  "Password": "Sample text",
  "ValidatePassword": "Sample text"
}

Dependencies#

Liquid: Reusables/Register/Default.liquid
JS: Reusables/Register/Default.js
Translations: Reusables/Register/Default.json
Render sites:
Components/Register/Default.liquid
Reusables/LoginModal/Default.liquid
Alpine stores:
$store.toast
$store.loginModal
SDK wrapper:
servicesreusabledefault.accountRegister(...)

Notes#

The template uses uniquekey to avoid DOM id collisions when the same form appears more than once (e.g. inside the login modal).
The password rules are enforced client-side; backend should enforce the same (or stricter) policy.
The form is gated by GlobalData.Settings.showRegistration; when disabled, this reusable renders nothing.
Modified at 2026-05-12 08:24:18
Previous
Quotes
Next
Services
Built with