Hello,
I use prestashop e-commerce installed on a (remote) web server. In my physical store, I installed qz tray on a computer (Mac).
In the web browser, I go to the POS of my online store and I can print the ticket on my thermal printer (Epson).
However, I also use an iPad and I can't install a qz tray module on it.
So I have to send the tickets from the ipad to the mac, which then prints them. And I can't do that.
On my web server, for the qz tray part, I have a javascript file that contains the following code:
/** Default parameters used on new connections. Override values using options parameter on {@link qz.websocket.connect}. */
connectConfig: {
host: ["localhost", "
localhost.qz.io"], //hosts QZ Tray can be running on
hostIndex: 0, //internal var - index on host array
usingSecure: true, //boolean use of secure protocol
protocol: {
secure: "wss://", //secure websocket
insecure: "ws://" //insecure websocket
},
port: {
secure: [8181, 8282, 8383, 8484], //list of secure ports QZ Tray could be listening on
insecure: [8182, 8283, 8384, 8485], //list of insecure ports QZ Tray could be listening on
portIndex: 0 //internal var - index on active port array
},
keepAlive: 60, //time between pings to keep connection alive, in seconds
retries: 0, //number of times to reconnect before failing
delay: 0 //seconds before firing a connection
},
it is loaded locally in the browser when I launch the ineterface of my cash register (on the remote website).
I tried to change localhost to the internal IP address of the Mac running QZ tray. This doesn't work. I've also tried setting the IP address to public and forwarding the ports (I can't remember which ones at the time of writing) to the Mac in my router. That doesn't work either, but maybe I haven't configured all the parameters correctly.
Does anyone have any idea what configuration to do in my case?
Thanks!