Hi team,
We are facing an issue while working with multiple discount codes in the Shopify Android Buy SDK / Storefront Cart API integration.
Currently, when cart warnings are returned after applying discount codes, the warning object does not contain any information about which specific discount code caused the warning.
This becomes a problem in multi-discount scenarios:
- Multiple discount codes can be applied to the cart
- One or more of them may become invalid/inapplicable
- The invalid discount code remains inside the cart discount codes list
- Warnings continue to be returned on every cart query/update
- However, since the warning is not linked to a specific discount code, we cannot determine which code should be removed from the cart
Additionally, the warning order is not stable:
- The warning for the last applied discount code is not always the first warning returned
- Because of this, matching warnings by index/order is unreliable
Example scenario:
- Apply multiple discount codes
- One discount becomes invalid due to cart conditions
- Cart returns warnings
- Warning does not indicate which discount code caused it
- Client cannot safely remove the invalid discount code
Would it be possible to include the related discount code inside the warning payload?
For example, something like:
{
"code": "DISCOUNT_NOT_FOUND",
"message": "Discount code is invalid",
"discountCode": "SUMMER10"
}
This would make it possible for clients to correctly identify and remove invalid discount codes in multi-discount flows.
Thanks!
Hi team,
We are facing an issue while working with multiple discount codes in the Shopify Android Buy SDK / Storefront Cart API integration.
Currently, when cart warnings are returned after applying discount codes, the warning object does not contain any information about which specific discount code caused the warning.
This becomes a problem in multi-discount scenarios:
Additionally, the warning order is not stable:
Example scenario:
Would it be possible to include the related discount code inside the warning payload?
For example, something like:
This would make it possible for clients to correctly identify and remove invalid discount codes in multi-discount flows.
Thanks!