Introduction
The module’s integration allows you to group several products in bundles. The grouping is based on the entered criteria.
Development
Core
Entity Definitions
The BundleableAbstractOrderEntryEntityDefinition extends the CartEntryEntityDefinition. The CartEntryEntityDefinition
, in its turn, goes further to the AbstractEntityDefinition and the AbstractPurchasableEntityDefinition:

The defined here bundleTemplate property (and its getter/setter pair) lets you associate the abstract order with the respective template.
The BundlePriceEntityDefinition extends the AbstractEntityDefinition and the AbstractCatalogableEntityDefinition:

Via the respective getter-setter pairs, the following information can be retrieved/stored in the database:
Property | Description |
---|---|
products |
stores a list of products the bundle price is applicable to |
prices |
stores a set of prices, included in the bundle price |
leasingPayments |
stores a set of the leasing payment values, included in the bundle price |
The BundleSelectionCriteriaEntityDefinition extends the AbstractEntityDefinition:

The BundleSelectionEntityDefinition extends the AbstractEntityDefinition and the AbstractCatalogableEntityDefinition:

Via the respective getter-setter pairs, the following information can be retrieved/stored in the database:
Property | Description |
---|---|
bundleTemplate |
stores the bundle template the bundle selection is associated with |
categories |
stores a set of categories, the respective promotion is applicable to |
products |
stores a set of products, the respective promotion is applicable to |
The BundleTemplateEntityDefinition extends the AbstractCatalogableEntityDefinition:

Via the respective getter-setter pairs, the following information can be retrieved/stored in the database:
Property | Description |
---|---|
bundleSelections |
stores a set of the selections, the template is for |
selectionCriteria |
stores the bundle selection criteria for the particular bundle template |
The FixedNumberBundleSelectionCriteriaEntityDefinition adds extra properties to the BundleSelectionCriteriaEntityDefinition and, respectively, the AbstractEntityDefinition:

The extra added property is an Integer
one - quantity. It stores information for the quantity of the bundle selection criteria.
The RangeBundleSelectionCriteriaEntityDefinition adds extra properties to the BundleSelectionCriteriaEntityDefinition and, respectively, the AbstractEntityDefinition:

Via the respective getter-setter pairs, the following information can be retrieved/stored in the database:
Property | Description |
---|---|
lowerBoundQuantity |
stores the minimum bound quantity for the bundle selection criteria |
higherBoundQuantity |
stores the maximum bound quantity for the bundle selection criteria |
Spring Data JPA Repositories
The BundlePriceRepository extends the BaseCatalogableEntityRepository. This is the corresponding Spring
Data JPA repository for the BundlePriceEntityDefinition
:

The BundleSelectionCriteriaRepository extends the
BaseEntityRepository. This is the corresponding Spring Data JPA
repository for the BundleSelectionCriteriaEntityDefinition
:

The BundleSelectionRepository extends the BaseCatalogableEntityRepository. This is the corresponding Spring
Data JPA repository for the BundleSelectionEntityDefinition
:

The BundleTemplateRepository extends the BaseCatalogableEntityRepository. This is the corresponding Spring
Data JPA repository for the BundleTemplateEntityDefinition
:

Business Services
The BundleCartService inherits the features of the CartService and the AbstractOrderService

Among the helper functionalities, defined within the BundlePriceService, are:
Description | Method |
---|---|
to retrieve the price in the chosen current currency for the bundle |
getPriceForBundleProducts() |
to retrieve the leasing payments in the chosen current currency for the bundle |
getLeasingPaymentsForBundleProducts() |
Among the helper functionalities, defined within the BundleService, are:
Description | Method |
---|---|
to retrieve all products from all categories in the given bundle |
getProductsInBundleSelection() |
to retrieve information if a product is contained in any of the categories of a given bundle |
isProductInBundleSelection() |
Facade
MapperFactoryConfigurers
Тhe BundleCartEntryMapperFactoryConfigurer implements the MapperFactoryConfigurer, converting the BundleableAbstractOrderEntryEntityDefinition
to OrderEntryBundleDtoDefinition
:

The conversion is customized.
More about the mapping configurations you may read in the respective Orika guide.
Dto definitions
The BundleOrderEntryDtoDefinition extends the OrderEntryDtoDefinition and the OrderEntryBundleDtoDefinition:

The BundleProductDtoDefinition extends the ProductBasicDtoDefinition and the ProductPriceDtoDefinition:

The OrderEntryBundleDtoDefinition is the corresponding Dto object for the BundleableAbstractOrderEntryEntityDefinition
.
Facades
The BundleCartFacade extends the CartFacade:

The facade provides you with one more extra functionality - to add the opted product bundle to your cart.
The BundleProductFacade provides you with one more extra functionality - to retrieve a list of all bundles, where the product, specified by its product code, is included.