[Skip to main content](#vessel-content)

#   Custom fields in confirmations email

##

- **[Webteur](/forum/user/38209-webteur "View Webteur's Profile")**
- [![Webteur's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/38209-webteur "View Webteur's Profile") Topic Author
- [ Offline](/forum/user/38209-webteur)

Less More

- Posts: 18
- Thank you received: 0
-
-

11 years 2 months ago -  11 years 1 month ago [\#212273](#212273) by [Webteur](/forum/user/38209-webteur "View Webteur's Profile")  *[Custom fields in confirmations email](/forum/25-install-update/878899-custom-fields-in-confirmations-email#212273 "-- HikaShop version -- : 2.5.0  How do I set extra custom fields to tabel address are also visible in the confirmation email.")* was created by *[Webteur](/forum/user/38209-webteur "View Webteur's Profile")*

-- HikaShop version -- : 2.5.0

How do I set extra custom fields to tabel address are also visible in the confirmation email.

Last edit: 11 years 1 month ago by [nicolas](/forum/user/63-nicolas "View nicolas's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2luc3RhbGwtdXBkYXRlLzg3ODg5OS1jdXN0b20tZmllbGRzLWluLWNvbmZpcm1hdGlvbnMtZW1haWw/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86290
- Thank you received: 14266
-
-

11 years 2 months ago -  11 years 1 month ago [\#212278](#212278) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Custom fields in confirmations email](/forum/25-install-update/878899-custom-fields-in-confirmations-email#212278 "-- HikaShop version -- : 2.5.0  How do I set extra custom fields to tabel address are also visible in the confirmation email.")*

Hi,

To create custom address fields, you can go in the menu Display&gt;Custom fields.
To have them display in your checkout, invoice, and emails, you want to edit the file "address_template" of both your backend and frontend template via the menu Display&gt;Views and add the corresponding tag like for the other custom fields already there.

Last edit: 11 years 1 month ago by [nicolas](/forum/user/63-nicolas "View nicolas's Profile").

The following user(s) said Thank You: [Webteur](/forum/user/38209-webteur "View Webteur's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2luc3RhbGwtdXBkYXRlLzg3ODg5OS1jdXN0b20tZmllbGRzLWluLWNvbmZpcm1hdGlvbnMtZW1haWw/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[toolie](/forum/user/7581-toolie "View toolie's Profile")**
- [![toolie's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar_2013-01-21.png)](/forum/user/7581-toolie "View toolie's Profile")
- [ Offline](/forum/user/7581-toolie)

Less More

- Posts: 54
- Thank you received: 1
-
-

11 years 1 month ago [\#213542](#213542) by [toolie](/forum/user/7581-toolie "View toolie's Profile")  Replied by *[toolie](/forum/user/7581-toolie "View toolie's Profile")* on topic *[Custom fields in confirmations email](/forum/25-install-update/878899-custom-fields-in-confirmations-email#213542 "-- HikaShop version -- : 2.5.0  How do I set extra custom fields to tabel address are also visible in the confirmation email.")*

Two questions:

1. Will custom fields added to the **User** section show up in an **address\_template**? I need my client's two **user-based custom fields to appear on the Order confirmation email.**
2. Can you edit the TITLE of the 1st and 2nds threads so that it says Custom **fields** instead of Custom Fileds? I almost didn't find this question in my search.

Thanks,

Toolie

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2luc3RhbGwtdXBkYXRlLzg3ODg5OS1jdXN0b20tZmllbGRzLWluLWNvbmZpcm1hdGlvbnMtZW1haWw/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86290
- Thank you received: 14266
-
-

11 years 1 month ago [\#213586](#213586) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Custom fields in confirmations email](/forum/25-install-update/878899-custom-fields-in-confirmations-email#213586 "-- HikaShop version -- : 2.5.0  How do I set extra custom fields to tabel address are also visible in the confirmation email.")*

Hi,

1. No, they won't display in addres_template. Only custom address fields will.
For custom user fields, you want to add such tag in the email HTML version when you edit your emails via the menu System&gt;Emails:
{VAR:user.field_column}

2. I'll do that.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2luc3RhbGwtdXBkYXRlLzg3ODg5OS1jdXN0b20tZmllbGRzLWluLWNvbmZpcm1hdGlvbnMtZW1haWw/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[toolie](/forum/user/7581-toolie "View toolie's Profile")**
- [![toolie's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar_2013-01-21.png)](/forum/user/7581-toolie "View toolie's Profile")
- [ Offline](/forum/user/7581-toolie)

Less More

- Posts: 54
- Thank you received: 1
-
-

11 years 1 month ago [\#213752](#213752) by [toolie](/forum/user/7581-toolie "View toolie's Profile")  Replied by *[toolie](/forum/user/7581-toolie "View toolie's Profile")* on topic *[Custom fields in confirmations email](/forum/25-install-update/878899-custom-fields-in-confirmations-email#213752 "-- HikaShop version -- : 2.5.0  How do I set extra custom fields to tabel address are also visible in the confirmation email.")*

I discovered that I do have a field in the **Address** table containing the certificate number. But I'm still having trouble getting it to show up. The field name is "licensecertnum" and from the placeholders I'm seeing in the HTML email, it looks like I need the following to get the field caption and the field contents to display within the emails.

{TXT:ADDRESS\_LICENSECERTNUM}: {VAR:ADDRESS_LICENSECERTNUM}

Am I missing something?

Toolie

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2luc3RhbGwtdXBkYXRlLzg3ODg5OS1jdXN0b20tZmllbGRzLWluLWNvbmZpcm1hdGlvbnMtZW1haWw/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86290
- Thank you received: 14266
-
-

11 years 1 month ago [\#213760](#213760) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Custom fields in confirmations email](/forum/25-install-update/878899-custom-fields-in-confirmations-email#213760 "-- HikaShop version -- : 2.5.0  How do I set extra custom fields to tabel address are also visible in the confirmation email.")*

Hi,

For custom address fields, you need to edit the '"address_template" file for both your frontend and backend and you need to add a tag like the other address fields in that view file.
So if the column name is licensecertnum, the tag should be: {licensecertnum}

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2luc3RhbGwtdXBkYXRlLzg3ODg5OS1jdXN0b20tZmllbGRzLWluLWNvbmZpcm1hdGlvbnMtZW1haWw/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[toolie](/forum/user/7581-toolie "View toolie's Profile")**
- [![toolie's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar_2013-01-21.png)](/forum/user/7581-toolie "View toolie's Profile")
- [ Offline](/forum/user/7581-toolie)

Less More

- Posts: 54
- Thank you received: 1
-
-

11 years 1 month ago [\#213825](#213825) by [toolie](/forum/user/7581-toolie "View toolie's Profile")  Replied by *[toolie](/forum/user/7581-toolie "View toolie's Profile")* on topic *[Custom fields in confirmations email](/forum/25-install-update/878899-custom-fields-in-confirmations-email#213825 "-- HikaShop version -- : 2.5.0  How do I set extra custom fields to tabel address are also visible in the confirmation email.")*

Hi Nicolas, you'll notice that I followed the same capitalized placeholder model that I see in the HTML email code, but it didn't work, whether it was capitalized or not.

> you need to edit the '"address\_template" **file**

- Are you talking about the HTML version of the email (as we were above) or a different file? If it's a different file, can you give me the path and filename?
- I didn't capitalize the custom field, so it looks like you're telling me that I don't need the {VAR.user} prefix, but I can't be sure.

Please be as specific as possible. Thank you!

Toolie

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2luc3RhbGwtdXBkYXRlLzg3ODg5OS1jdXN0b20tZmllbGRzLWluLWNvbmZpcm1hdGlvbnMtZW1haWw/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26394
- Thank you received: 4078
-
- [](http://obsi.dev)
-

11 years 1 month ago [\#213843](#213843) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Custom fields in confirmations email](/forum/25-install-update/878899-custom-fields-in-confirmations-email#213843 "-- HikaShop version -- : 2.5.0  How do I set extra custom fields to tabel address are also visible in the confirmation email.")*

Hi,

Nicolas was talking about the views and not the files (but the views are also files...)
So if you need to modify your address template : please edit the view for your front-end and your backend templates.

For the custom field, you have to keep the VAR if you want to access a variable set in the email preload.
Now if you are pointing to a custom field, you need to specify the good name and you need to use the right syntax.
Just like explained in the previous post : [ www.hikashop.com/forum/install-update/87...ns-email.html#213586](http://www.hikashop.com/forum/install-update/878899-custom-fields-in-confirmations-email.html#213586)
So please read carefully the previous Nicolas' replies ; you can forgot the last one where he made some typo mistakes but your answer are already there in the previous messages.

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2luc3RhbGwtdXBkYXRlLzg3ODg5OS1jdXN0b20tZmllbGRzLWluLWNvbmZpcm1hdGlvbnMtZW1haWw/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[toolie](/forum/user/7581-toolie "View toolie's Profile")**
- [![toolie's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar_2013-01-21.png)](/forum/user/7581-toolie "View toolie's Profile")
- [ Offline](/forum/user/7581-toolie)

Less More

- Posts: 54
- Thank you received: 1
-
-

11 years 1 month ago -  11 years 1 month ago [\#213969](#213969) by [toolie](/forum/user/7581-toolie "View toolie's Profile")  Replied by *[toolie](/forum/user/7581-toolie "View toolie's Profile")* on topic *[Custom fields in confirmations email](/forum/25-install-update/878899-custom-fields-in-confirmations-email#213969 "-- HikaShop version -- : 2.5.0  How do I set extra custom fields to tabel address are also visible in the confirmation email.")*

Just so you know, Jerome, you're speaking to someone who as a professional technical writer has written Developer-level documentation for Microsoft and Amazon. I'm used to figuring things out, so if I am confused, other people reading this will be also. I'm thinking of their needs, not just my own.

The salient point left out here is WHERE one edits the address_template. The correct answer is:

1. In Hikashop, click the **Display** menu, then **Views**.
2. Select template you use for your web from the middle dropdown "**All templates**". That filters the available views for your particular template.
3. Click on **address\_template** to open the editor.
4. Insert the fieldname surrounded by curly braces at the location where you want the data to appear. Click **Save and Close** to save your work.

OK, that takes care of adding the field in the address_template (which subsequently appears on emails, invoices, etc), but it still doesn't help me with getting the custom fields into the invoice email. I still don't have a clear answer on how to include the custom fields.
[ ![&#91;img](http://fileexchange.s3.amazonaws.com/public/20150911-custom-fields.png) ](http://fileexchange.s3.amazonaws.com/public/20150911-custom-fields.png "&#91;img")

In looking at the Preload file, I see a variable called Code:

$customer

that appears to contain all of the customer data.
Code:

$customer = $data-&gt;customer;

Elsewhere I see things like:
Code:

$customer_name = @$customer-&gt;name;

Which leads me to believe that if I need to pull up the 2 User Custom Fields (licensetype and licensenum), I should add variables to this array:
Code:

$vars = array( 'LIVE_SITE' =&gt; HIKASHOP_LIVE, 'URL' =&gt; $order_url, 'order' =&gt; $data-&gt;cart, 'ORDER_PRODUCT_CODE' =&gt; (bool)$config-&gt;get('show_product_code', false), 'user' =&gt; $customer, 'billing_address' =&gt; @$data-&gt;cart-&gt;billing_address, 'shipping_address' =&gt; @$data-&gt;cart-&gt;shipping_address, 'customer_licentype' = @$customer-&gt;licensetype, 'customer_licennum' = @$customer-&gt;licensenum, );

**Am I on the right track to include these custom fields at this level? If not, what should the code be?**

I tried adding the custom field placeholders {field_name} in **Configuration \| Emails \| Order notification \| HTML Email** in the HTML email as {user.licensenum} and {user.licensetype} and Hikashop simply throws away the code and doesn't display anything. This procedure is not documented, and I'm beyond frustrated.

Can you advise?
Toolie

Last edit: 11 years 1 month ago by [toolie](/forum/user/7581-toolie "View toolie's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2luc3RhbGwtdXBkYXRlLzg3ODg5OS1jdXN0b20tZmllbGRzLWluLWNvbmZpcm1hdGlvbnMtZW1haWw/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86290
- Thank you received: 14266
-
-

11 years 1 month ago [\#213985](#213985) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Custom fields in confirmations email](/forum/25-install-update/878899-custom-fields-in-confirmations-email#213985 "-- HikaShop version -- : 2.5.0  How do I set extra custom fields to tabel address are also visible in the confirmation email.")*

Hi,

There is no need to modify the preload code of the email.
You can just use such tag in the HTML version of the email:
{VAR:user.licensenum}
if your custom user field's column name is licensenum
That's what I explained four days ago already: [ www.hikashop.com/forum/install-update/87...ns-email.html#213586](http://www.hikashop.com/forum/install-update/878899-custom-fields-in-confirmations-email.html#213586)

The tag format to use between the email HTML version and the address_template view file are not related to each other as one is an email and the other is a view file. The format is {field_name} in address_template for custom address fields, and {VAR:user.field_name} in the HTML version of the emails for custom user fields.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2luc3RhbGwtdXBkYXRlLzg3ODg5OS1jdXN0b20tZmllbGRzLWluLWNvbmZpcm1hdGlvbnMtZW1haWw/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop- Install &amp; Update- Product &amp; Category Display- Content Creation- Sales and Orders- - Orders management- - Reports &amp; Statistics- Customers- Checkout- Payment Methods- Shipping Methods- Import &amp; Export (CSV, XLS…)- Specific Features- - Affilation- - Taxes- - Wishlist- - Vote- - Carousel &amp; Slider- - Mass Actions- - Filters &amp; Search- - Discount &amp; Coupon- - Feature Request- Integrations- Showcase- General Talk about HikaShop- Development- - HikaShop 3.0 Beta- Translation- Commercial Jobs HikaShop Components- HikaMarket- - Market: Feature requests- - Market: How to?- - Market: Bug Report- HikaSerial- - General talk about HikaSerial- - Serial: Bug Report- - Serial: How to?- - Support en Français de HikaSerial (French Support)- - HikaSubscription- HikaAuction- - Auction: Feature requests- - Auction: How to?- - Auction: Bug report Hikashop around the world- Support en Français (French Support)- Russian- - FAQ. Курс выживания с Hikashop. Частые вопросы и о- - Расширения Hikashop- - Наши сайты на Hikashop- 日本語版サポート(Japanese Support)- Thai- German Archives- Bug Report- How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.258 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)

[](#top)
