PromotionPlan provides methods to access the promotions in the plan and to remove promotions from the plan. All methods which return a collection of promotions sort them by the following ordered criteria:
- Exclusivity: GLOBAL exclusive promotions first, followed by CLASS exclusive promotions, and NO exclusive promotions last.
- Rank: sorted ascending
- Promotion Class: PRODUCT promotions first, followed by ORDER promotions, and SHIPPING promotions last.
- Discount type: Fixed price promotions first, followed by free, amount-off, percentage-off, and bonus product promotions last.
- Best discount: Sorted descending. For example, 30% off comes before 20% off.
- ID: alphanumeric ascending.
This method is usually used to display order promotions along with payment card choices.
This method is usually used to display order promotions along with payment method choices.
The method returns all promotions where the product is either a qualifying product, or a discounted product, or both. It also returns promotions where the specified product is a bonus product.
This method is usually used to display product promotions on a product details page.
If a master product is passed, then this method will return promotions which are relevant for the master itself or at least one of its variants.
This method is usually used to display product promotions on a product details page when separate callout messages are defined depending on if the product is a qualifying or discounted product for the promotion.
If a master product is passed, then this method will return promotions for which the master product itself or at least one of its product's variants is a discounted product.
This method is usually used to display product promotions on a product details page when separate callout messages are defined depending on if the product is a qualifying or discounted product for the promotion.
If a master product is passed, then this method will return promotions for which the master product itself or at least one of its product's variants is a qualifying product.
The method returns all promotions where the product is either a qualifying product, or a discounted product, or both. It also returns promotions where the specified product is a bonus product.
This method is usually used to display product promotions on a product details page.
This method is usually used to display shipping promotions along with shipping methods.
Please note that this is the only way to remove promotions from the plan, i.e. removing promotions from the collections returned by methods such as getProductPromotions() has no effect on the promotion plan.