Jscriptz Checkout

Hyva-Compatible One-Page Checkout — User Guide

Version 1.0.0

A modern, fully-customizable checkout experience built with Alpine.js and GraphQL. Features visual layout builder, custom fields, analytics, A/B testing, and abandoned cart recovery.

Live Demo: https://mage.test/checkout

1. Introduction

Jscriptz Checkout is a complete replacement for Magento's default checkout, designed specifically for Hyva Theme compatibility. It provides a modern, reactive checkout experience using Alpine.js instead of Knockout.js, with all cart operations handled via GraphQL.

Alpine.js Reactive UI

Lightweight, modern JavaScript framework replacing Knockout.js

Visual Checkout Builder

Drag-and-drop layout designer for complete customization

Custom Fields

Add unlimited custom fields with 15+ field types

Analytics Dashboard

Track conversion funnels, errors, and trends

A/B Testing

Built-in split testing with statistical analysis

Abandoned Cart Recovery

Automated 3-email recovery campaigns

System Requirements

Requirement Version
PHP 8.1 or higher
Magento 2.4.x
Hyva Theme Module 1.3 or higher
Node.js (for Tailwind builds) 20.0 or higher

2. Installation

Follow these steps to install and configure Jscriptz Checkout.

Prerequisites

Step 1: Get Your Composer Access Token

After purchasing the extension, log in to your Jscriptz account to get your Composer authentication token:

  1. Go to mage.jscriptz.com/customer/account
  2. Click on GitHub Access in the left sidebar
  3. Click Generate New Token if you don't have one
  4. Copy your access token (valid for 50 minutes)

Step 2: Configure Composer Authentication

Create or update your auth.json file in your Magento root directory:

{
    "http-basic": {
        "packages.jscriptz.com": {
            "username": "YOUR_LICENSE_KEY",
            "password": "YOUR_ACCESS_TOKEN"
        }
    }
}

Replace YOUR_LICENSE_KEY with your license key from the My Licenses page, and YOUR_ACCESS_TOKEN with the token from Step 1.

Step 3: Install via Composer

# Add the Jscriptz repository (first time only)
composer config repositories.jscriptz composer https://packages.jscriptz.com

# Install the Checkout module
composer require jscriptz/module-checkout

Step 4: Run Magento Setup

# Enable the module
bin/magento module:enable Jscriptz_Checkout

# Run setup upgrade
bin/magento setup:upgrade

# Compile DI (production mode)
bin/magento setup:di:compile

# Deploy static content (production mode)
bin/magento setup:static-content:deploy -f

# Clear cache
bin/magento cache:flush

Step 5: Activate Your License

After installation, activate your license in the Magento admin:

  1. Go to Stores → Configuration → Jscriptz → Jscriptz Checkout
  2. Expand the License section
  3. Enter your License Key from your Jscriptz License Account
  4. Click Save Config
  5. Click Verify License to confirm activation
Success! A green "Active" badge confirms your license is valid.

Tailwind CSS Build (Optional)

The module includes its own Tailwind CSS build system for styling customization. If you want to customize styles:

# Navigate to the tailwind directory
cd app/code/Jscriptz/Checkout/view/frontend/tailwind

# Install dependencies
npm install

# Development build with watch mode
npm run dev

# Production build (minified)
npm run build

3. Global Configuration

Configure the global checkout behavior. These settings control the overall checkout experience across your store.

Navigate to: Stores → Configuration → JSCRIPTZ → Jscriptz Checkout

3.1 General Settings

Setting Description Options
Enabled Enable or disable Jscriptz Checkout globally Yes / No

3.2 Display Settings

Setting Description Options
Checkout Mode Display all steps on one page or use multi-step wizard One-Page / Multi-Step
Show Header Display the site header on the checkout page Yes / No
Show Footer Display the site footer on the checkout page Yes / No
Show Checkout Heading Display a heading at the top of checkout Yes / No
Checkout Heading Title Custom text for the checkout heading Text (e.g., "Secure Checkout")
Completeness Behavior How to indicate step completion Show Message / Hide / Disable Button
Combine Addresses Combine shipping and billing when same Yes / No
Display Settings Configuration
Display Settings configuration showing checkout mode and layout options

3.3 Progress Bar

The progress bar provides visual feedback on checkout completion status.

