Development
Build and customize your checkout experience with Ollie’s flexible components and templates.
Before continuing, ensure the following:
- Node.js v22 or higher is installed
- Access to your store in Ollie Admin
Step 1: Install Ollie Shop:
Create a new project using the create-ollie-shop CLI tool:
Replace your-store with your desired folder name. This command scaffolds a new Ollie Checkout project.
Step 2: Enter Configuration Details:
During setup, you’ll be prompted to provide some values. You can find these in Ollie Admin:
- Store ID → Found on the Settings page
- VTEX Account Name → Same as Platform Store ID in Settings page
- Version ID → Found on the Versions page
These values are saved to ollie.json and can be updated later.
Example ollie.json Configuration
Additional Options
You can enhance the checkout behavior and appearance using optional ollie.json fields:
sessionId
: Inject an orderForm for debugging or previewing sessionsprops
: Add flags or props to customize layout, features, or logictheme
: Apply a custom theme to globally style your checkout
Step 3: Developing a Custom Component
You are free to use npm or yarn.
Install Previewjs
Preview.js works automatically with Ollie Shop projects created using create-ollie-shop
. It reads your project setup and starts without any extra configuration.
Using Preview.js
To use Preview.js in your Ollie Shop project:
- Open any component file in your project.
- Click the Preview.js icon in your editor, or use the corresponding keyboard shortcut.
- A live preview of the component will appear, updating in real time as you make changes.
This integration allows you to develop and test components without setting up a separate environment or manually configuring Preview.js.
Setting the Component ID
After launching the preview:
- Ensure the Component ID field is populated with the value from meta.json.
- If it’s empty, copy the ID from meta.json into the field and click the Update button.
Troubleshooting
Still stuck? Report an issue