question

aashish.tanwar avatar image
aashish.tanwar asked ·

Unable to print order with clover mini with displayOrder method

Hi,

We have created web application where we are using Multiple inventory items which is created in sandbox for making order.

On sale request we are

var amount = parseInt($('input.payment_amount').val());
var item = new clover.order.DisplayLineItem();
item.setId(1234);
item.setName('Test Item');
item.setPrice(amount * 100);
var order = new clover.order.Order();
order.setTitle("Hi Trent");
order.setId(1234);
order.setTotal(amount * 100);
order.setLineItems([item]);
clover_connector.showDisplayOrder(order);


When we create sales request from connected clover device at the same time we are creating order and adding line items to it but on success of payment it does not shows to print receipt and also does not goes to kitchen printer as well.


How can we print itemized items on clover mini with showDisplayOrder ?


Please help us out we were stuck in this from last month.

clover developer community
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.

1 Answer

· Write an Answer
David Marginian avatar image
David Marginian answered ·

showDisplayOrder is for displaying items on the Clover device, not printing receipts.

Please see - https://community.clover.com/questions/2507/usb-pay-display-shows-line-items-but-prints-like-m.html.

For semi integrations your POS owns the order (should have it's own order management/inventory system). In practice this means when using the Clover Connector SDKs we will create an order for you with a single item - Manual Transaction. It also means there is no way to associate the payment with an existing Clover order. Our SDK has various print functions which will allow you to generate and print your own receipt which is the only way around this.

13 comments 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.

@David Marginian - Could you please suggest us the print function that will allow us to generate and print the itemized order on the receipt from the kitchen printer.
It's an urgent requirement as we are blocked from last month, hoping for the response that will unblock us soon.

0 Likes 0 · ·

It is not clear to me what the use case of your app is. But, as I previously stated, when using the Clover Connector it is assumed your system manages the order, not Clover. There is no method to link the payment you are making from the Clover Connector to an existing Clover order, and therefore no way to print Clover items on the receipt. The only way is if you create a custom receipt and then use the print API on the CloverConnector - https://clover.github.io/remote-pay-cloud-api/3.0.1/remotepay.ICloverConnector.html.

0 Likes 0 · ·

@David Marginian - I would like to restate the things for you so that you will have a clear picture of what we are trying to achieve.
We have developed a Web-based POS system that is having some items in it and the item Ids associated with these items belongs to the clover inventory which is created in the sandbox environment on the clover dashboard.
Now, from our Web-based POS, we would like to place an order with selected lined-up items and capturing the payment on the Clover flex device using CloverConnector function and payment is captured successfully but we also want those selected items to get printed on the receipt we which will get from the Kitchen printer.

I hope I'm very much clear about what we want to achieve through our POS.
So, as per your above suggestion, we have to create a custom receipt and then use the print API on the CloverConnector - https://clover.github.io/remote-pay-cloud-api/3.0.1/remotepay.ICloverConnector.html. Am I right?
Please let me know if I'm doing something wrong.

0 Likes 0 · ·

That is correct. Have you contacted our semi integrations team per the sticky in this community forum? https://docs.clover.com/clover-platform/docs/application.

You can also create a Clover order from your web application via our REST API (https://docs.clover.com/clover-platform/docs/working-with-orders). Then you wouldn't need to use our Connector SDK. The order would sink down to the device and a standard Clover app could be used to take payment.



0 Likes 0 · ·
Chris avatar image Chris David Marginian ♦♦ ·

Hi David, we created a Clover order from our web application via your REST API. And now it creates two transactions one manual transaction that gets printed on the clover device receipt without itemization and can be seen as paid and one itemized order with the same total that can only be seen on the web dashboard as open state, this is the one we would like to print through the kitchen printer and clover device. How can we stop the duplicate order? Is it possible to print the itemized receipt in the clover device and kitchen printer without having to create an APK app for the device itself?

0 Likes 0 · ·
Show more comments

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