question

akilan-arasu avatar image
akilan-arasu asked akilan-arasu commented

How to get quantity for a fixed price LineItem?

I have an item in my inventory which has a fixed price of $1.50. When I add the item twice in the register app, it shows the price as $3.00. Then I open my custom merchant tender app and use the IOrderService to retrieve the order. When I extract the LineItems and print it, I see Water printed twice. Doesn't the sdk group them together?

Here's the response:

"lineItems":{  
   "elements":[  
      {  
         "createdTime":1486029515310,
         "taxRates":{  
            "elements":[  
               {  
                  "id":"M6SY0C8FE05BC",
                  "isDefault":false,
                  "rate":0,
                  "name":"NO_TAX_APPLIED"
               }
            ]
         },
         "userData":null,
         "alternateName":"",
         "exchanged":false,
         "id":"251ET95F4DSKC",
         "refunded":false,
         "price":150,
         "binName":null,
         "isRevenue":true,
         "name":"Water",
         "item":{  
            "id":"N68V57MNBMNT2"
         },
         "printed":false,
         "itemCode":"1000001"
      },
      {  
         "createdTime":1486029515814,
         "taxRates":{  
            "elements":[  
               {  
                  "id":"M6SY0C8FE05BC",
                  "isDefault":false,
                  "name":"NO_TAX_APPLIED",
                  "rate":0
               }
            ]
         },
         "userData":null,
         "alternateName":"",
         "id":"5VR3TW03JX8EG",
         "exchanged":false,
         "price":150,
         "refunded":false,
         "binName":null,
         "isRevenue":true,
         "item":{  
            "id":"N68V57MNBMNT2"
         },
         "name":"Water",
         "printed":false,
         "itemCode":"1000001"
      }
   ]
}
Orders
10 |2000

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

q-factor avatar image
q-factor answered akilan-arasu commented

I think the grouping is done only at the application level, for example on the Register app. Fixed priced Items does not have quantity. The quantity property is applicable for Unit Priced Items only.

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.

akilan-arasu avatar image akilan-arasu commented ·

Thank you for answering. Should I be doing the grouping within the app?

0 Likes 0 ·
q-factor avatar image q-factor commented ·

yes, you should group in your app if you require to. You must remember that each lineitem is a different object with properties that could differ. For example modifiers.

0 Likes 0 ·
nirmal avatar image
nirmal Suspended answered akilan-arasu commented

Can you please confirm are you developing application for android SDK or else?

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.

akilan-arasu avatar image akilan-arasu commented ·

Yes I'm developing the app using Clover's android sdk.

0 Likes 0 ·

Welcome to the
Clover Developer Community