Lore

What a POS

This month we’re launching the second phase of a Point of Sale system for the Charleston Area Convention and Visitors Bureau. The first phase was to sell tour tickets and is now being expanded into last minute hotel reservations. This project is unusual for us in that only a handful of people will ever see it. In fact, you won’t even see a screen shot here. You’re not missing much as it is built for speed and not beauty. It is jQueryUI being fed JSON data.

As a web developer, the cool part is that it was built for a known browser and known hardware. No worries about Internet Explorer! The known hardware was actually trickier than it sounds since it involved a mag reader for credit cards and a receipt printer.

The mag reader was configured as a USB/HID interface so that it acts as a keyboard. With some key combinations sent from the reader and some JavaScript, it jumps to the correct fields within the form and fills them with the data from the card.

For the receipt printer, it installed a standard printer. Font substitution was mapped in the printer drivers so that the web fonts are converted to the special monospace printer fonts and page breaks trigger the printer to cut the paper. Since we could configure the browsers, they could be set to not print the date, URL, etc in the margins. Additionally, it could be set to print silently so a print could be triggered directly through JavaScript without a print dialog.

Leave comment below if you’ve had the chance to work with an interesting hardware setup for a web app.