Flaw in POS printing with GCP add-on
-
I understand that the GCP module is to be replaced before the end of the year, but will raise this to ensure the replacement doesn’t have a similar fault. And in case anyone else encounters this.
I’d tested POS printing, via GCP, on a local label printer before ordering the POS terminal and thermal printer. All worked fine on test, but didn’t work on the new thermal printer. Test prints and prints from the admin dashboard worked, but prints from the POS didn’t.
After many hours of adding logging/dumping, there is a fault in the code when printing from the POS. It will only work if the POS printer is the first ever added and has an internal ID of 1. Add another or remove and add again and it will stop working because its id is no longer 1.
The fault is in rawPrintOrder. It assume the location is going to be an intval but it’s not from the POS. Argument[2] from the POS is actually a Location object, not a location id. This results in $value = array_map(‘intval’, (array) $value) always returning 1. So it’s only ever possible to print to location with internal id 1 from the POS.
Once I amended the thermal printer id in the database to 1, it started printing from the POS. Luckily (like most!) we only need one receipt printer.
Just some further feedback: the custom print settings don’t seem to work as advertised. We have a shiny new star TSP100 roll printer. Leaving custom print setting at auto doesn’t work. It’s an 80mm printer but had to set width to 72mm. It’s a continuous feed printer but still had to set a height (anything will do) otherwise it didn’t print anything. No matter what height is set, the receipt uses only as much paper as needed.
I look forward to seeing the new print add-on with support for fast, direct local printing.
More feedback: with the new print module, can you make it so that, if there’s only one printer configured for a POS station, there’s no need to select it to print a receipt. If there’s only one, it can go ahead and print to it without prompting.
- The topic ‘Flaw in POS printing with GCP add-on’ is closed to new replies.