feat: allow product selection on discounts allocated to a specific item (#395)

This commit is contained in:
Sebastian Mateos Nicolajsen
2021-10-11 13:46:32 +02:00
committed by GitHub
parent 3d891c9b4f
commit 84d4d791ea
25 changed files with 138 additions and 25 deletions
@@ -320,6 +320,8 @@ class SendGridService extends NotificationService {
"billing_address",
"shipping_address",
"discounts",
"discounts.rule",
"discounts.rule.valid_for",
"shipping_methods",
"shipping_methods.shipping_option",
"payments",
@@ -363,6 +365,8 @@ class SendGridService extends NotificationService {
"billing_address",
"shipping_address",
"discounts",
"discounts.rule",
"discounts.rule.valid_for",
"shipping_methods",
"shipping_methods.shipping_option",
"payments",
@@ -496,6 +500,8 @@ class SendGridService extends NotificationService {
relations: [
"items",
"discounts",
"discounts.rule",
"discounts.rule.valid_for",
"shipping_address",
"returns",
"swaps",
@@ -601,6 +607,8 @@ class SendGridService extends NotificationService {
relations: [
"items",
"discounts",
"discounts.rule",
"discounts.rule.valid_for",
"shipping_address",
"swaps",
"swaps.additional_items",
@@ -686,7 +694,14 @@ class SendGridService extends NotificationService {
})
const order = await this.orderService_.retrieve(swap.order_id, {
relations: ["items", "discounts", "swaps", "swaps.additional_items"],
relations: [
"items",
"discounts",
"discounts.rule",
"discounts.rule.valid_for",
"swaps",
"swaps.additional_items",
],
})
let merged = [...order.items]