Setting Description Options
Enabled Show progress bar at top of checkout Yes / No
Show Step Numbers Display numbered circles (1, 2, 3...) Yes / No
Show Step Labels Display step names below circles Yes / No
Clickable Steps Allow clicking on completed steps to navigate Yes / No
Sticky Keep progress bar visible when scrolling Yes / No
Progress Bar Example
Progress bar showing step numbers, labels, and completion status

3.4 Express Payments

Configure express payment options like Apple Pay and Google Pay.

Express Payments Configuration
Express payment method configuration options

3.5 Smart Shipping Display

Smart shipping features help customers choose the best shipping option with visual badges and countdown timers.

Feature Description
Fastest Badge Highlights the shipping method with shortest delivery time
Cheapest Badge Highlights the lowest-cost shipping option
Cutoff Countdown Shows time remaining until shipping cutoff (e.g., "Order in 2h 30m for same-day shipping")
Free Shipping Progress Shows how much more is needed for free shipping threshold
Shipping Cutoff Countdown
Shipping cutoff countdown showing time remaining for same-day shipping

3.6 Gift Options

Enable gift wrapping, gift messages, and gift receipts for your checkout.

Setting Description
Enable Gift Options Show gift options section in checkout
Gift Wrapping Allow customers to select gift wrapping styles
Gift Message Allow customers to add a personalized message
Gift Receipt Option to include a price-hidden gift receipt

3.7 Trust & Security Badges

Display trust badges to increase customer confidence during checkout.

Badge Type Description
Payment Method Badges Show accepted payment method logos (Visa, Mastercard, etc.)
Security Badges Display security certifications (SSL, PCI Compliant, etc.)
Guarantee Badges Show satisfaction guarantees and return policies

4. Checkout Builder

The Checkout Builder is a powerful visual interface for designing your checkout layout. Drag and drop steps, resize columns, and customize every aspect of the checkout experience.

Navigate to: Stores → Jscriptz Checkout → Checkout Builder

4.1 Overview & Layout

The builder interface consists of:

Checkout Builder Main Interface
Checkout Builder main interface showing toolbar, sidebar, and layout canvas

4.2 Store & Device Selection

Configure different layouts for different stores and device types.

Option Description
Store View Select which store view to configure (each can have unique layouts)
Device Type Desktop, Tablet, or Mobile - each has independent layout configuration
Device Type Switcher
Device type switcher for Desktop, Tablet, and Mobile layouts

4.3 Layout Templates

Save and load checkout layouts as templates for quick configuration.

Templates Dropdown
Template selection dropdown with system and custom templates

4.4 Row Management

The checkout layout uses a row/column grid system. Each row can contain 1-4 columns.

Action Description
Add Row Click "Add Row" in the toolbar to add a new row
Column Count Choose 1, 2, 3, or 4 columns per row
Reorder Rows Drag rows using the handle to reorder
Delete Row Remove rows by clicking the delete button
Column Count Selection
Column count selection dropdown for configuring row layouts

4.5 Column Resize

Resize columns by dragging the handle between them. Column widths are saved as percentages.

Column Resize Handle
Column resize handle for adjusting column widths
Column Resize Result
Result after resizing columns to custom widths

4.6 Step Management

Manage checkout steps including adding, editing, reordering, and grouping.

Step Properties

Property Description
Label Display name for the step
Show Title Whether to display the step title
Title Alignment Left, Center, or Right alignment
Heading Style Text size (text-xl, text-2xl, text-lg, text-base)
Verify Completeness Show green checkmark when step is complete
Is Collapsible Allow step to collapse when complete
Collapse Criteria When to collapse: Required Fields, All Fields, or Specific Fields
Collapse Fields Specific fields to check (when using Specific Fields criteria)
How Step Collapse Behavior Works:
  • Each step's collapse behavior is controlled by its Is Collapsible, Collapse Criteria, and Collapse Fields settings
  • A step requires confirmation (Continue button click) if it has a continue button field or visible custom input fields
  • Steps without continue buttons auto-collapse when their collapse criteria is met
Step Edit Modal
Step edit modal showing all step properties

4.7 Design Components

Add visual elements to enhance your checkout layout.

Component Description
Heading Add text headings with customizable styles
HTML Insert custom HTML content
Divider Visual separator between sections
Image Display images or logos
Secure Checkout Badge Trust indicator for security
Payment Method Badges Accepted payment method logos
Security Badges SSL, PCI, and other certifications
Guarantee Badges Money-back guarantees, return policies
Coupon Code Coupon code entry field
Gift Card Gift card code entry field
Design Components
Design Components tab showing available components for drag-and-drop

