HomeDev GuideAPI Reference
Dev GuideAPI ReferenceUser GuideGitHubNuGetDev CommunityDoc feedbackLog In
GitHubNuGetDev CommunityDoc feedback


Hiding promotions can be useful in scenarios where you want to prevent merchandisers and marketers from creating new discounts of specific types.

Components mentioned here are available in the EPiServer.Commerce.Marketing namespace.

To hide promotions, use the PromotionTypeHandler class.

  • `DisablePromotions` – Disable promotion types. This setting will prevent these promotions to appear when editing discounts.

  • `EnablePromotions` – Enable promotion types.

  • `DisableBuiltinPromotions` – Disable all built-in promotion types. If this is set, only custom promotions appear in the user interface.

  • `GetAllPromotionTypes` – Get all of your site's promotion types.

### Examples

Disable the `BuyQuantityGetFreeItems` promotion.



Re-enable that promotion.



Disable all built-in promotion types when a site is initialized.