Interface AddToCartStrategy
-
- All Known Implementing Classes:
DefaultAddToCartStrategy
@Deprecated public interface AddToCartStrategy
Deprecated.since agesThe product add to cart strategy.- Spring Bean ID:
- addToCartStrategy
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description void
addToCart(CartModel cart, ProductModel product, long quantity, UnitModel unit)
Deprecated.Adds to the (existing)CartModel
the (existing)ProductModel
in the givenUnitModel
and with the givenquantity
.
-
-
-
Method Detail
-
addToCart
void addToCart(CartModel cart, ProductModel product, long quantity, UnitModel unit) throws InvalidCartException
Deprecated.Adds to the (existing)CartModel
the (existing)ProductModel
in the givenUnitModel
and with the givenquantity
. If in the cart already an entry with the given product and given unit exists the givenquantity
is added to the the quantity of this cart entry.- Parameters:
cart
- the cart, must existproduct
- the product which is added to the cartquantity
- the quantity of the productunit
- ifnull
ProductService.getOrderableUnit(ProductModel)
is used to determine the unit- Throws:
InvalidCartException
- if theproduct
is a base product OR the quantity is less 1 or no usable unit was found (only when givenunit
is alsonull
)
-
-