4.8 Fields Tab

The Fields tab shows all available fields that can be dragged to checkout steps.

Fields Tab
Fields tab showing system and custom fields available for placement

5. Custom Checkout Fields

Create custom fields to collect additional information during checkout. Fields can be displayed in orders, invoices, shipments, and emails.

Navigate to: Stores → Jscriptz Checkout → Checkout Fields
Checkout Fields Grid
Checkout Fields listing showing all configured custom fields

5.1 Field Types

Category Types Description
Input Fields text, email, textarea, tel, number Standard text input fields with various formats
Selection Fields select, multiselect, radio, checkbox, yesno Fields with predefined options
Date/Time date, time, delivery_date Date and time pickers
Content Fields html, heading, paragraph Static content display (not collected)
File Upload file Allow customers to upload files
UI Components place_order_button, completeness_message, secure_badge Special checkout UI elements

5.2 Creating Fields

To create a new field, click "Add New Field" and configure the following:

Setting Description Required
Field Code Unique identifier (lowercase, underscores) Yes
Label Display name shown to customers Yes
Field Type Type of input field Yes
Checkout Step Which step to display the field in Yes
Sort Order Position within the step (lower = higher) No
Field Edit Form
Field edit form showing general settings and field type selection

5.3 Field Properties

Property Description
Required Field must be filled to complete checkout
Visible Field is shown on checkout (can be hidden)
Enabled Field is active and collecting data
Placeholder Placeholder text inside the input
Tooltip Help text shown on hover
Default Value Pre-filled value for the field
CSS Class Custom CSS classes for styling

5.4 Display Settings

Control where custom field values are displayed after checkout.

Setting Description
Show in Order View Display in admin order view and customer account
Show in Invoice Include on PDF invoices and admin invoice view
Show in Shipment Include on packing slips and admin shipment view
Show in Customer Grid Add column to admin customer grid
Show in Admin Customer View Display in admin customer detail page
Show in Frontend Account Display in customer's My Account area
Field Display Settings
Field display settings controlling where values appear

5.5 Visibility Conditions

Show or hide fields based on dynamic conditions. Supports 8 condition types:

Condition Type Description Example
Billing Country Based on selected billing country Show VAT ID only for EU countries
Shipping Country Based on selected shipping country Show customs field for international orders
Cart Attributes Based on cart weight, item count, subtotal Show field if cart total > $100
Customer Attributes Based on customer group, is_guest Show wholesale field for B2B customers
Checkout Field Based on value of another field Show "Other" text box when "Other" is selected
Payment Method Based on selected payment method Show PO number for "Purchase Order" payment
Shipping Method Based on selected shipping method Show delivery time for express shipping
Product Attributes Based on products in cart Show engraving field for engraved products
Visibility Conditions
All 8 visibility condition types for dynamic field display

5.6 Fee/Discount Fields

Create fields that add fees or discounts to the order total.

Setting Description
Amount Type Fixed amount or percentage of subtotal
Amount Value The fee/discount amount (positive = fee, negative = discount)
Percentage Basis For percentage: subtotal or subtotal including tax
Is Taxable Whether to apply tax to the fee

6. Checkout Steps

The checkout process consists of several steps that can be customized via the Checkout Builder.

6.1 Contact Information

The first step collects the customer's email address and handles authentication.

Email Existence Check
Email existence check detecting an existing customer account

6.2 Shipping Address

Collect shipping address with support for saved addresses and autocomplete.

6.3 Billing Address

6.4 Shipping Method

Display available shipping methods with smart badges and pricing.

Shipping Methods
Shipping method selection with smart badges

6.5 Payment Method

Supported payment method integrations:

Payment Method Features
Stripe Card payments, saved cards, Stripe Link
Mollie Multiple payment methods (iDEAL, Bancontact, etc.)
Braintree PayPal, card payments, saved cards
PayPal Express checkout, PayPal Credit

6.6 Order Summary

Displays cart contents, totals, and allows coupon/gift card entry.

Order Summary
Enhanced order summary with expandable items and totals

6.7 Gift Options

Optional gift options for the order.

Gift Options
Gift options section with wrapping, message, and receipt options

7. Customer Experience

7.1 Email Existence Check

