question

khyati11 avatar image
khyati11 asked prakash commented

Broadcast for decrease product quantity/ remove line item

Is there any intent or broadcast that can be used to find out when decrease quantity button is pressed on the register app?

I just want to know when the new line item is added to Clover register it notifies my app through broadcast action(com.clover.intent.action.LINE_ITEM_ADDED") when I trigger plus icon in a register to increment the quantity of line Item it again triggers the same action which is ok,

So the main point of my question is when user will trigger the subtract icon for decrement of line items quantity it will not notify me, I don't know which action I use or which technique I use to get decremented line item detail.


Broadcasts
10 |2000

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

Jeffrey Blattman avatar image
Jeffrey Blattman answered chathuranga-shan-j commented

There is not a way to know when a line item has been removed from an order. It does seem like an oversight.

You could consider listening for some other broadcast like ACTION_PAYMENT_PROCESSED to take action on the order. I.e., do you really need to know when anything happens to the order? Or can you just examine the completed order at some later point? As a side issue, having to wake up your app every time a line item changes is not great performance-wise.

Without knowing what is your app / how it works it's hard to suggest anything though.

3 comments
10 |2000

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

drawtugofwar avatar image
drawtugofwar answered prakash commented

To act on the order, you can think about keeping an eye out for another broadcast like action payment processed. Do you really need to know when anything changes the order, for example? Or is it possible to simply review the completed order later? A side issue is that it is not very performance-friendly to have to wake up your app each time a line item changes.

drift hunters 2


2 comments
10 |2000

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

Write an Answer

HTML Editor


Add some details...
Characters : 0
Tab to the formatting toolbar with Alt/Option + F10. If inside toolbar, press ESC to return to editor. Hint: Notify or tag a user in this post by typing @username.

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