Urlprinter usage

Is it possible to get ticket items to be sent to URLprinter?
I tried to use

ticket={TICKET NO}
amount={TICKET TOTAL}
items={QUANTITY}x{NAME}

All other things like ticket id and amount was sent properly. Items justs went as {QUANTITY}x{NAME}.

URL format

https://myurlserver.com/exec?Store=AA&Ticket=@ticket@&Amount=@amount@&Items=@items@

Is there a way to get quantities & name onto a server?

{QUANTITY} tag is order level tag. It won’t work in ticket level. Try Ticket Quantity Sum.

Don’t understand why you want to send item name with ticket total. If ticket has 100 items you want to send every items

I’m trying to send ticket info to an online server so that I can keep live track of sales and inventory using a mobile app.
Ticket Quantity Sum prints number of items in ticket, not actual items

You will struggle to do it on a ticket level…
As @sukasem said;

Only way I could see this working on a single url line would be to send the {QUANTITY}x{NAME} in an order added action but think that might add a fair bit of load on the system…

Best alternative which would be much more powerfull would be to use scripts but have only worked with JSON API

Can SambaPOS output JSON? Is that a V5 feature?

Yes, it can. It has a JSON parser as well.

To be clear, does v4 have a JSON parser? I am using v4 right now.

V4 has no JScript support whatsoever, so no, it does not have a JSON parser.

3 Likes

My menu is quite small. Less than 10 items. It shouldnt be a problem.

Is it possible to save Order items in format of {QUANTITY}x{NAME}- as a ticket tag?

Sure…

In Your case, you would have an Action to Update Ticket Tag called something like OrderList, and you would place the Action in a Rule for something like Order Added to Ticket, with a value such as:

{TICKET TAG:OrderList}&{QUANTITY}x{NAME}

Though that could get tricky when you Cancel Orders, or Void Orders…

2 Likes

That works. There are a few problems though.
I used
{TICKET TAG:OrderList}{QUANTITY}x{ITEM ID}-
to get an output like
1x48-1x48-2x65-1x45-

Can I add order tags to this? When I tried to add {ORDER TAG NAME} it just showed up like that and not the value. I think it is because the Ticket Tag is being appended before I select the order tag.

When I add 1 quantity of item 45 and then increased the quantity using the + keys, it wont reflect in the Ticket Tag. Same issue as above, I assume.

Is there any way around these?

https://dl.dropboxusercontent.com/u/4301273/pos/VID_20151118_121708.mp4

In the video I increase an item using the + key, and that is not added to ticket tag.

Yes that is the problem. Altering an Order will not be reflected in the Ticket Tag - the same problem as with Cancel or Void.

A fool-proof solution would be more elaborate, and if I were to do it, I would run SQL script with Ticket Id as a parameter. The script would run on Ticket Closing event, read the [Orders] table in the DB for the specified Ticket Id, build the Ticket Tag, and update it in the [Tickets] table.

1 Like

Yeah, that is kinda what I am now trying to do. I might abandon the URL printer entirely in favor of timed sql reads from the database. The URLprinter does not fire in some instances. :stuck_out_tongue:

I may be coming in this at odd timing I have not read entire thing. Ticket Total Updated Event would capture the plus and minus use case for updating the ticket tag but it may not work for updating order tags if no price.

That event would also solve cancels and voids.
It would also work for selecting order tags if they are priced

That may work. In that case, you would need to loop through Orders and rebuild the Ticket Tag every time Ticket Total changed. The only way I know to do this is by using Order State changes… similar to notprinted/printed states, or the way VIP/HH works using Order States to cycle through Order lines on Order State Updated/Changed event.

My order tags have price set. However the Ticket Total Changed event didnt add the plus or minus data. I just called the Ticket tag update action hoping that it would work without additional work. Unfortunately it didnt. :stuck_out_tongue:

I dont have Ticket Total Updated event in the dropdown.

I tried to read through the tutorial but I couldnt really make sense of it.

Really?

So … are you asking to have someone build this for you and walk you through it?

As qmckay said you will have to loop through the orders for each update as the total changed will not specify what change to order cause the total to change just that the total changed.
Preserver and you’ll get there.
Build your tag creation in a generic way looking at all orders and then any ticket change will trigger the regeneration of the ticket tag.

That is what I said. I didnt have Ticket Total Updated. Only Ticket Total Changed. I was going off what kendash posted.
I did try with this Ticket Total Changed, but the tags just kept multiplying uncontrollably. :stuck_out_tongue:

I might have a solution to my problem which doesnt use ticket tag or urlprinter. Instead it uses the demo notepad printer, a custom prog to parse the output and google spreadsheet.
That way I can have a live report of sales without even having a server. :stuck_out_tongue:
Android app to read and parse Google spreadsheet will be done later. :smile: