Class CampaignMgr
CampaignMgr provides static methods for managing campaign-specific operations
such as accessing promotions or updating promotion line items.
Deprecated:
Use PromotionMgr instead.
Property Summary
Property Description applicablePromotions : Collection (read-only)Returns the enabled promotions of active campaigns applicable for the current customer and source code.
Constructor Summary
This class does not have a constructor, so you cannot create it directly.
Method Summary
Methods inherited from class Object
assign , create , create , defineProperties , defineProperty , entries , freeze , fromEntries , getOwnPropertyDescriptor , getOwnPropertyNames , getOwnPropertySymbols , getPrototypeOf , hasOwnProperty , is , isExtensible , isFrozen , isPrototypeOf , isSealed , keys , preventExtensions , propertyIsEnumerable , seal , setPrototypeOf , toLocaleString , toString , valueOf , values
Property Details
applicablePromotions
applicablePromotions: Collection (read-only)
Returns the enabled promotions of active campaigns applicable for the
current customer and source code.
Note that this method does not return any coupon-based promotions.
Deprecated:
Use PromotionMgr.getActiveCustomerPromotions() and
PromotionPlan.getPromotions()
Method Details
applyBonusPromotions(LineItemCtnr, Collection)
static applyBonusPromotions(lineItemCtnr: LineItemCtnr , promotions: Collection ): Boolean
This method has been deprecated and should not be used anymore.
Instead, use PromotionMgr to apply promotions to
line item containers.
The method does nothing, since bonus promotions are applied as product
or order promotions using methods
applyProductPromotions(LineItemCtnr, Collection) and
applyOrderPromotions(LineItemCtnr, Collection) .
The method returns 'true' if any the line item container contains
any bonus product line items, and otherwise false.
Parameters:
lineItemCtnr - Basket or order
promotions - Parameter not used, can be null
Returns:
True if line item container contains bonus product line items, else false
Deprecated:
Use PromotionMgr instead.
applyOrderPromotions(LineItemCtnr, Collection)
static applyOrderPromotions(lineItemCtnr: LineItemCtnr , promotions: Collection ): Boolean
Applies the applicable order promotions in the specified collection to the
specified line item container.
This method has been deprecated and should not be used anymore.
Instead, use PromotionMgr to apply promotions to
line item containers.
Note that the method does also apply any bonus discounts defined
as order promotions (see also applyBonusPromotions(LineItemCtnr, Collection) ).
Parameters:
lineItemCtnr - basket or order
promotions - list of all promotions to be applied
Returns:
true if changes were made to the line item container, false otherwise.
Deprecated:
Use PromotionMgr
applyProductPromotions(LineItemCtnr, Collection)
static applyProductPromotions(lineItemCtnr: LineItemCtnr , promotions: Collection ): Boolean
Applies all applicable product promotions in the specified collection to the
specified line item container.
This method has been deprecated and should not be used anymore.
Instead, use PromotionMgr to apply promotions to
line item containers.
Note that the method does also apply any bonus discounts defined
as product promotions (see also applyBonusPromotions(LineItemCtnr, Collection) ).
Parameters:
lineItemCtnr - basket or order
promotions - list of all promotions to be applied
Returns:
true if changes were made to the line item container, false otherwise.
Deprecated:
Use PromotionMgr
applyShippingPromotions(LineItemCtnr, Collection)
static applyShippingPromotions(lineItemCtnr: LineItemCtnr , promotions: Collection ): Boolean
Applies all applicable shipping promotions in the specified collection to
the specified line item container.
This method has been deprecated and should not be used anymore.
Instead, use PromotionMgr to apply promotions to
line item containers.
Parameters:
lineItemCtnr - basket or order
promotions - list of all promotions to be applied
Returns:
true if changes were made to the line item container, false otherwise.
Deprecated:
Use PromotionMgr
getApplicableConditionalPromotions(Product)
static getApplicableConditionalPromotions(product: Product ): Collection
Returns the enabled promotions of active campaigns applicable for the
current customer and source code for which the specified product
is a qualifiying product.
As a replacement of this deprecated method, use
PromotionMgr.getActiveCustomerPromotions() and
PromotionPlan.getProductPromotions(Product) .
Unlike getApplicableConditionalPromotions(Product) ,
PromotionPlan.getProductPromotions(Product)
returns all promotions related to the specified product, regardless
of whether the product is qualifying, discounted, or both, and
also returns promotions where the product is a bonus product.
Parameters:
product - Qualifying product
Returns:
List of active promotions
Deprecated:
Use PromotionMgr.getActiveCustomerPromotions() and
PromotionPlan.getProductPromotions(Product)
getApplicablePromotions()
static getApplicablePromotions(): Collection
Returns the enabled promotions of active campaigns applicable for the
current customer and source code.
Note that this method does not return any coupon-based promotions.
Returns:
List of active promotions
Deprecated:
Use PromotionMgr.getActiveCustomerPromotions() and
PromotionPlan.getPromotions()
getApplicablePromotions(Product)
static getApplicablePromotions(product: Product ): Collection
Returns the enabled promotions of active campaigns applicable for the
current customer and source code for which the specified product is
a discounted product.
Note that this method does not return any coupon-based promotions.
As a replacement of this deprecated method, use
PromotionMgr.getActiveCustomerPromotions() and
PromotionPlan.getProductPromotions(Product) .
Unlike getApplicablePromotions(Product) ,
PromotionPlan.getProductPromotions(Product)
returns all promotions related to the specified product, regardless
of whether the product is qualifying, discounted, or both, and
also returns promotions where the product is a bonus product.
Parameters:
product - The product whose promotions are returned.
Returns:
Deprecated:
Use PromotionMgr.getActiveCustomerPromotions() and
PromotionPlan.getProductPromotions(Product)
getApplicablePromotions(LineItemCtnr)
static getApplicablePromotions(lineItemCtnr: LineItemCtnr ): Collection
Returns the enabled promotions of active campaigns applicable for the
current customer, source code and any coupon contained in the specified
line item container.
Note that although the method has been deprecated, no replacement
method is provided.
Parameters:
lineItemCtnr - the basket or order
Returns:
list of all applicable promotion for the given basket or order
Deprecated:
There is no replacement for this method.
getCampaignByID(String)
static getCampaignByID(id: String ): Campaign
Returns the campaign identified by the specified ID.
Parameters:
Returns:
Campaign or null if not found
Deprecated:
Use PromotionMgr.getCampaign(String)
getConditionalPromotions(Product)
static getConditionalPromotions(product: Product ): Collection
Returns the enabled promotions of active campaigns for which the
specified product is a qualifiying product.
Note that the method also returns coupon-based promotions.
As a replacement of this deprecated method, use
PromotionMgr.getActiveCustomerPromotions() and
PromotionPlan.getProductPromotions(Product) .
Unlike getConditionalPromotions(Product) ,
PromotionPlan.getProductPromotions(Product)
returns all promotions related to the specified product, regardless
of whether the product is qualifying, discounted, or both, and
also returns promotions where the product is a bonus product.
Parameters:
product - The product whose conditional promotions are returned.
Returns:
Deprecated:
Use PromotionMgr.getActivePromotions() and
PromotionPlan.getProductPromotions(Product)
getPromotion(String)
static getPromotion(couponCode: String ): Promotion
Returns the promotion associated with the specified coupon code.
Parameters:
couponCode - The coupon code used to lookup the promotion
Returns:
The resolved promotion object or null if none was found
Deprecated:
Coupons are now related to multiple promotions. Method
returns the first promotion associated with the coupon
code in case of multiple assigned promotions.
getPromotionByCouponCode(String)
static getPromotionByCouponCode(couponCode: String ): Promotion
Returns the promotion associated with the specified coupon code.
Parameters:
Returns:
The associated promotion or null
Deprecated:
Coupons are now related to multiple promotions. Method
returns the first promotion associated with the coupon
in case of multiple assigned promotions
getPromotionByID(String)
static getPromotionByID(id: String ): Promotion
Returns the promotion identified by the specified ID.
Parameters:
Returns:
Promotion or null if not found
Deprecated:
Use PromotionMgr.getPromotion(String)
getPromotions(Product)
static getPromotions(product: Product ): Collection
Returns the enabled promotions of active campaigns for which the
specified product is a discounted product.
Note that method does only return promotions based on customer groups
or source codes.
As a replacement of this deprecated method, use
PromotionMgr.getActiveCustomerPromotions() and
PromotionPlan.getProductPromotions(Product) .
Unlike getPromotions(Product) ,
PromotionPlan.getProductPromotions(Product)
returns all promotions related to the specified product, regardless
of whether the product is qualifying, discounted, or both, and
also returns promotions where the product is a bonus product.
Parameters:
product - Discounted product
Returns:
Deprecated:
Use PromotionMgr.getActivePromotions() and
PromotionPlan.getProductPromotions(Product)