Do Shopify discount functions override the result?
Can’t they work together?
For example, if I have two discount functions one results in
"operations": [
{
"productDiscountsAdd": {
"candidates": [
{
"message": "Discount A - 10% OFF",
"targets": [
{
"cartLine": {
"id": "gid://shopify/CartLine/1",
"quantity": 1
}
},
{
"cartLine": {
"id": "gid://shopify/CartLine/0",
"quantity": 1
}
}
],
"value": {
"percentage": {
"value": 10
}
}
}
],
"selectionStrategy": "ALL"
}
}
]
and the other one results in
"operations": [
{
"productDiscountsAdd": {
"candidates": [
{
"message": "Discount B - 7% OFF",
"targets": [
{
"cartLine": {
"id": "gid://shopify/CartLine/3",
"quantity": 1
}
}
],
"value": {
"percentage": {
"value": 7
}
}
}
],
"selectionStrategy": "ALL"
}
}
]
Only one of them gets applied.