Question: Need Open Cash Drawer for Web based printing

Need Open Cash Drawer for Web based printing

Its available in the PHP, PPP setting but not available when using web based printing.. ty :)

DK

David kodwell

Asked
Its available in the PHP, PPP setting but not available when using web based printing.. ty :)
  • MS

    Mian Saleem

    Answered
    Yes, there is no option to add it with web browser.
  • DK

    David kodwell

    Answered
    Well I use a website browser so is there another way to open the cash register without having to reprint the sales slip? Seems there should be an open register with every print option
  • HS

    Harpreet Singh

    Answered
    We have managed to accomplish the same by using a small custom circuit and a basic webserver that listens on localhost (127.0.0.1) and then sending an AJAX request to it just before print function in pos.ajax.js

    Let me know if you need details on how to implement the same.
  • MS

    Mian Saleem

    Answered
    **[hs](/u/hs)** I will appreciate if you could let me know the details
  • HS

    Harpreet Singh

    Answered
    We have used a USB to Serial adaptor to drive a relay, that when triggered, opens the cash drawer.

    To trigger the relay, we have developed a small webserver in C++ that listens to a request on 127.0.0.1 with specific com port as parameter. Once the request is received (eg: http://127.0.0.1/?com=5, where 5 is comport number), the webserver sets the RTS pin low (by default it is high). The relay is connected with RTS port using an inverted driver transistor.

    This forum doesn't allow me to attach CPP or ZIP files. Here is the link to the webserver code https://pastebin.com/cbFyYCpr

    PS: This solution is for Windows only but can be easily adapted to other OSes.
  • MS

    Mian Saleem

    Answered
    **[hs](/u/hs)** Thank you for sharing the solution. I will check in future if I could port it for our use.
  • DK

    David kodwell

    Answered
    Would something like a simple paper feed command also trigger the cash box to open? Just have it advance the paper 1 small row as not to waste it
  • DK

    David kodwell

    Answered
    Or a simple print of a "." then advance the paper one line..
  • DK

    David kodwell

    Answered
    Or a simple print of a "." then advance the paper one line..
  • HS

    Harpreet Singh

    Answered
    This solution in not directly linked to printing.

    Let me be more specific. The cash drawer was NOT connected to printer in our case. This was the second issue apart from web printing as the customer is using a Laser printer instead of receipt printer (thermal or otherwise, that supports cash drawer). So we have to solve both the problems.

    So we came up with small circuit that triggers the cash drawer and a software controller (basic webserver) to do initiate the triggering command.

    Let me know if you need more details.
  • Login to Reply