The Checkout UI Settings app is responsible for customizing your store's Checkout UI through scripts.
See the Vtex documentarion or the repository provided by Vtex for more info.
This template uses Webpack to automate the development experience. In conjunction with the Vtex toolbelt, this provides a more seamless experience for the developer.
Modify the files:
src/checkout6-custom.jssrc/checkout-instore-custom.jssrc/checkout-confirmation-custom.js
to add custom scripts to the checkout template.
And modify the files:
src/checkout6-custom.scsssrc/checkout-instore-custom.scsssrc/checkout-confirmation-custom.scss
to customize the appereance of the checkout page using SASS to build CSS files.
Additionally, you can load .svg files to the scripts by using ES6-style imports
import MySvg from './route/to/svg/file.svg'
.
.
.
<div>
</MySvg>
</div>The code in this template emits two events especially for Vtex developers: reactReady and vtexjsReady. This way you dont have to write custom code everytime you have to wait for those libraries to finish loading. Just listen for the event $(window).on('vtexjsReady', function(){}) and code away!
- Using your terminal and the VTEX IO Toolbelt, log into the desired account;
- Run
yarn installornpm installif you prefer to use NPM. - The following scripts are available (execute
yarn run devornpm run dev, for example)dev: Run webpack in watch mode, compiling development versions of the source.build: Compile the source code into production-ready files.build:dev: Compile into development versionsdev:link: Run webpack in watch mode andvtex linkat the same time, updating the template everytime the source changes (you still have to refresh your browser)
You can modify the file webpack.config.js to add more file loaders or customizations to the template or the build process.
Once the app is deployed and installed in the account, every scripts contained in it will be automatically linked to your store and used to build the templates to customize your Checkout.