I have faced crucial limitation that it does not allow to apply more than 1 discount.
As FunctionResult I am returning vec of discounts (list of 2 discounts, for example), and want 2 discounts to be applied at the same time. However, it does not happen probably because of DiscountApplicationStrategy which chooses only between First and Maximum discount.
We are having the exact same issue! The DiscountApplicationStrategy is limiting us as we want to apply multiple different discounts on multiple products in the same checkout. Are there any solutions here yet?
@rm_mrkb
Shopify has confirmed stacking discounts on line items is a current merchant frustration with Functions, but there’s an active project being worked on by the Discounts product team on it. Which means the team is aware and is working towards fixing this limitation, unfortunately, they do not have any timelines on this
Same problem for me. I’m trying to apply 2 different discounts to 2 different products and it only applies to one product. It seems that there’s no way to add multiple different product discounts neither using shopify functions, neither by applying it in the frontend using /discount/CODE endpoint. Actually it used to work using the /discount/CODE method, and I had managed to add 2 different discounts to cart, but after few weeks shopify decided to change that and it no longer works, although their documentation states otherwise (cart permalinks)
How can we replace Shopify Scripts with the new Functions if half the features are not available in Shopify Functions API? (Merchants are really not pleased at the moment)
+1 on this, this limitation + the limitation of the number of Automatic App Discounts makes impossible for my app to be updated with Shopify Functions.
I can apply 2 discount in 2 differents products, like the print below.
But I want to apply discount if the product has attribute “_x” for exemple, it works partially but if I apply the discount to the product that has this attribute and I add the same product without this attribute on cart the discount will be added to the product without attribute too (if I only add to cart the product without the attribute, discount is not applied).
I think it might be because the target for discount can be only product variant, so the discount is added to this variant id, not the line id. That’s why the discount is applied to all products that has the same variant id, but not same attribute I guess (sorry for my english, I hope you understand it).
Same issue. Kind of insane considering discounts is an array. The output of my function pretends it accepted an array, but it only applies the second one.