Looking for help?
< All Topics
Print

How to Create Your Own Receipt Template

OpenPOS prints a receipt for every order taken at the register, and it can also print kitchen tickets and email the receipt to the customer. The built-in layout works out of the box, but most stores want their own: a store name and address, a phone number, a tax ID, a return policy in the footer or a QR code linked to the order. This guide shows how to create your own receipt template in the WordPress admin, assign it to a register and check that the cashier’s printouts use it.

Before you start

  • Log in to the WordPress admin with an account that can see the POS menu (usually an administrator).
  • Receipt templates are chosen per register. If you run several registers, decide which ones should use the new layout. Testing on one register first is the safest approach.
  • Have your store details ready (name, address, phone, website, footer text) so you can type them in one go.

Create and assign a receipt template

  1. In the WordPress admin, go to POS > Receipt Templates. Create a new template, set its type to “receipt” and save it. Give it a descriptive name such as “Main store receipt” so it is easy to recognise later in the register drop-down.
  2. In the template list, click Composer on the receipt you just created. The composer is where you edit what the template prints.
  3. Click “Load sample” to import the sample receipt. Starting from the sample gives you a working layout to adapt instead of building the receipt from an empty page.
  4. Edit your information under Template content: replace the sample store name, address and contact details with your own and adjust the header and footer text. Change the text around any shortcodes from the sample, but leave the shortcodes themselves in place unless you know what they output.
  5. Click Save. It is a good idea to also copy the finished template content into a text file as a backup before you make further changes.
  6. Go to POS > Registers and click Edit under the register that should use the new template.
  7. On the Edit Register page, open the Receipt field and choose the receipt template you created in step 1 (see the screenshot below).
  8. Save the register. Then log out of the POS and log in again so the register loads the new template.
OpenPOS Edit Register screen in WordPress admin with the Receipt field set to a custom receipt template

As the screenshot shows, the Edit Register page also has separate fields for the Gift Receipt, zReport and Kitchen Receipt templates, so you can give each printout its own layout in the same way. If a field is left on “Default template”, the register uses the receipt template chosen in the POS settings, as noted under the field.

Add a QR code to the receipt

To print a QR code for the order, add the order_qrcode shortcode to the template content. The snippet below wraps it in a centred paragraph with the CSS class qrcode-image:

<p style="text-align:center;" class="qrcode-image">[order_qrcode width="500" height="500"] </p>
  1. Open the template in the Composer again.
  2. Paste the snippet into Template content at the position where the QR code should appear, for example just above the footer text.
  3. Adjust the width and height values if the code is too large or too small for your paper, then save.
  4. Log out of the POS and log in again, then print a test receipt.

If you want the QR code to point to your own URL instead, see the related article on the QR code shortcode with a custom URL at the end of this page.

Check the result

Open the POS on the register you edited and complete a test order with an inexpensive product. Print the receipt on the printer you use in the store, not only on screen: receipt printers commonly use narrow paper (for example 58 mm or 80 mm), and text or images that look fine in a browser may be cut off or wrap badly on paper. When you are happy with the result, refund or cancel the test order so it does not distort your sales reports, and switch the remaining registers to the new template.

Troubleshooting

  • The old receipt still prints. Check that you edited the register the cashier is actually logged in to and that the register was saved. Then log out of the POS and log in again; the change only takes effect after a new login. If the browser still shows old data, reload the page with a hard refresh.
  • The layout is broken after editing. An unclosed HTML tag in the template content is the most common cause. Compare your content with the backup copy you saved, or start again from the sample.
  • The QR code is too large or missing. Reduce the width and height values, and make sure the square brackets of the shortcode were pasted correctly.
  • Only one register is affected. That is expected: the template is selected per register, so repeat steps 6–8 for each register.

Related

Table of Contents