diff --git a/docs/docs/guides/core-concepts/promotions/index.md b/docs/docs/guides/core-concepts/promotions/index.md index 75804e4d15..61055e8b0b 100644 --- a/docs/docs/guides/core-concepts/promotions/index.md +++ b/docs/docs/guides/core-concepts/promotions/index.md @@ -268,6 +268,8 @@ For example, if we want to set up a "buy 1, get 1 free" offer, we need to: In this scenario, we would have to repeat the logic for checking the Order contents in _both_ the PromotionCondition _and_ the PromotionAction. Not only is this duplicated work for the server, it also means that setting up the promotion relies on the same parameters being input into the PromotionCondition and the PromotionAction. +Note the use of `PromotionItemAction` to get a reference to the `OrderLine` as opposed to the `Order`. + Instead, we can say that the PromotionAction _depends_ on the PromotionCondition: ```ts @@ -280,7 +282,7 @@ export const buy1Get1FreeAction = new PromotionItemAction({ args: {}, // highlight-next-line conditions: [buyXGetYFreeCondition], - execute(ctx, orderItem, orderLine, args, state) { + execute(ctx, orderLine, args, state) { // highlight-next-line const freeItemIds = state.buy_x_get_y_free.freeItemIds; if (idsContainsItem(freeItemIds, orderItem)) {