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)
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | commerce-add-query-tag-3395266-10.patch | 639 bytes | andrewsizz |
| #2 | 3395266-2.patch | 545 bytes | valic |
Issue fork commerce-3395266
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
Comment #2
valicAttaching initial patch
Comment #3
valicComment #4
rszrama commentedComment #5
jsacksick commentedMaybe 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.
Comment #6
jsacksick commentedComment #9
sourabhjain@jsacksick could you please review the updated changes and created MR too.
Comment #10
andrewsizz commentedUpdate patch to 8.x-2.39
Comment #11
jsacksick commentedI think "commerce_promotion_available" makes the most sense, so will merge the MR.
Comment #13
jsacksick commented