When a customer enters their email, the system checks if an account exists. If found, a login option is displayed.

7.2 Login for Existing Customers

Existing customers can log in during checkout to access:

Sign In Button
Sign in button enabled after password entry

7.3 Guest Checkout

Customers can complete checkout without creating an account.

7.4 Account Creation

Options for account creation:

7.5 Multi-Step Wizard Mode

Alternative to one-page checkout, displaying one step at a time with Previous/Next navigation.

Multi-Step Checkout
Multi-step checkout showing step-by-step navigation

8. Social Login New

Allow customers to sign in or create accounts using their existing social media accounts. This simplifies the checkout process and increases conversion by reducing friction.

New Feature: Social Login is a new feature in Jscriptz Checkout that supports multiple OAuth providers including Google, Facebook, LinkedIn, and Apple.

8.1 Overview

Social Login enables customers to authenticate using their existing social accounts during checkout. Benefits include:

Faster Checkout

No need to fill out registration forms or remember passwords

Higher Conversions

Reduce cart abandonment by streamlining authentication

Verified Emails

Social providers verify email addresses, reducing fake accounts

Customer Data

Automatically populate customer name and email from social profile

8.2 Supported Providers

Provider OAuth Type Data Retrieved
Google OAuth 2.0 Email, Name, Profile Picture
Facebook OAuth 2.0 Email, Name, Profile Picture
LinkedIn OpenID Connect Email, Name, Profile Picture
Apple Sign in with Apple Email, Name (first login only)

8.3 Google Setup

To enable Google Sign-In, you need to create OAuth 2.0 credentials in the Google Cloud Console.

Step 1: Create a Google Cloud Project

  1. Go to Google Cloud Console
  2. Click "Select a project" at the top, then "New Project"
  3. Enter a project name (e.g., "My Store Social Login")
  4. Click "Create"

Step 2: Configure OAuth Consent Screen

  1. In the Google Cloud Console, go to APIs & Services → OAuth consent screen
  2. Select External user type (or Internal if using Google Workspace)
  3. Fill in the required fields:
    • App name: Your store name
    • User support email: Your email address
    • Developer contact: Your email address
  4. Add scopes: email, profile, openid
  5. Save and continue through the remaining steps

Step 3: Create OAuth Client ID

  1. Go to APIs & Services → Credentials
  2. Click Create Credentials → OAuth client ID
  3. Select Web application as the application type
  4. Enter a name (e.g., "Magento Social Login")
  5. Add Authorized JavaScript origins:
    https://your-store.com
  6. Add Authorized redirect URIs:
    https://your-store.com/jscriptz_checkout/sociallogin/callback/provider/google
  7. Click Create
Save Your Credentials: After creating the OAuth client, you'll see your Client ID and Client Secret. Save these securely - you'll need them for the Magento configuration.

Step 4: Publish the App (Production)

For production use, you need to publish your OAuth consent screen:

  1. Go to OAuth consent screen
  2. Click Publish App
  3. If your app requests sensitive scopes, you may need to submit for Google verification
Testing Mode: While in testing mode, only test users you add can use the login. Add yourself as a test user while developing.

8.4 LinkedIn Setup

To enable LinkedIn Sign-In, you need to create an application in the LinkedIn Developer Portal.

Step 1: Create a LinkedIn App

  1. Go to LinkedIn Developer Portal
  2. Click Create app
  3. Fill in the required fields:
    • App name: Your store name
    • LinkedIn Page: Select your company page (or create one)
    • Privacy policy URL: Your store's privacy policy URL
    • App logo: Upload your store logo (100x100px minimum)
  4. Accept the terms and click Create app
LinkedIn Create App Form
LinkedIn Developer Portal - Create App form with required fields

Step 2: Request Sign In with LinkedIn using OpenID Connect

  1. In your app's settings, go to the Products tab
  2. Find Sign In with LinkedIn using OpenID Connect
  3. Click Request access
  4. Accept the terms to enable the product
LinkedIn Products Tab
LinkedIn Products tab showing Sign In with LinkedIn using OpenID Connect
Required Product: You must enable "Sign In with LinkedIn using OpenID Connect" - the legacy "Sign In with LinkedIn" product will not work.

Step 3: Configure OAuth 2.0 Settings

  1. Go to the Auth tab in your app
  2. Add the following Authorized redirect URL:
    https://your-store.com/jscriptz_checkout/sociallogin/callback/provider/linkedin
  3. Copy your Client ID and Client Secret from this page
