Drupal is a registered trademark of Dries Buytaert
Views Bootstrap 5.5.2 Minor update available for module views_bootstrap (5.5.2). oEmbed Providers 3.0.0 Major update available for module oembed_providers (3.0.0). Emulsify Tools 2.2.0 Minor update available for module emulsify_tools (2.2.0). amazee.ai Private AI Provider 1.3.4 Minor update available for module ai_provider_amazeeio (1.3.4). highlight.js Input Filter 2.0.0 Major update available for module highlightjs_input_filter (2.0.0). Webform QR Code Element 1.4.0 Minor update available for module webform_qr_code_element (1.4.0). Comments Order 4.0.0 Major update available for module comments_order (4.0.0). Comments Order 3.0.4 Minor update available for module comments_order (3.0.4). oEmbed Providers 2.2.4 Module oembed_providers updated after 7 months of inactivity (2.2.4). Provus Mega Menu Module provus_mega_menu crossed 1,000 active installs.

This module provides a service to retrieve entities associated with a promotion. It allows developers to query for specific types of entities that a promotion applies to. This functionality can be integrated into offer type plugins by implementing a specific interface.

Provides a service to give you the entities that are affected by a promotion.

If your offer type supports it, you can do stuff like this:

/** @var \Drupal\affected_by_promotion\AffectedEntitiesManager $mng */
$mng = \Drupal::service('affected_by_promotion.affected_entities_manager');
/** @var \Drupal\Core\Database\Query\SelectInterface $q */
$q = $mng->getAffectedEntitiesQuery($promotion, 'commerce_product');
$products = $q->execute();

For your offer type plugin to support it, it has to implement the following interface:

\Drupal\affected_by_promotion\SupportsAffectedEntitiesQueryInterface

Which has the following method:

public function getAffectedEntitiesQuery($entity_type_id);

There is also an issue to get this into commerce: https://www.drupal.org/project/commerce/issues/3007070

Activity

Total releases
1
First release
Mar 2026
Latest release
4 months ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Active

Releases

Version Type Release date
8.x-1.5 Stable Mar 19, 2026