Issues with Product Invoice Populating

Trying to get all my Product Invoice information to populate.

Can’t seem to include -

{{this.customer.shippingaddress}}
{this.customer.shippingcity}}
{{this.customer.shippingstate}}
{{this.customer.shippingcountry}}
{{this.customer.shippingzipcodepostcode}}

I have also tried using this.order but it just isn’t working.

Also can’t get a custom field to render in this email. I’ve tried {{formSubmissionData.fields.custom.DownloadFile.value}} and {{this.DownloadFile}} but neither works.

Does anyone know how to workaround this?

Hi @SiroccoDigital

In the beta version I noticed that these fields where missing in the form itself. It was on the page but when I went to the form the fields was not there, so it didn’t seem the data would go anywhere. So at that time I just made my own adress, zipcode etc. fields. I reported this to Anastasia and I thought it was fixed.

I just kept the field that I had made with the default fields like “Address”, “Phone”, “City” etc. and in my invoice I reference them as:

{{this.customer.address}}
{{this.customer.zipCode}}
{{this.customer.city}}

etc.

Regarding the custom fields, this has been reported to @Anastasia_old, since I noticed this as well when I wanted to add a custom field to the mail.

If you want to see all the data in the email put in <pre>{{this}}</pre> :+1:

I think the default address fields in the checkout form (ie: Payment_ShippingAddress, Payment_ShippingAddress, Payment_ShippingCity, Payment_ShippingState, etc…) will be required even though they aren’t part of the Form setup.
The address values of these fields are still being captured, but they go to the Order, not the customer record. And you can see this data captured in the Workflow and Autoresponder emails.
It is however missing from the Invoice Liquid output so I think that is the bug here and it just needs to be included in the Liquid object. Probably under {{this.order…}}

So, if you make your own custom address fields now as a workaround, it may cause issues later as address details probably aren’t being captured against the actual order???

1 Like

You are (as always) absolutely correct @Adam.Wilson :+1:
I did this as a workaround since it didn’t work at the time and obviously still doesn’t (fully).

The site I have done this on is one of our own, so the only difference I see is that the address will not be under “details” in the order, but under the “form submission” tab on the same “page”. Are you seeing other problems by doing this at the time? :slight_smile:

I guess I should have stated more clearly that this is a workaround, when the output is working it would of course be the best way to use the “included” fields, but I need this shop up and running very soon, so I just did this as a workaround :slight_smile:

Yeah, I understand. It’ll do the job as a workaround for now and I don’t see any major issues in the short term.

1 Like

The other bug/issue here is that custom fields in the form don’t seem to be available in the invoice layout, which would be handy.

Exactly - @Anastasia_old is aware of this bug :+1:

We will fix it in this sprint

1 Like