question

ojhatushar avatar image
ojhatushar asked ·

Add discount LineItem wise create flickering problem

I am applying discount line item wise and everytime I am deleting discount and assign again and clover recalculates(deleting and applying again) discount on line item and render them again which creates flickering problem and looks bad in register app
Using following method:-
orderConnector.deleteLineItemDiscounts(orderID, lineId, DiscountItemID);
orderConnector.addBatchLineItemDiscounts(orderID, lineItemIdList, discountList);

I have also used below method:-
orderConnector.deleteLineItemDiscounts(orderID, lineId, DiscountItemID);
orderConnector.addLineItemDiscount(orderID, lineId, discount);

but same problem is there
Please give reply. Its urgent..

OrdersClover MiniClover FlexLineItemsDiscounts
6 comments
10 |2000 characters needed characters left characters exceeded

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

Can you describe what you are doing, and why? Are you saying you have a background service that is sitting behind Register and updating the order?

1 Like 1 · ·
ojhatushar avatar image ojhatushar Jeffrey Blattman ♦♦ ·

We have make an app using clover sdk in which we are applying discount . We have a background service in that app that is updating the order and putting discount when some criteria gets fulfilled on register app. When we are applying discount at that time flickering problem is there, because we are removing discount on every line item and apply it again on every line item when some criteria gets fulfilled using above mentioned method of clover sdk.Any solutions is there of this problem?

0 Likes 0 · ·
ojhatushar avatar image ojhatushar Jeffrey Blattman ♦♦ ·

I mean to say how to delete line item discount in bulk. Currently it is deleted discount lineitem wise using this method:-

orderConnector.deleteLineItemDiscounts(orderID, lineId, DiscountItemID);

Any method by which we can delete discount from line item in bulk.Any solution?

0 Likes 0 · ·

No, there're no bulk line item operations. The flickering makes sense considering what you are doing.

1 Like 1 · ·
Show more comments

1 Answer

Jeffrey Blattman avatar image
Jeffrey Blattman answered ·
This isn't a use case that is handled well by our Register app. It doesn't expect mass order updates like that nor do we have a way to apply such operations in bulk. I know we have apps that make one or a few updates in the background like this, but not to every line item. We do not have a solution to this.

Did you consider applying an order-level discount that's equal to the sum of the item discounts? Just an idea.
Share
10 |2000 characters needed characters left characters exceeded

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

Welcome to the
Clover Developer Community