Hey Shopify Team and community.
We have a shopify app which is live and public, and have a discount function in the app.
The problem is, that we are generating the output to set the 100% percentage discount on a specific line item, and when user updates the line item’s qty in cart from 1 to 2, or 3 or more, they get all of the qty discounted, not one.
I tested this multiple times and debugged the logs with different cases in the cart, and it always does the same.
Pasting screenshots of log and cart items here.
This is the func output
for this cart
{
"cart": {
"lines": [
{
"id": "gid:\/\/shopify\/CartLine\/0",
"quantity": 3,
"cost": {
"amountPerQuantity": {
"amount": "0.0"
}
}
},
{
"id": "gid:\/\/shopify\/CartLine\/1",
"quantity": 1,
"cost": {
"amountPerQuantity": {
"amount": "29.99"
}
}
},
{
"id": "gid:\/\/shopify\/CartLine\/2",
"quantity": 1,
"cost": {
"amountPerQuantity": {
"amount": "29.99"
}
}
}
]
}
}
