Customizing the Minicart rendering
The Minicart rendering includes a rendering variant in the form of a Scriban template. The Minicart rendering has its own default rendering variant root and default rendering variant (/sitecore/Content/<tenant>/<site>/Presentation/Rendering Variants/Minicart), which uses a Scriban template for generating the markup. Although you can modify the Scriban template, it is best to create a new custom rendering variant in this case so that the customization does not get overridden during software upgrades. You can also change the labels for the rendering.
The Minicart - deprecated rendering is only available for existing sites and is based on a MVC view instead of a Scriban template in a rendering variant.
The following code shows the Scriban template for the Minicart rendering defined within the default rendering variant.
To improve performance, you can disable the minicart count cache as well as recalculation of the minicart.
Minicart rendering model
Minicart rendering model
In the Scriban template for the Minicart rendering, you access the properties and objects contained in the MinicartRenderingModel model as shown in the following diagram.
Minicart call sequence
Minicart call sequence
The following sequence diagram shows a high-level view of the calls made when the shopper interacts with the minicart.
