Skip to content
ZenoCloud Call

How to Add Order ID and IP Address in Invoice in Magento 2?

Learn how to add order ID and customer IP address information to invoices in Magento 2 for better tracking and record-keeping.

First written in 2022. Things may have changed since.

Introduction

Adding additional information like Order ID and IP address to your Magento 2 invoices can help with order tracking, fraud prevention, and record-keeping.

Step-by-Step Guide

To add Order ID and IP address to your invoice template in Magento 2:

  • Navigate to Admin Panel and go to Marketing → Communications → Email Templates
  • Find the Sales Invoice template
  • Edit the template and add the following variables:

Adding Order ID

Add the following code to your invoice template:

Code implementation available in the full documentation.

Adding IP Address

To display the customer's IP address in the invoice:

Code implementation available in the full documentation.

Benefits

  • Better order tracking and management
  • Enhanced security and fraud detection
  • Improved customer service with detailed records
  • Compliance with business requirements

Conclusion

By adding Order ID and IP address to your Magento 2 invoices, you can maintain better control over your orders and enhance the security of your store.

Next step

Run Magento on infrastructure built for it.

See Magento hosting

Related services

Browse all field notes
Quote request

What should we quote?

Your name, number and what you need. We reply within one business day.