Build a checkout extension
This tutorial builds a checkout extension end to end — scaffold, develop, push a version, then activate it. checkout is an alias for checkout-extension.
Prerequisites
- Shoplazza CLI installed — see Install
- Authenticated — see Authentication
1. Scaffold the project
init creates a project directory with a first extension (local, no network):
shoplazza checkout init --name my-project --extension my-ext
cd my-project
To add more extensions later, run shoplazza checkout create --name another-ext inside the project.
2. Develop with live reload
Start the dev server (rebuild + HMR on port 8888):
shoplazza checkout dev --extension-name my-ext
Develop several at once with --extension-name ext1,ext2, or all of them with --all.
3. Build
shoplazza checkout build --name my-ext
4. Push a version
push builds and uploads a new version but does not activate it:
shoplazza checkout push --name my-ext
Optionally set the version explicitly (it must be greater than the last pushed version):
shoplazza checkout push --name my-ext --version 1.1
5. Activate it
Find the server-side extension id and its versions:
shoplazza checkout list --all
shoplazza checkout versions --extension-id abc123
Then activate the version with deploy:
shoplazza checkout deploy --extension-id abc123 --version 1.1
Add --dry-run to deploy, undeploy, preview, and versions to print the request without sending it.
6. Preview
Generate a shareable preview URL for a version:
shoplazza checkout preview --extension-id abc123 --version 1.1