Add a way to load all promotions applied to an order

Created on 18 March 2020, almost 5 years ago
Updated 26 November 2024, about 1 month ago

I'm writing a custom integration with an external CRM and I need to get all promotions applied to the order.
I was looking into this, but I can't find a way to list all the promotions applied to a specific order.

In the order, I only see applied promotions with discount code.

Proposed solution:
Add a 'loadMultipleByOrder' function in the PromotionsUsage file (src/PromotionUsage.php).
This function should return all promotions applied to a specific order.

Maybe we need to return promotions and 'coupon-promotions' in a diffrent way, but we can think about how we do this I guess.
I'm not sure how commerce core handles this in other use cases.

Thanks for the feedback.

💬 Support request
Status

Active

Version

2.0

Component

Promotions

Created by

🇧🇪Belgium pietermouton

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024