question

adam11 avatar image
adam11 asked

How to add LineItem to current Item section in register application using connector

hii,

Below the code I am using to add LineItem to register application current Order section using connector -


orderConnector = OrderConnector(this, mAccount, null)
orderConnector.connect()
inventoryConnector = InventoryConnector(this, mAccount, null)
inventoryConnector.connect()


val mOrder:Order = orderConnector.createOrder(Order())


val merchantItems: MutableList<Item> = inventoryConnector.items;

val mItem: Item = merchantItems[2];


val mLineItem:LineItem = LineItem()
mLineItem.name = mItem.name
mLineItem.itemCode = mItem.code
mLineItem.price = mItem.price


var list:MutableList<LineItem> = mutableListOf()

list.add(mLineItem)

mOrder.lineItems = list


below code to open register application and add it to it -


val intent = Intent(Intents.ACTION_START_REGISTER)
intent.putExtra(Intents.ACTION_LINE_ITEM_ADDED,mLineItem.id)
startActivity(intent)


Register application is opening but nothing is happening.

LineItems
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.

0 Answers

· Write an Answer

Write an Answer

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