CSS for ticket in Phoca POS - receipt width

Phoca Cart - complex e-commerce extension
User avatar
dmlwebal
Phoca Professional
Phoca Professional
Posts: 238
Joined: 18 Sep 2019, 12:49

CSS for ticket in Phoca POS - receipt width

Post by dmlwebal »

Hi

My client has a thermal printer from EposNow and we cannot find drivers for it. So the tickets print but some item titles are too wide and break the ticket formatting.

I can correct this preview with in Inspector

.phPrintInBox {
overflow: hidden;
max-width: 46ch;
}

and apparently the ticket the prints out ok (I am not on site so can only take my clients word for it)

I have tried adding these lines to the POS template but that doesn't work as the CSS appears dynamically generated.

Where in the folder structure/files should I locate this override?

Regards
David
christine
Phoca Hero
Phoca Hero
Posts: 2819
Joined: 28 Nov 2010, 17:20

Re: CSS for ticket in Phoca POS - receipt width

Post by christine »

Hi David,

depends on template. Just try it to a custom.css (or custom.scss) of template. [maybe !important; is needed]

Kind regards
Christine
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: CSS for ticket in Phoca POS - receipt width

Post by Jan »

Hi, which way do you use for printing the receipt.

Mostly,thermal printers do not print any html/css but text only.

Can you paste a screenshot which way do you use for print? If direct print or print per browser?

Jan
If you find Phoca extensions useful, please support the project
User avatar
dmlwebal
Phoca Professional
Phoca Professional
Posts: 238
Joined: 18 Sep 2019, 12:49

Re: CSS for ticket in Phoca POS - receipt width

Post by dmlwebal »

Hi

Thanks Christine, and Jan

I'll try !important of course, but as Jan points out, should the CSS even affect the print out? I would have thought no. So, I shall try to get more details on Monday. The store is too distant for me to visit just for testing CSS so I rely on a contact in store to verify this.

I attach image showing the current settings in Phoca

https://ibb.co/28HSF3v

The problem they are having is that some product titles are too long to fit the width of the ticket, especially when an attribute is included. Instead of flowing to a newline in the POS print preview, the characters extend past the edge of the onscreen receipt and apparently this throws out the print formatting further down. Personally I would recommend they get another printer that has more driver settings available but, I will try to help them instead of adding to landfill with a 'working' printer.

This is an example of the problem

https://ibb.co/sqjTntV

See how the line extends several characters past the cut off point of 42 defined in the site settings (the dashed line is the marker for this)


Regards
David
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: CSS for ticket in Phoca POS - receipt width

Post by Jan »

Hi, the screenshot is about the receipt displayed in monitor - which is just done with html/css but it is in fact not so important as the printed version itself - do they get the same results on printed receipt?

Jan
If you find Phoca extensions useful, please support the project
Post Reply