Introduction

Business

Development

Core

Entity Definitions

asciidoctor diagram MiniCartWidgetEntityDefinition

The defined here property is shownProductCount. It is designed to store the number of products that are shown in the minicart.

Spring Data JPA Repositories

MiniCartWidgetRepository

The MiniCartWidgetRepository extends the ActivatableRepository and the BaseEntityRepository:

asciidoctor diagram MiniCartWidgetRepository

This is the corresponding Spring Data JPA repository for the MiniCartWidgetEntityDefinition.

Facade

MapperFactoryConfigurers

MiniCartWidgetMapperFactoryConfigurer

The MiniCartWidgetMapperFactoryConfigurer implements the MapperFactoryConfigurer, converting the MiniCartWidgetEntityDefinition to MiniCartWidgetDtoDefinition:

asciidoctor diagram MiniCartWidgetMapperFactoryConfigurer

Dto definitions

MiniCartWidgetDtoDefinition

The MiniCartWidgetDtoDefinition extends the WidgetDtoDefinition, going further to the AbstractEntityDtoDefinition:

asciidoctor diagram MiniCartWidgetDtoDefinition

This is the corresponding Dto object for the MiniCartWidgetEntityDefinition.

Storefront

MiniCartWidgetRenderer

The MiniCartWidgetRenderer extends the AbstractWidgetRenderer:

asciidoctor diagram MiniCartWidgetRenderer

Some custom JavaScript files handle the appearance and behaviour of the minicart. They can be found at resources/META-INF/resources/resources/minicart/js/script.js

Integration

The integration with the Nemesis platform is pretty straight-forward - just need to add the widget in your classpath:

<dependency>
    <groupId>io.nemesis.platform.module.widget</groupId>
    <artifactId>nemesis-widget-minicart</artifactId>
</dependency>