Skip to content

Commit

Permalink
fix(core): Filter Promotions on Channel before applying to Order
Browse files Browse the repository at this point in the history
  • Loading branch information
hendrik-advantitge committed Mar 11, 2021
1 parent 7cc7222 commit 0cb29e5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/core/src/service/services/order.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1345,9 +1345,9 @@ export class OrderService {
item.listPriceIncludesTax = priceResult.priceIncludesTax;
}
}
const promotions = await this.connection.getRepository(ctx, Promotion).find({
where: { enabled: true, deletedAt: null },
order: { priorityScore: 'ASC' },
const { items: promotions } = await this.promotionService.findAll(ctx, {
filter: { enabled: { eq: true } },
sort: { priorityScore: 'ASC' },
});
const updatedItems = await this.orderCalculator.applyPriceAdjustments(
ctx,
Expand Down

0 comments on commit 0cb29e5

Please sign in to comment.