Class DefaultAddToCartStrategy

    • Constructor Detail

      • DefaultAddToCartStrategy

        public DefaultAddToCartStrategy()
    • Method Detail

      • getAllowedCartAdjustmentForProduct

        protected long getAllowedCartAdjustmentForProduct​(CartModel cartModel,
                                                          ProductModel productModel,
                                                          long quantityToAdd,
                                                          PointOfServiceModel pointOfServiceModel)
        Description copied from class: AbstractCommerceCartStrategy
        Work out the allowed quantity adjustment for a product in the cart given a requested quantity change.
        Overrides:
        getAllowedCartAdjustmentForProduct in class AbstractCommerceCartStrategy
        Parameters:
        cartModel - the cart
        productModel - the product in the cart
        quantityToAdd - the amount to increase the quantity of the product in the cart, may be negative if the request is to reduce the quantity
        pointOfServiceModel - the PointOfService to check stock at, can be null
        Returns:
        the allowed adjustment