I’m creating Shopify Order discount function for both subscription order and onetime order. When my cart has both subscription product and one time product, how can I target to cartline instead of productVariant, because one time product and subscription product has same productVariant.
{
discountApplicationStrategy: DiscountApplicationStrategy.First,
discounts: [
{
value: {
percentage: {
value: 10,
},
},
targets: [
{
// productVariant: {
// id: "gid://shopify/ProductVariant/43877796708534",
// quantity: 1,
// },
orderSubtotal: {
excludedVariantIds: ["gid://shopify/ProductVariant/43877796708534"],
},
},
],
conditions: [
{
orderMinimumSubtotal: {
excludedVariantIds: [],
minimumAmount: 100,
targetType: TargetType.OrderSubtotal,
},
},
],
},
],
};

