I have a custom field in liquid in the product details page that I need to capture in the “invoice notification” template. In the admin I click “Send Invoice” and it will display the title and what I really need is the title and the custom field.
Cost Center CodeExample: Entity/Cost Center Code/Sub Account (XX.XXXXXX.XXXXXXX)
Where in the template do I put this code and how should it be formatted?
I was trying to work out what you meant here. I think the code you posted is from your website(?). You can’t use this code in your invoice template.
You need to figure out where exactly, this form field is stored in Shopify - not how it’s captured on your page. Most likely, it’s in a metafield - perhaps an order metafield?
If so you can add to your Invoice template with the following liquid code, but you’ll need to know what the metafield is called and the namespace (the default is ‘custom’)
{{ order.metafields.custom.your-metafield }}
Where in the template you put the code, depends on where you want it to show, you mentioned next to the title? You should be able to find
this liquid and put it after that: {{ email_title }}
Once you’re able to actually show the metafield on the email, you can play around with moving around and previewing as you go.