Interface BundleCartFacade
- All Known Implementing Classes:
DefaultBundleCommerceCartFacade
public interface BundleCartFacade
Bundle Cart facade interface. Service is responsible for getting and updating all necessary information for a bundle
cart.
-
Method Summary
Modifier and TypeMethodDescriptionAdd a product to an existing bundle.getAllowedProducts(Integer groupNumber, String searchQuery, PageableData pageableData) Constructs pageable list of products available for entry group of typeGroupType.CONFIGURABLEBUNDLEstartBundle(String bundleTemplateId, String productCode, long quantity) Start new bundle in cart based on the given bundle template and add the product to it.
-
Method Details
-
startBundle
CartModificationData startBundle(@Nonnull String bundleTemplateId, @Nonnull String productCode, long quantity) throws CommerceCartModificationException Start new bundle in cart based on the given bundle template and add the product to it.- Parameters:
bundleTemplateId- a component to add the product to. He whole bundle structure - starting from the root of the component - will be added to cart groupsproductCode- a product which will be added to the componentquantity- quantity for the product. Is limited by selection criteria of the component- Returns:
- information about the new cart entry
- Throws:
CommerceCartModificationException- if the operation is not possible- See Also:
-
addToCart
CartModificationData addToCart(@Nonnull String productCode, long quantity, int groupNumber) throws CommerceCartModificationException Add a product to an existing bundle.- Parameters:
productCode- product to addquantity- quantity of the productgroupNumber- entry group number, that defines the bundle and the component within the bundle- Returns:
- information about the new cart entry
- Throws:
CommerceCartModificationException- if the operation is not possible- See Also:
-
getAllowedProducts
@Nonnull ProductSearchPageData<SearchStateData,ProductData> getAllowedProducts(@Nonnull Integer groupNumber, String searchQuery, @Nonnull PageableData pageableData) Constructs pageable list of products available for entry group of typeGroupType.CONFIGURABLEBUNDLE- Parameters:
groupNumber- entry group number related to the componentsearchQuery- the search querypageableData- the page to return- Returns:
- the search results
- Throws:
IllegalArgumentException- if group is not found or group type is notGroupType.CONFIGURABLEBUNDLE
-