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

#   save custom fields in checkout to user table

##

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

Less More

- Posts: 6
- Thank you received: 0
-
-

14 years 11 months ago [\#31712](#31712) by [Biotechnology](/forum/user/4733-biotechnology "View Biotechnology's Profile")  *[save custom fields in checkout to user table](/forum/4-how-to/31712-save-custom-fields-in-checkout-to-user-table#31712 "Hello,  I created a custom field, referee, in user table. My client required me to display an editable field during checkout for the first order and save this field to referee column in user table when submitting the order. Checkout process seemed to only deal with the custom field created in order table. Is there a way I can do this? Any hint is welcome.")* was created by *[Biotechnology](/forum/user/4733-biotechnology "View Biotechnology's Profile")*

Hello,

I created a custom field, referee, in user table. My client required me to display an editable field during checkout for the first order and save this field to referee column in user table when submitting the order. Checkout process seemed to only deal with the custom field created in order table. Is there a way I can do this? Any hint is welcome.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzMxNzEyLXNhdmUtY3VzdG9tLWZpZWxkcy1pbi1jaGVja291dC10by11c2VyLXRhYmxlP3RtcGw9bWFya2Rvd24=) 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?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86357
- Thank you received: 14289
-
-

14 years 11 months ago [\#31732](#31732) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: save custom fields in checkout to user table](/forum/4-how-to/31712-save-custom-fields-in-checkout-to-user-table#31732 "Hello,  I created a custom field, referee, in user table. My client required me to display an editable field during checkout for the first order and save this field to referee column in user table when submitting the order. Checkout process seemed to only deal with the custom field created in order table. Is there a way I can do this? Any hint is welcome.")*

Hi,

If you create a custom field of the table user, it will only be displayed when the user registers and then the user won't have to enter it next time he will order as he will be able to log in. There is nothing else to do from what I understand.

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

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

Less More

- Posts: 6
- Thank you received: 0
-
-

14 years 11 months ago [\#31745](#31745) by [Biotechnology](/forum/user/4733-biotechnology "View Biotechnology's Profile")  Replied by *[Biotechnology](/forum/user/4733-biotechnology "View Biotechnology's Profile")* on topic *[Re: save custom fields in checkout to user table](/forum/4-how-to/31712-save-custom-fields-in-checkout-to-user-table#31745 "Hello,  I created a custom field, referee, in user table. My client required me to display an editable field during checkout for the first order and save this field to referee column in user table when submitting the order. Checkout process seemed to only deal with the custom field created in order table. Is there a way I can do this? Any hint is welcome.")*

Nicolas,

Thanks for the reply. my requirement is to have an editable field displayed during checkout and when the order is submitted, the value of this field will be saved into a field in user table I previously created. I know normally, the custom field created for checkout can be saved into order table, but instead of saving it into order table, I want to save it into user table - only for the first order the user created.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzMxNzEyLXNhdmUtY3VzdG9tLWZpZWxkcy1pbi1jaGVja291dC10by11c2VyLXRhYmxlP3RtcGw9bWFya2Rvd24=) 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?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86357
- Thank you received: 14289
-
-

14 years 11 months ago [\#31746](#31746) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: save custom fields in checkout to user table](/forum/4-how-to/31712-save-custom-fields-in-checkout-to-user-table#31746 "Hello,  I created a custom field, referee, in user table. My client required me to display an editable field during checkout for the first order and save this field to referee column in user table when submitting the order. Checkout process seemed to only deal with the custom field created in order table. Is there a way I can do this? Any hint is welcome.")*

You're talking about a custom field of the table "order", which is indeed saved in the order table.
However, I'm talking about a custom field of the table "user" which is saved in the user table, as you want.

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

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

Less More

- Posts: 6
- Thank you received: 0
-
-

14 years 11 months ago [\#31749](#31749) by [Biotechnology](/forum/user/4733-biotechnology "View Biotechnology's Profile")  Replied by *[Biotechnology](/forum/user/4733-biotechnology "View Biotechnology's Profile")* on topic *[Re: save custom fields in checkout to user table](/forum/4-how-to/31712-save-custom-fields-in-checkout-to-user-table#31749 "Hello,  I created a custom field, referee, in user table. My client required me to display an editable field during checkout for the first order and save this field to referee column in user table when submitting the order. Checkout process seemed to only deal with the custom field created in order table. Is there a way I can do this? Any hint is welcome.")*

I am talking about having a text field displayed in the front-end checkout screen (the screen having payment/billing address/order) but being saved into user table.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzMxNzEyLXNhdmUtY3VzdG9tLWZpZWxkcy1pbi1jaGVja291dC10by11c2VyLXRhYmxlP3RtcGw9bWFya2Rvd24=) 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?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86357
- Thank you received: 14289
-
-

14 years 11 months ago [\#31768](#31768) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: save custom fields in checkout to user table](/forum/4-how-to/31712-save-custom-fields-in-checkout-to-user-table#31768 "Hello,  I created a custom field, referee, in user table. My client required me to display an editable field during checkout for the first order and save this field to referee column in user table when submitting the order. Checkout process seemed to only deal with the custom field created in order table. Is there a way I can do this? Any hint is welcome.")*

Yes. Me too. You can do that with a custom field of the table "user".

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

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

Less More

- Posts: 6
- Thank you received: 0
-
-

14 years 11 months ago [\#31777](#31777) by [Biotechnology](/forum/user/4733-biotechnology "View Biotechnology's Profile")  Replied by *[Biotechnology](/forum/user/4733-biotechnology "View Biotechnology's Profile")* on topic *[Re: save custom fields in checkout to user table](/forum/4-how-to/31712-save-custom-fields-in-checkout-to-user-table#31777 "Hello,  I created a custom field, referee, in user table. My client required me to display an editable field during checkout for the first order and save this field to referee column in user table when submitting the order. Checkout process seemed to only deal with the custom field created in order table. Is there a way I can do this? Any hint is welcome.")*

But if I create a custom field in user table, it only show up in registration screen. It won't show up in the checkout screen. How can I make it show up in the checkout screen?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzMxNzEyLXNhdmUtY3VzdG9tLWZpZWxkcy1pbi1jaGVja291dC10by11c2VyLXRhYmxlP3RtcGw9bWFya2Rvd24=) 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?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86357
- Thank you received: 14289
-
-

14 years 11 months ago [\#31814](#31814) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: save custom fields in checkout to user table](/forum/4-how-to/31712-save-custom-fields-in-checkout-to-user-table#31814 "Hello,  I created a custom field, referee, in user table. My client required me to display an editable field during checkout for the first order and save this field to referee column in user table when submitting the order. Checkout process seemed to only deal with the custom field created in order table. Is there a way I can do this? Any hint is welcome.")*

When you're not logged in and that you checkout, you will see it on your checkout, in the registration area (so the first time you make an order as a customer and that you have to create an account).

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

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

Less More

- Posts: 10
- Thank you received: 0
-
-

14 years 4 months ago -  14 years 4 months ago [\#53387](#53387) by [marloesborker](/forum/user/5684-marloesborker "View marloesborker's Profile")  Replied by *[marloesborker](/forum/user/5684-marloesborker "View marloesborker's Profile")* on topic *[Re: save custom fields in checkout to user table](/forum/4-how-to/31712-save-custom-fields-in-checkout-to-user-table#53387 "Hello,  I created a custom field, referee, in user table. My client required me to display an editable field during checkout for the first order and save this field to referee column in user table when submitting the order. Checkout process seemed to only deal with the custom field created in order table. Is there a way I can do this? Any hint is welcome.")*

I need the same. I need some custom User fields (i.e. measurements) that are:
- stored in the user profile
- showed in the check-out process
- can be updated during check-out and stored back to the user profile

Preferably on a separate step in the check-out process.

I do not mind to do some programming if you could point me in the right direction.
EDIT: i.e. show fields on FIELDS step with a link to the registration page would be a start

Thanks in andvance

Last edit: 14 years 4 months ago by [marloesborker](/forum/user/5684-marloesborker "View marloesborker's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzMxNzEyLXNhdmUtY3VzdG9tLWZpZWxkcy1pbi1jaGVja291dC10by11c2VyLXRhYmxlP3RtcGw9bWFya2Rvd24=) 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?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86357
- Thank you received: 14289
-
-

14 years 4 months ago [\#53495](#53495) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: save custom fields in checkout to user table](/forum/4-how-to/31712-save-custom-fields-in-checkout-to-user-table#53495 "Hello,  I created a custom field, referee, in user table. My client required me to display an editable field during checkout for the first order and save this field to referee column in user table when submitting the order. Checkout process seemed to only deal with the custom field created in order table. Is there a way I can do this? Any hint is welcome.")*

The fields step by be edited via the menu Display-&gt;Views. Search for "fields".
You will have to load the user information via the function :
$user = hikashop_loadUser(true);

Which should contain the custom data.
With the latest version of HikaShop, custom user fields should be displayed on the user profile edition page thanks to the user synchronization plugin.

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

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

Less More

- Posts: 10
- Thank you received: 0
-
-

14 years 4 months ago [\#53537](#53537) by [marloesborker](/forum/user/5684-marloesborker "View marloesborker's Profile")  Replied by *[marloesborker](/forum/user/5684-marloesborker "View marloesborker's Profile")* on topic *[Re: save custom fields in checkout to user table](/forum/4-how-to/31712-save-custom-fields-in-checkout-to-user-table#53537 "Hello,  I created a custom field, referee, in user table. My client required me to display an editable field during checkout for the first order and save this field to referee column in user table when submitting the order. Checkout process seemed to only deal with the custom field created in order table. Is there a way I can do this? Any hint is welcome.")*

Thanks, I understand the concept. I need a bit more help though:

1. How do I display the specific user fields, assuming they all start with m_ (i.e. m_body_length, m_waist_length). I would like to use the foreach construct to loop through them and put them in a table, just like the custom fields are processed in the default view.

something like:

$user = hikashop_loadUser(true);
foreach($user-&gt;Fields as $field *...filter on fieldname starts with 'm\_'...*
{
*...create table rows containing label and value...*
}

2. How do I make them editable in this step, just like the custom fields are.

Sorry, I'm a c# man, just cannot figure out how to do it in php ![:(](/media/kunena/emoticons/22.png ":(")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzMxNzEyLXNhdmUtY3VzdG9tLWZpZWxkcy1pbi1jaGVja291dC10by11c2VyLXRhYmxlP3RtcGw9bWFya2Rvd24=) 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?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86357
- Thank you received: 14289
-
-

14 years 4 months ago [\#53610](#53610) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: save custom fields in checkout to user table](/forum/4-how-to/31712-save-custom-fields-in-checkout-to-user-table#53610 "Hello,  I created a custom field, referee, in user table. My client required me to display an editable field during checkout for the first order and save this field to referee column in user table when submitting the order. Checkout process seemed to only deal with the custom field created in order table. Is there a way I can do this? Any hint is welcome.")*

1. The custom user fields are only loaded in the login view. So you need to load the fields yourself:
$fieldsClass = hikashop_get('class.field');
$user = hikashop_loadUser(true);
$fields = $fieldsClass-&gt;getFields('frontcomp',$user,'user');
foreach($fields as $field ){
$namekey = $field-&gt;field_namekey;
if(substr($field-&gt;field_namekey,0,2)=='m_') echo $user-&gt;$namekey;
}

2. If you want to make them editable, you will have to use similar code to the custom_fields view file in your foreach.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzMxNzEyLXNhdmUtY3VzdG9tLWZpZWxkcy1pbi1jaGVja291dC10by11c2VyLXRhYmxlP3RtcGw9bWFya2Rvd24=) 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.130 seconds

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