Describe your bug or feature request.

Currently, promotions are available to filter in promotion Storage, but when already are all loaded. There are use cases where could be useful to filter them out earlier, during entity query, prior to loading.

I suggest that we tag that query so that we can target it more specifically and once hook_entity_query_alter lands back in the core, we can target it properly.
(the core issue https://www.drupal.org/node/3001496)

Issue fork commerce-3395266

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

valic created an issue. See original summary.

valic’s picture

StatusFileSize
new545 bytes

Attaching initial patch

valic’s picture

Issue summary: View changes
rszrama’s picture

Status: Active » Needs review
jsacksick’s picture

Maybe we should rename the tag to "commerce_promotion_available"? or "commerce_promotion_load_available", but the "load" might be unnecessary.
Other storage methods could be added at a future point making the "commerce_promotion_storage" ambiguous. Also the patch doesn't seem to apply for whatever reason.

jsacksick’s picture

Status: Needs review » Needs work

sourabhjain made their first commit to this issue’s fork.

sourabhjain’s picture

Status: Needs work » Needs review

@jsacksick could you please review the updated changes and created MR too.

andrewsizz’s picture

StatusFileSize
new639 bytes

Update patch to 8.x-2.39

jsacksick’s picture

I think "commerce_promotion_available" makes the most sense, so will merge the MR.

jsacksick’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.