Skip to content
Log in

Create a POS cart print template

On this page

Cart print templates let staff print a summary of the current POS cart before an order is completed. This is useful for producing customer quotes, approval documents, or layby estimates.

Cart templates use the same Liquid and print markup syntax as receipt templates, but receive the current cart as their data context instead of a completed order.

Add a cart template

  1. In Salesforce, open POS Settings for your store.
  2. On the Printer Templates tab, find the Cart template setting.
  3. Click New or select an existing template record to edit.
  4. Give the template a Name.
  5. Set Printer Type to Receipt, Document, or Label depending on your output method.
  6. Set Context to Cart.
  7. Enter your Liquid template in the Content field. A sample is provided below.
  8. Click Save.
  9. Under Cart template, select the template you just saved.

Sample cart template (thermal receipt)

liquid {document word-wrap=true} {center} {bold} QUOTE {endBold} {line} {left} {table cols=2 margin=1 align=[left,right] row=["Date","{{ 'now' | date: "%d/%m/%Y" }}"] {% if current_cart.contact %} row=["Customer","{{ current_cart.contact.name }}"] {% endif %} } {line} {bold} {table cols=3 margin=1 align=[left,right,right] width=[*,4,8] row=["Item","Qty","Price"] } {endBold} {rule} {table cols=3 margin=1 align=[left,right,right] width=[*,4,8] {% for item in current_cart.items %} row=["{{ item.name }}", "{{ item.quantity }}", "{{ item.data.s_c__unit_price__c | money }}"] {% endfor %} } {rule} {bold} {table cols=2 margin=1 align=[left,right] width=[*,8] row=["Total","{{ current_cart.total | money }}"] } {endBold} {line} {center} This is a quote only. Prices subject to change.

Liquid context variables

Cart templates have access to the following Liquid variables:

Variable Description
current_cart.items Collection of items in the cart
current_cart.items[].name Item display name
current_cart.items[].quantity Item quantity
current_cart.items[].data.s_c__unit_price__c Item unit price (use | money filter to format)
current_cart.contact Contact assigned to the cart (may be nil)
current_cart.contact.name Customer name
current_cart.contact.email Customer email
current_cart.total Cart total
current_cart.item_count Total quantity across all items
current_cart.id Cart token

Trigger cart printing

Once a cart template is configured, add a print:cart action button to your POS layout. In a Pos_Action_Item__c record:

  • Action: print:cart
  • Params: leave empty to use the settings template. Supports two optional parameters:
    • print_template_sfid=<Salesforce ID> — overrides the settings template with a specific template
    • cart_sc_id=<Cart ID> — specifies a cart to print; if omitted, uses the current cart

See POS layouts for how to add action items to a layout.

:::note The cart must be loaded in the POS for printing to work. If no cart is active and no cart_sc_id is provided, the action exits silently. :::

Was this article helpful?

Was this article helpful?