question

matteobklyn avatar image
matteobklyn asked matteobklyn commented

Apply different discounts with the same name

Hi there!

I'm facing the following issue.
Let's say I have an order composed by 3 equal items (same item code) that cost $8 each, the resulting Clover order is composed by 3 different line items with a total of $24.
For some reasons I need to programmatically apply a $10 discount to the order, split as:
-$3.34 off the first item
-$3.33 off the second item
-$3.33 off the third item

What I'm doing is creating three different Discount item with name "$10 off" and the correct amount ("-334" for the first item, "-333" for the others).

Well, looking at the order summary I see the 3 line items collapsed with a total discount of -$10.02, which is the first -$3.34 applied three times.

Is there a workaround for that? Hope the example is clear enough.

Best,
Matteo
OrdersDiscounts
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

Jonathan Ryan Grice avatar image
Jonathan Ryan Grice answered matteobklyn commented
You would need to assign a modifier group to the item with a minimum requirement.
Check out the SDK doc https://clover.github.io/clover-android-sdk/com/clover/sdk/v3/inventory/ModifierGroup.html

Only other way I know of is, your app would have to calculate the qty of same items and apply the discount to the complete order.
1 comment
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

matteobklyn avatar image matteobklyn commented ·

Thanks @Jonathan Ryan Grice, really appreciate your feedback!

0 Likes 0 ·

Welcome to the
Clover Developer Community