LinkedIn Auth Settings
LinkedIn Auth tab showing Client ID, Client Secret, and redirect URLs
Company Page Required: LinkedIn requires a company page to create an app. If you see "No Company Found", you'll need to create a LinkedIn Company Page first.

8.5 Facebook Setup

To enable Facebook Login, you need to create an application in the Facebook Developer Portal.

Step 1: Create a Facebook App

  1. Go to Facebook Developers
  2. Click My Apps in the top right corner
  3. Click Create App
  4. Select Consumer as the app type
  5. Enter your app name (e.g., "Your Store Checkout") and contact email
  6. Click Create App

Step 2: Add Facebook Login Product

  1. In your app dashboard, click Add Product in the left sidebar
  2. Find Facebook Login and click Set Up
  3. Skip the quickstart wizard - we'll configure manually

Step 3: Configure Facebook Login Settings

  1. In the left sidebar, go to Facebook Login → Settings
  2. Configure the OAuth settings:
    • Client OAuth Login: Yes
    • Web OAuth Login: Yes
    • Enforce HTTPS: Yes
  3. Add the following Valid OAuth Redirect URI:
    https://your-store.com/jscriptz_checkout/sociallogin/popupcallback/provider/facebook/
  4. Click Save Changes
Store View URLs: If your store uses a store view code in the URL (e.g., /subcats/), include it in the redirect URI:
https://your-store.com/subcats/jscriptz_checkout/sociallogin/popupcallback/provider/facebook/

Step 4: Get App Credentials

  1. In the left sidebar, go to Settings → Basic
  2. Copy your App ID (visible at top)
  3. Click Show next to App Secret and copy it
Keep Credentials Secure: Never commit your App Secret to version control. Use environment variables or Magento's encrypted config storage.

Step 5: App Review (Production)

For production use with real customers:

  1. Go to App Review in the left sidebar
  2. Click Permissions and Features
  3. Request email permission (usually auto-approved)
  4. Submit for review
Development Mode: For testing, you can use the app in Development Mode. Only users listed as app testers or developers can log in.

8.6 Apple Setup

To enable Sign in with Apple, you need an Apple Developer Program membership ($99/year) and must configure several identifiers and keys.

Apple Developer Program Required: Sign in with Apple requires a paid Apple Developer Program membership. Enrollment may take up to 48 hours to process.

Step 1: Enroll in Apple Developer Program

  1. Go to Apple Developer Program
  2. Click Enroll
  3. Sign in with your Apple ID (or create one)
  4. Complete the enrollment process ($99/year)
  5. Wait for enrollment approval (can take up to 48 hours)

Step 2: Create an App ID

  1. Go to Certificates, Identifiers & Profiles
  2. Click Identifiers in the sidebar
  3. Click the + button to create a new identifier
  4. Select App IDs and click Continue
  5. Select App type and click Continue
  6. Fill in the details:
    • Description: Your store name (e.g., "My Store")
    • Bundle ID: Explicit, use reverse domain (e.g., "com.yourstore.checkout")
  7. Scroll down and check Sign In with Apple
  8. Click Continue, then Register

Step 3: Create a Services ID

  1. In Identifiers, click the + button again
  2. Select Services IDs and click Continue
  3. Fill in the details:
    • Description: Your store name
    • Identifier: A unique ID (e.g., "com.yourstore.signin")
  4. Click Continue, then Register
  5. Click on the newly created Services ID
  6. Check Sign In with Apple and click Configure
  7. Configure the web authentication:
    • Primary App ID: Select the App ID you created
    • Domains: your-store.com
    • Return URLs:
      https://your-store.com/jscriptz_checkout/sociallogin/popupcallback/provider/apple/
  8. Click Save, then Continue, then Save
Services ID is Your Client ID: The Services ID identifier (e.g., "com.yourstore.signin") is what you'll enter as the Apple Services ID in Magento admin.

Step 4: Create a Sign In Key

  1. Go to Keys in the sidebar
  2. Click the + button to create a new key
  3. Enter a Key Name (e.g., "Sign In with Apple Key")
  4. Check Sign In with Apple
  5. Click Configure next to Sign In with Apple
  6. Select your Primary App ID and click Save
  7. Click Continue, then Register
  8. Important: Download the key file (.p8) immediately - you can only download it once!
  9. Note the Key ID shown on the page
