Is it possible to use a variable in urlprinter?

I use urlprinter to print wifi tickets. The url has this format:
http://localhost:8090/wifitickets/4/

The digit in the url refers to the wifi time plan (1 day or 1 week)
I now have a manual entry for every time plan.

I would like to switch to this format http://localhost:8090/wifitickets/4/2

The 4 refers to the time plan, and the 2 refers to the amount of wifi codes printed on one ticket.

It would be perfect if I could control the last digit by the amount of products I choose. So 5x wifi tickets for one week creates this url: http://localhost:8090/wifitickets/4/5

Is this possible in Sambapos?

Have you read this post?

Thanks for the reply!

Edit: I found some time to test, but it is not totally clear to me.

I have to set a variable in the urlprinter with the @ option, like in the example from the other topic:
Ticket=@ticket@&Amount=@amount@&Items=@items@

How/were do I exactly map a tag to the variable?

I was going to say that would probably be easy with scripts but your on v4…

You already asked this question and emre already answered.

Just follow that tutorial sending SMS by URL Printer, sorry that tutorial already step by step, couldn’t be clearer than that.

I must have missed something. I will go through the tutorial again. Sorry if I double asked.

When I started the topic I had the problem that no url was called as soon as I used a variable (the double @ sign). There was no error or anything, and without a variable the url was called.

Today I tried again, and everything seems to work now. When I use t={DATE} in the printer template, and @t@ in the urlprinter, the date is shown (I have to figure out how to show the amount of products yet)

So I am a bit confused, but happy that it works.

I tried a lot of options, and I think there is no standard way to achieve what I want. My approach to use the amount of products in the url doesn’t work for two reasons:

  • our customers get a free wifi tickets with their stay, so I use zero priced products. The amount of products is always 1 on zero based products.

  • it is now possible to pick another product (lets say rolls), and then a wifi ticket. There is no way to say which amount to use in the urlprinter. When I first choose 5 rolls, and the 1 wifi ticket, I get the 5 in the urlprinter.

I think I will switch to a custom order tag, and ask for a user input.