question

dhanaraj avatar image
dhanaraj asked Jacob Abrams commented

how to add custom item intent in application

We are trying to integrate the adding the Custom item into our application. Is there any intent available? Or else if any one guide us for implementation. It is very helpful for us.

Clover Android SDKIntents
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.

Jacob Abrams avatar image Jacob Abrams ♦♦ commented ·

Please describe in more detail what your motivation is and what you are try to achieve. (See item #4 of https://community.clover.com/questions/35/how-do-i-ask-a-good-question.html)

0 Likes 0 ·
dhanaraj avatar image
dhanaraj answered Jacob Abrams commented
@Jacob Abrams @Raymond Lee I need help for implementing to add a custom item for the 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.

Jacob Abrams avatar image Jacob Abrams ♦♦ commented ·

Your question is still not clear to me at all. Please describe in precise detail how the end user will experience the feature you would like to implement.

0 Likes 0 ·
Raymond Lee avatar image
Raymond Lee Deactivated answered Raymond Lee Deactivated edited
There is currently no intent available to launch our "Add Custom Item" screen, but the closest you can get is to use Intents.ACTION_START_REGISTER or Intents.ACTION_ITEM_SELECT to launch our Register App and pass in the Order. See:

The merchant will still need to click on the "Custom Item" button themselves.

You can add a custom line item to your Order using the OrderConnector's addCustomLineItem method.

Here is an example:
Order order = new Order();

order = mOrderConnector.createOrder(order);

LineItem customItem = new LineItem();<br>customItem.setName("Avocado");<br>customItem.setPrice((long)100);<br><br>mOrderConnector.addCustomLineItem(order.getId(), customItem, false);

In this example I created a new order and added a custom line item to it, but you can add to an existing order by passing that order's order ID in the first parameter to addCustomLineItem().
10 |2000

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