Ticket template codings

Can you put ``` at the beginning and end of your template so it shows your printer template formatted.

BTW HTML img tag works fine within the formatted sections. You just have to get your icons to the size you want. See below:

image

<div style="padding: 5px; text-align: Center; width: 225px; font-family:'Helvetica'; font-size:12px; font-weight:normal;line-height: 1.6em;"><img src="C:\Users\josep\Documents\bg.png"></div>
<div style="width: 100%; height: 10px;"></div>
<div style="padding: 5px; text-align: Center; background-color: #000000 black; color: #ffffff; border: 1px black solid; width: 225px; font-family:'Helvetica'; font-size:12px; font-weight:normal;line-height: 1.6em;">113 E Holly St<Br/>Bellingham, WA 98226<Br />(360) 933-4301</div>
<div style="padding: 5px; text-align: Center; background-color: #ffffff black; color: #000000; border: 1px black solid; width: 225px; font-family:'Helvetica'; font-size:12px; font-weight:normal;line-height: 1.6em;">Order Online @ Horseshoecafe.com</div>

<div style="width: 100%; height: 10px;"> </div>

<table>
<tr>
<td>
<div style="text-align:center; border: 1px black solid; font-family:'Helvetica';">
<div style="height: 10px; font-size:10px;padding:5px;">{DATE:yyyy}</div>
<div style="height: 20px; font-size:14px;padding:2px;">{TIME}</div>
<div style="height: 10px; font-size:10px;padding:5px;">{DATE:MMM} {DATE:dd}</div>
</div>
</td>
<td>
<div style="text-align:center; border: 1px black solid; font-family:'Helvetica';">
<div style="height: 10px;font-size:10px;padding:5px;">Table</div>
<div style="height: 20px;font-size:14px;padding:2px;">{ENTITY NAME:Table}</div>
<div style="height: 10px;font-size:10px;padding:5px;"><img src="C:\Users\josep\Documents\bg.png"></div>
</div>
</td>
<td>
<div style="text-align:center; border: 1px black solid; font-family:'Helvetica';">
<div style="height: 10px;font-size:10px;padding:5px;">Ticket</div>
<div style="height: 20px;font-size:14px;padding:2px;">{TICKET NO}</div>
<div style="height: 10px;font-size:10px;padding:5px;"><img src="C:\Users\josep\Documents\bg.png"></div>
</div>
</td>
<td>
<div style="text-align:center; border: 1px black solid; font-family:'Helvetica';">
<div style="height: 10px;font-size:10px;padding:5px;">Server</div>
<div style="height: 20px;font-size:14px;padding:2px;">{USER NAME}</div>
<div style="height: 10px;font-size:10px;padding:5px;"><img src="C:\Users\josep\Documents\bg.png"></div>
</td>
</tr>
</table>

<BMP> did work but it was showing the path of the image as well. Not sure why.

1 Like

You really smashed that template, great work! I just might use it as some point. :slight_smile:

Hah thanks. I’m using it as well now too. Funny how things work out. I’m not using any icons and the boxes are slightly smaller. I do like how information on the ticket is presented horizontally versus vertical. I’ll post up my final template as well.

Final Version … for now

image

[LAYOUT]
-- Address and Website
<div style="padding: 5px; text-align: Center; background-color: #000000 black; color: #ffffff; border: 1px black solid; width: 225px; font-family:'Helvetica'; font-size:12px; font-weight:normal;line-height: 1.6em;">113 E Holly St<Br/>Bellingham, WA 98226<Br />(360) 933-4301</div>
<div style="padding: 5px; text-align: Center; background-color: #ffffff black; color: #000000; border: 1px black solid; width: 225px; font-family:'Helvetica'; font-size:12px; font-weight:normal;line-height: 1.6em;">Order Online @ Horseshoecafe.com</div>

-- Spacer
<div style="width: 100%; height: 5px;"> </div>

-- Header Info Layout
<table>
<tr>
<td>
<div style="text-align:center; border: 1px black solid; font-family:'Helvetica';">
<div style="height: 10px; font-size:10px;padding:5px;">{DATE:MMM} {DATE:dd}</div>
<div style="height: 20px; font-size:14px;padding:2px;">{TIME}</div>
-- <div style="height: 10px; font-size:10px;padding:5px;">{DATE:yyyy}</div>
</div>
</td>
<td>
<div style="text-align:center; border: 1px black solid; font-family:'Helvetica';">
<div style="height: 10px;font-size:10px;padding:5px;">Table</div>
<div style="height: 20px;font-size:14px;padding:2px;">{ENTITY NAME:Table}</div>
-- <div style="height: 10px;font-size:10px;padding:5px;">*icon*</div>
</div>
</td>
<td>
<div style="text-align:center; border: 1px black solid; font-family:'Helvetica';">
<div style="height: 10px;font-size:10px;padding:5px;">Ticket</div>
<div style="height: 20px;font-size:14px;padding:2px;">{TICKET NO}</div>
-- <div style="height: 10px;font-size:10px;padding:5px;">*icon*</div>
</div>
</td>
<td>
<div style="text-align:center; border: 1px black solid; font-family:'Helvetica';">
<div style="height: 10px;font-size:10px;padding:5px;">Server</div>
<div style="height: 20px;font-size:14px;padding:2px;">{ENTITY NAME:Server}</div>
-- <div style="height: 10px;font-size:10px;padding:5px;">*icon*</div>
</td>
</tr>
</table>

-- <div style="width: 100%; height: 10px;"> </div>
-- <div style="padding: 5px; text-Align: center; border: 1px black solid; font-family:'Helvetica'; font-size:12px; font-weight:normal;line-height: 1.6em;">Welcome, [='{ENTITY NAME:Customer}'==''?'Guest':'{ENTITY NAME:Customer}']</div>

-- Spacer
<div style="width: 100%; height: 10px;"> </div>

{ORDERS}
<div style="width: 100%; height: 10px;"> </div>
<div style="padding: 0px; text-Align: center; font-family:'Helvetica'; font-size:12px; font-weight:bold;line-height: 1.6em;">{TICKET QUANTITY SUM}x Items Sold</div>
 
{DISCOUNTS}
[<J10>Total Gift:|{ORDER STATE TOTAL:Gift}]
{SERVICES}
-- <table><tr>
-- <td width="275" align="center">&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;</td>
-- </tr></table>

<J00>-------------------------------------------
<div style="font-size:14px;font-weight:bold;text-align:justify;font-family:'Helvetica'">
<table>
<tr>
<td width="200" align="left">Sub Total:</td>
<td width="55" align="right">[=F(TN('{PLAIN TOTAL}'),'0.00')]</td>
</tr>
</table>
</div>
<J00>-------------------------------------------

<table>
<tr>
<td width="200"><span style="text-align:left; font-family:'Helvetica'; font-size:14px;">Tax:</span></td>
<td width="55" align="right"><span style="text-align:right; font-family:'Helvetica'; font-size:14px;">{TAX TOTAL}</span></td>
</tr>
</table>
{PAYMENTS}

<div style="width: 100%; height: 10px;"> </div>
<div style=" background-color: #000000 black; color: #ffffff; padding: 5px; text-Align: center; border: 1px black solid; font-family:'Helvetica'; font-size:12px; font-weight:normal;line-height: 1.6em;">Thank you for Visiting the 'Shoe<br /> We'll see you next time<Br />Horseshoe Cafe Est. 1886</div>
<div style="width: 100%; height: 10px;"> </div>

<div style="padding: 5px; text-Align: left; border: 1px black solid; font-family:'Helvetica'; font-size:12px; font-weight:normal;line-height: 1.6em;">
<table>
<tr><td align=center><span style="text-align:center; font-family:'Helvetica'; font-size:14px;">*Voluntary* Health Contact Info<Br /></span></td></tr>
<tr><td><span style="text-align:left; font-family:'Helvetica'; font-size:14px;">Name: &#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;</span></td></tr>
<tr><td><span style="text-align:left; font-family:'Helvetica'; font-size:14px;">Phone: &#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;</span></td></tr>
<tr><td><span style="text-align:left; font-family:'Helvetica'; font-size:14px;">E-mail: &#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;&#95;<Br /></span></td></tr>
<tr><td><span style="text-align:left; font-family:'Helvetica'; font-size:10px;">If we learn you may have been exposed to COVID-19 during your visit, we will only share this information with public health officials. We will not use your info for any other purpose.</span></td></tr>
</table>
</div>

[DISCOUNTS]
<table>
<tr>
<td width="200"><span style="text-align:left; font-family:'Helvetica'; font-size:14px;">{CALCULATION NAME} %{CALCULATION AMOUNT}</span></td>
<td width="55" align="right"><span style="text-align:right; font-family:'Helvetica'; font-size:14px;">{CALCULATION TOTAL}</span></td>
</tr>
</table>

[SERVICES]
-- <J10>{CALCULATION NAME}|{CALCULATION TOTAL}

[PAYMENTS]
<table>
<tr>
<td width="200"><span style="text-align:left; font-family:'Helvetica'; font-size:14px;">{PAYMENT NAME}</span></td>
<td width="55" align="right"><span style="text-align:right; font-family:'Helvetica'; font-size:14px;">{PAYMENT AMOUNT}</span></td>
</tr>
</table>

[ORDERS]
<table>
<tr>
<td width="25"><span style="text-align:left; font-family:'Helvetica'; font-size:14px;">- {QUANTITY}</span></td>
<td width="200"><span style="text-align:left; font-family:'Helvetica'; font-size:14px;">{NAME}</span></td>
<td width="30" align="right"><span style="text-align:right; font-family:'Helvetica'; font-size:14px;">{TOTAL PRICE}</span></td>
</tr>
{ORDER TAGS}
</table>

[ORDERS:Gift]
-- Format for gifted orders
<table>
<tr>
<td width="25"><span style="text-align:left; font-family:'Helvetica'; font-size:14px;">- {QUANTITY}</span></td>
<td width="200"><span style="text-align:left; font-family:'Helvetica'; font-size:14px;">**COMP** {NAME}</span></td>
<td width="30" align="right"><span style="text-align:right; font-family:'Helvetica'; font-size:14px;">{TOTAL PRICE}</span></td>
</tr>
{ORDER TAGS}
</table>

[ORDER TAGS]
-- Format for order tags
<tr>
<td width="25"><span style="text-align:left; font-family:'Helvetica'; font-size:12px;">***</span></td>
<td width="200"><span style="text-align:left; font-family:'Helvetica'; font-size:9px;">{ORDER TAG NAME} </span></td>
<td width="30" align="right"><span style="text-align:right; font-family:'Helvetica'; font-size:9px;">[=F(TN('{ORDER TAG PRICE}')*TN('{ORDER TAG QUANTITY}')*TN('{QUANTITY}'),'#.00')]</span></td>
</tr>
1 Like

Thank you so much! Manage to add icons and logo☺️

4 Likes

Hi sir. If I change the printer type to html , the receipt is printing but the cash drawer isn’t opening. But once I put back a basic receipt format and change the printer type to esc, the cash drawer is opening. Do we have any ways to settle this?

Create another printer in sambapos for esc/pos and a new print job and template for that. The drawer pop command requires esc/pos mode.

Thank you!! Will try it