Download Key Immediately: The .p8 private key file can only be downloaded once. Store it securely - you'll need it for Magento configuration.

Step 5: Get Your Team ID

  1. Go to Apple Developer Account
  2. Your Team ID is shown in the top right corner of the Membership page, or in the URL when viewing identifiers

Step 6: Configure Magento Admin

In Magento admin, go to Stores → Configuration → JSCRIPTZ → Jscriptz Checkout → Social Login and expand the Apple section:

Setting Description
Enable Apple Login Set to Yes to enable
Apple Services ID The Services ID identifier (e.g., "com.yourstore.signin")
Apple Team ID Your 10-character Team ID from Apple Developer account
Apple Key ID The Key ID from when you created the Sign In key
Apple Private Key Paste the entire contents of your .p8 key file (including BEGIN/END lines)
Private Key Format: The private key should be pasted exactly as it appears in the .p8 file, including the -----BEGIN PRIVATE KEY----- and -----END PRIVATE KEY----- lines.

Apple-Specific Behaviors

8.7 Magento Configuration

After setting up your OAuth provider(s), configure them in Magento admin.

Navigate to: Stores → Configuration → JSCRIPTZ → Jscriptz Checkout → Social Login

General Settings

Setting Description Options
Enable Social Login Enable/disable all social login functionality Yes / No
Placement Where to show social login buttons Email Step / Express Area / Both
Button Style Visual style of social buttons Icons Only / Text Only / Icon + Text
Heading Text Text above social login buttons Text (e.g., "Or continue with")

Provider Configuration

For each provider (Google, LinkedIn, etc.), configure:

Setting Description
Enable [Provider] Enable this specific provider
Client ID OAuth Client ID from the provider's developer portal
Client Secret OAuth Client Secret from the provider's developer portal
Redirect URL Format: For all providers, the redirect URL format is:
https://your-store.com/jscriptz_checkout/sociallogin/callback/provider/[provider_code]
Provider codes: google, facebook, linkedin, apple, amazon, microsoft, twitter

Login Page Integration

Social Login can also be displayed on the customer login page (/customer/account/login):

Setting Description
Show on Login Page Display social login buttons on the standard login page
Login Page Alignment Position of social buttons (Above Form / Below Form / Side by Side)
Compact Form Layout Use a more compact layout with social and form side-by-side

9. Order Processing

9.1 Order Success Page

After successful order placement, customers see a confirmation page with:

Order Success Page
Order success page with confirmation details

9.2 Admin Order View

Custom field values are displayed in the admin order view when "Show in Order View" is enabled.

Admin Order Custom Fields
Custom fields displayed in admin order view

9.3 Invoice & Shipment Views

Custom fields appear on invoices and shipments when configured.

Admin Invoice Custom Fields
Custom fields displayed on invoice view

9.4 Order Emails

Custom fields are automatically included in order confirmation emails.

Email Template Variable: For custom email templates, use the variable {{var custom_checkout_fields_html|raw}} to display custom fields.

10. Mobile Experience

The checkout is fully responsive with mobile-specific features.

Mobile Features

Mobile Checkout View
Mobile checkout view with sticky order summary bar

11. Order Bumps (Upsells)

Add upsell products to the checkout to increase average order value.

Navigate to: Stores → Jscriptz Checkout → Order Bumps

Order Bump Features

Feature Description
Source Types Manual product selection, Related, Upsell, or Cross-sell products
Placement Before place order, order summary, or both locations
Discount Optional percentage or fixed discount on bump products
Custom Label Override product name with promotional copy

12. Analytics Dashboard

Track checkout performance with built-in analytics.

Navigate to: Stores → Jscriptz Checkout → Analytics
Analytics Dashboard
Analytics dashboard showing conversion metrics and funnel

12.1 Conversion Funnel

Visualize checkout progression and identify drop-off points.

12.2 Error Tracking

Monitor validation errors and payment failures.

13. A/B Testing

Run split tests to optimize checkout conversion.

Navigate to: Stores → Jscriptz Checkout → A/B Tests

13.1 Creating Tests

Setting Description
Test Name Descriptive name for the test
Variants Control + one or more test variants
Traffic Allocation Percentage of traffic per variant
Winner Selection Manual, confidence-based, or auto-apply winner
A/B Tests Listing
A/B tests listing showing test status and results

