I have created Discount A (10%) targetting all products. I have 2 products in cart, so I should be getting 10% discount for both the products. But I am only getting the discount applied on the first product. See the function log :
{
"operations": [
{
"productDiscountsAdd": {
"candidates": [
{
"message": "Prod F 10%",
"targets": [
{
"cartLine": {
"id": "gid:\/\/shopify\/CartLine\/0"
}
}
],
"value": {
"percentage": {
"value": 10
}
}
},
{
"message": "Prod F 10%",
"targets": [
{
"cartLine": {
"id": "gid:\/\/shopify\/CartLine\/1"
}
}
],
"value": {
"percentage": {
"value": 10
}
}
}
],
"selectionStrategy": "FIRST"
}
}
]
}
You might suggest me to add both the cartlines to the first candidate. It will work but consider the following case :
Discount A (10%) is there targetting Product X and Discount B (15%) targets Product Y both with FIRST strategy. So according to Shopify, it should apply the First Eligible discount to each cart line. So X should get 10% and Y should get 15% respectively.
But now , only the first discount is (Prof F 10%) getting applied and only to the first candidate(cartline 0 ).
{
"operations": [
{
"productDiscountsAdd": {
"candidates": [
{
"message": "Prod F 10%",
"targets": [
{
"cartLine": {
"id": "gid:\/\/shopify\/CartLine\/0"
}
}
],
"value": {
"percentage": {
"value": 10
}
}
},
{
"message": "Prod F 15%",
"targets": [
{
"cartLine": {
"id": "gid:\/\/shopify\/CartLine\/1"
}
}
],
"value": {
"percentage": {
"value": 15
}
}
}
],
"selectionStrategy": "FIRST"
}
}
]
}
What should I do ?