We have copied code over from Klaviyo to create a custom order confirmation email however, the order number is only pulling the last 4 digits. We are missing the first 5, which is confusing to customers. The way the code is now, the order number is {{ order.order_number }} I’ve also tried just {{ order_number }}. Do I need to add anything to pull in the first 5 digits?
Hi, @LaRose !
To display the full order number in your custom order confirmation email on Shopify, you should use the liquid filter {{ order.order_number | prepend: '#' }}
.
This filter prepends a “#” symbol to the order number and displays the full order number, including the first 5 digits.
So your code should look like this:
Order Number: {{ order.order_number | prepend: '#' }}
This should display the full order number in your custom order confirmation email.
Let me know if this helps!
Thank you! Is there a way to test this? On the preview it still has 4 digits but with the # sign in front.
I was able to test this and it still only shows the last 4 digits with a # preceding. Am I missing something? I’ve pasted the full line of code below
({{ order.order_number | prepend: ‘#’ }}<span