Class CommerceConfigAddToCartStrategy

  • All Implemented Interfaces:
    CommerceAddToCartStrategy

    public class CommerceConfigAddToCartStrategy
    extends ProductConfigAddToCartStrategy
    DefaultAddToCartStrategy is being overriden by ProductConfigAddToCartStrategy and this class makes sure that the functionality offered by both classes do not get lost.
    • Constructor Detail

      • CommerceConfigAddToCartStrategy

        public CommerceConfigAddToCartStrategy()
    • 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
      • isSyncOrdermgmtEnabled

        protected boolean isSyncOrdermgmtEnabled()