13.2 Test Results

View test performance metrics including:

14. Abandoned Cart Recovery

Automatically recover abandoned carts with email campaigns.

Recovery Process

  1. Detection - Hourly cron identifies abandoned sessions
  2. Email 1 - Sent immediately after abandonment
  3. Email 2 - Sent 6 hours later (configurable)
  4. Email 3 - Sent 24 hours later (configurable)
  5. Recovery - Token-based link restores cart for completion

Webhook Integration

Send abandoned cart data to third-party services (Klaviyo, Mailchimp, etc.) via webhooks.

15. VAT/Tax Integration

EU VAT ID validation and B2B tax exemption.

Features

Feature Description
VAT ID Field Optional field for B2B customers to enter VAT ID
VIES Validation Real-time validation against EU VIES database
Tax Exemption Automatic 0% tax for valid intra-EU B2B orders
Company Name Lookup Retrieves company name from VIES database

16. Developer Reference

Adding Custom Fields via DI

Add custom fields programmatically in your module's etc/di.xml:

<type name="Jscriptz\Checkout\ViewModel\CustomFields">
    <arguments>
        <argument name="billingAddressFields" xsi:type="array">
            <item name="my_field" xsi:type="array">
                <item name="type" xsi:type="string">text</item>
                <item name="label" xsi:type="string">My Field</item>
                <item name="sortOrder" xsi:type="number">100</item>
            </item>
        </argument>
    </arguments>
</type>

GraphQL Mutations

Save Custom Fields

mutation {
  setJscriptzCheckoutFields(input: {
    cart_id: "masked_cart_id"
    fields: [
      { field_code: "my_field", value: "my_value" }
    ]
  }) {
    success
    message
  }
}

Track Analytics

mutation {
  trackCheckoutAnalytics(input: {
    session_token: "unique_token"
    event_type: "step_viewed"
    step_code: "shipping_address"
  }) {
    success
    session_token
  }
}

Email Template Variable

For custom email templates, add this variable to display custom fields:

{{var custom_checkout_fields_html|raw}}

CLI Commands

# Clear checkout-related caches
bin/magento cache:clean layout block_html full_page config

# Run setup after schema changes
bin/magento setup:upgrade

# Deploy static content
bin/magento setup:static-content:deploy -f

17. Troubleshooting

Common Issues

Issue Solution
Checkout not loading Clear all caches: bin/magento cache:flush
Custom fields not showing Verify field is enabled and assigned to a step in Builder
Styles not updating Rebuild Tailwind CSS: cd view/frontend/tailwind && npm run build
GraphQL errors Check Magento logs: var/log/graphql/debug.log
Payment not working Verify payment method credentials and test in developer mode
Cache Clearing: After any configuration change, always clear relevant caches. For layout/template changes: bin/magento cache:clean layout block_html full_page

18. Quick Reference

Admin Menu Locations

Section Path
Configuration Stores → Configuration → JSCRIPTZ → Jscriptz Checkout
Checkout Fields Stores → Jscriptz Checkout → Checkout Fields
Order Bumps Stores → Jscriptz Checkout → Order Bumps
Checkout Builder Stores → Jscriptz Checkout → Checkout Builder
Analytics Stores → Jscriptz Checkout → Analytics
A/B Tests Stores → Jscriptz Checkout → A/B Tests

Field Types Reference

Type Description Has Options
textSingle-line text inputNo
emailEmail input with validationNo
textareaMulti-line text inputNo
telTelephone number inputNo
numberNumeric inputNo
selectDropdown selectionYes
multiselectMultiple selectionYes
radioRadio button groupYes
checkboxSingle checkboxNo
yesnoYes/No toggleNo
dateDate pickerNo
timeTime pickerNo
fileFile uploadNo
htmlStatic HTML contentNo
headingHeading textNo
paragraphParagraph textNo

Database Tables

Table Purpose
jscriptz_checkout_stepStep definitions
jscriptz_checkout_fieldCustom field definitions
jscriptz_checkout_field_optionField options (select/radio)
jscriptz_checkout_field_valueStored field values
jscriptz_checkout_layoutLayout configuration
jscriptz_checkout_templateSaved templates
jscriptz_checkout_analytics_sessionSession tracking
jscriptz_checkout_analytics_eventEvent tracking
jscriptz_checkout_ab_testA/B test configuration