Receipt code editor
You can customize the template for your printed receipts by using the Liquid editor in the Shopify admin. The files that make up your receipts contain Liquid, Shopify's templating language. You should only edit the code for your receipts if you know HTML and CSS, and have a basic understanding of Liquid.
Access the Liquid editor
You can change the receipt templates and the section templates that are used on your printed receipts. Receipt templates are the types of receipts that you print in your store. Section templates are parts of the receipts you print in your store. Sections can be reused by multiple receipts. You can edit your templates by using the Liquid editor:
Steps:
From your Shopify admin, go to Settings > Apps and sales channels.
Click Point of sale.
Click Open sales channel.
Click Settings > Receipt Customization.
Click
> Edit code.
Click Edit code.
Edit your code to customize your receipts.
Click Save.
Edit your receipt templates
You can edit specific parts of your receipts.
Receipt objects
Property | Description |
---|---|
shop | Contains the store information. For example the store name. |
location | Contains the retail location information. For example, address and phone number. |
order | Contains the order data, including the line items, the discounts, the taxes, and the transaction information. |
Order object
Property | Description |
---|---|
id | Id of the order. |
source_identifier | A unique POS or third party order identifier. |
change_due | Change due on the order. |
balance_due | Amount owed on this order. |
name | The unique identifier for the order that appears on the order page in the Shopify admin and the Order status page. For example, "#1001", "EN1001", or "1001-A". This value isn't unique across multiple stores. |
note | The contents of the note associated with the order. |
line_items | A list of the order's line items. |
subtotal_price | The sum of the prices for all line items after discounts and before returns. If taxesIncluded is true, then the subtotal also includes tax. |
total_price | The total price of the order, before returns. This includes taxes and discounts. |
total_tip_received | The sum of all tip amounts for the order. |
discounts | The total amount of discounts. |
transactions | A list of transactions associated with the order. |
taxes_included | Whether taxes are included in the subtotal price of the order. |
tax_lines | A list of all tax lines applied to line items on the order, before returns. Tax line prices represent the total price for all tax lines with the same rate and title. |
customer | The customer that placed the order. |
shipping_address | The shipping address on the order. |
shipping_groups | The list of shipping group of the order. Each group contains line items that are fulfilled together. |
Shipping group object
Property | Description |
---|---|
destination | Destination of the the products being shipped |
products | A list of products being shipped. |
Line item object
Property | Description |
---|---|
id | The id of the line item. |
name | The title of the product, optionally appended with the title of the variant (if applicable). |
variant_title | The title of the variant at time of order creation. |
price | The unit price of the line item when the order was created. This value doesn't include discounts. |
is_gift_card | Whether the line item represents the purchase of a gift card. |
discount | The total discount that have been allocated to the line item by discount applications, including discounts allocated to refunded and removed quantities. |
total_price | The total for this line item. |
tax_rates | The tax lines for this line item. |
custom_attributes | A list of attributes that represent custom features or special requests. |
variant_title | The variant title. |
variant_id | The id of the variant. |
variant_metafields | A list of custom fields that a merchant associated with the variant. |
staff_member_description | Staff member attributed to the line item. |
product_metafields | A list of custom fields that a merchant associated with the product. |
Receipt filters
Property | Description |
---|---|
t | Translates predefined labels into the correct language. |
money | Formats the price in your location's currency. |
escape |
Escapes special characters in HTML, such as <> , ' , and & , and converts characters into escape sequences.
|
barcode | Generates a 1D barcode SVG. |
qrcode | Generates a 2D barcode SVG. |
Reset your receipt template
You can reset a template to the original version in the Liquid editor:
Steps:
From your Shopify admin, go to Settings > Apps and sales channels.
Click Point of sale.
Click Open sales channel.
Click Settings > Receipt Customization.
Click
> Edit code.
In the Receipts folder, click the Reset the file to default button next to the template that you want to reset.
Click Reset.