You can create unique shopping experiences that fit the look and feel of a store’s brand using custom checkouts. This article outlines how to package a custom checkout file and install a custom checkout using the control panel.
This article will address using both Open Source Checkout and Checkout SDK powered checkouts.
Custom checkouts must have a single JS loader file. The first step to using a custom checkout is generating this file. The loader file is responsible for the following:
If you wish to customize the style sheets, enter your CSS into the optimized-checkout.scss in Cornerstone or the scss folder in checkout.js. We suggest moving content from “optimized-checkout.scss” to the scss folder or vice versa to ensure a single source of truth for handling styles.
Note: “optimized-checkout.scss” will always override the CSS rules defined in checkout-js.
In order to build from the source code, you must have the following set up in your development environment.
If using Open Source Checkout, you can generate the loader file by following these steps:
If you are developing the application locally, you can build the source code in watch mode and test your checkout implementation.
http://127.0.0.1:8080/ to confirm the dev server is running. You should see content from the /build folder.auto-loader-dev.js in Checkout Settings > Custom Checkout > Script URL. (e.g., http://127.0.0.1:8080/auto-loader-dev.js)This creates a /dist folder that contains the loader file (e.g., auto-loader-1.564.0.js). You will then need to host the /dist folder and enter the URL to the loader file in Checkout Settings > Custom Checkout > Script URL.
If you need to make your custom checkout PCI 4.0 compliant, follow the steps outlined in the PCI-specific setup guide.
You’ll need to host the custom checkout file online so the store can serve it. You can use a hosting service, such as Amazon S3. Using an external host gives you the freedom to automate the build process if you wish and push updates automatically from your local machine. Or you can host it on your store using WebDAV.
The steps to host a custom checkout on BigCommerce are below: