Customize Checkout
This documentation shows how to customize the Checkout package for Umbraco Commerce.
It is assumed that you already have an Umbraco website configured Umbraco Commerce installed and a store set up. If you are not at this stage yet, read the core Umbraco Commerce documentation to learn how to get started.
Umbraco Commerce Checkout is a free and open-source add-on package for Umbraco Commerce. It is possible to amend the default behavior to customize the checkout to your needs.
Overriding the checkout Views
To customize one, add your copy to the same path under Views/UmbracoCommerceCheckout. Ensure your site compiles Views at build time so your copy is used instead of the packaged one.
New Umbraco projects (17+) are set up for backoffice development, which disables build-time View compilation:
<RazorCompileOnBuild>false</RazorCompileOnBuild>
<RazorCompileOnPublish>false</RazorCompileOnPublish>While this is set, Views you add under Views/UmbracoCommerceCheckout are ignored and your changes will not appear. To enable overrides:
Switch Models Builder to a source-code mode (
SourceCodeAutoorSourceCodeManual) and generate your models. Build-time compilation is not compatible with the defaultInMemoryAutomode - see Models Builder settings.Remove the
RazorCompileOnBuildandRazorCompileOnPublishlines above (or set them totrue).
This matches the configuration Umbraco requires for Production runtime mode.
Once your site compiles Views at build time, override a checkout step as follows:
Copy the equivalent files and partials.
Add them to
Views/UmbracoCommerceCheckoutin your project directory. It might be necessary to create the folder first.Make your changes.
Rebuild and restart your site, then verify that the change is displayed correctly.
Alternative: use a Template
Instead of overriding the Views, you can assign a Template to the checkout page in the backoffice and place your markup there. Checkout will use the Template instead of its built-in View.
With this approach, the Template receives the checkout page's IPublishedContent as its model—not the packaged Views' view model.
You then build that step's markup yourself against the Umbraco Commerce APIs.
Useful links
Here are a few useful links to learn more about the Umbraco Commerce Checkout package:
Last updated
Was this helpful?