1. The Logic (How it works now)The system does not "detect" the physical printer. Instead, it "detects" which button you clicked:If you click "Kitchen Only": The software generates a specific design (Big text, no prices) called the KOT (Kitchen Order Ticket).If you click "Counter Only": The software generates the standard receipt with prices.2. The Workflow (How you use it)When the print window pops up, you (the user) select the correct printer from the list.Scenario A: You have 1 Computer with 2 Printers attached.Click Kitchen Print $\rightarrow$ Select "Kitchen Printer" in the list $\rightarrow$ Print.Click Counter Print $\rightarrow$ Select "Counter Printer" in the list $\rightarrow$ Print.Scenario B: You have a separate computer/tablet in the Kitchen.On the Kitchen Computer, go to Windows Settings $\rightarrow$ Printers.Set the Kitchen Thermal Printer as the Default Printer.Now, whenever you click print on that computer, it automatically goes to the right printer without you changing anything.Pro Tip: How to make it smoother (Windows)To make your life easier, you should rename your printers in Windows so you don't get confused.Go to Control Panel $\rightarrow$ Devices and Printers.Right-click your first thermal printer $\rightarrow$ Printer Properties.Change the name to "FRIENDS KITCHEN".Right-click the second thermal printer.Change the name to "FRIENDS COUNTER".Now, when the print popup appears in your software, you will clearly see "FRIENDS KITCHEN" or "FRIENDS COUNTER" in the list.Do you want a "One-Click" Automatic Solution?If you want to click the button and have it print instantly to the correct printer without the popup box appearing, that requires installing a background tool (like QZ Tray) or configuring a Local Network Printer setup, which is much more complicated to code.For now, the method I gave you (selecting from the popup) is the standard way all web-based POS systems (like Foodpanda tablets etc.) work.