Retrieving the VAT number from the customer record tax details into order printer

Topic summary

A user is attempting to display a customer’s VAT number from tax details on Order Printer invoices.

Proposed Solution:

  • Use Liquid code to access the VAT number:
    • {% if customer.tax_exemptions.size > 0 %}
    • VAT Number: {{ customer.tax_exemptions[0] }}
    • {% endif %}

Current Status:

  • The suggested code is not retrieving any data
  • Simplified attempts using {{ customer.tax_exemptions }} also return no results

Issue Remains Unresolved:
The discussion is ongoing with no working solution identified yet. The problem may involve incorrect Liquid syntax, data structure differences, or the VAT information being stored in a different field than customer.tax_exemptions.

Summarized with AI on October 24. AI used: claude-sonnet-4-5-20250929.

Is it possible to retrieve the VAT number stored in the customer tax details into order printer to put onto an invoice?

image

Hi,
Yes, it is possible to retrieve the VAT number from the customer’s tax information and include it in Order Printer invoices. In your Order Printer template, you can access the VAT number using Liquid like:

{% if customer.tax_exemptions.size > 0 %}
VAT Number: {{ customer.tax_exemptions[0] }}
{% endif %}

Hi, thanks for taking the time. It’s not pulling any data through. I have tried reducing it to simply {{ customer.tax_exemptions }} but still nothing.