Open Checkout Tutorial
In this tutorial, we’ll configure our development environment and make a code change to a fork of BigCommerce’s Checkout JS (also known as Optimized One-Page Checkout).
Prerequisites
- Developer sandbox
- Node v10 and later
- NPM v3 and later
- Unix-based OS (Linux or Mac OS X)
We recommend that Windows 10 users use Windows Subsystem for Linux.
Fork and install checkout-js
Fork and clone checkout-js; then, install dependencies.
Start development server
Start webpack in watch mode and launch dev server.
- Open your browser and navigate to
http://127.0.0.1:8080/to confirm the dev server is running (you should see content frombuild/). - To serve files over HTTPS, install an SSL on your development machine, or use ngrok.
Configure your sandbox
Next, configure your sandbox to use the files served up by your dev server.
- Login to your BigCommerce developer sandbox, and navigate to Advanced Settings > Checkout.
- Change Checkout Type to Custom Checkout.
- Under Custom Checkout Settings, copy and paste
http://127.0.0.1:8080/auto-loader-dev.jsinto Script URL. - Save.
Learn more about installing custom checkouts.
Make a code change
Make a code change and wait a few seconds for webpack to reload the dev server. For example, the code below adds a <div> to the Checkout component defined in src/app/checkout/Checkout.tsx.
Resources
Additional resources
- Fork a repo (docs.github.com)