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

#   Add custom user field to Order Number format

##

- **[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")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86289
- Thank you received: 14265
-
-

15 years 6 months ago [\#13567](#13567) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Add custom user field to Order Number format](/forum/4-how-to/13407-add-custom-user-field-to-order-number-format?start=20#13567 "Nicolas,  I have created a custom user field named &quot;Customer Number&quot;. This number matches our internal tracking system. Is there a way to include this field in the Custom Order Number Format? Ideally, my order number would be:  {customer&#95;no}-{full date of order}-{sequential ID}  I can get the date and ID just as I'd like them, but can't figure out how (if) I can include the customer number.  Thanks!!! Rick")*

Right. Loading all the data of the user everywhere it is needed is possible but that means changing all the queries...I let you have fun with that.
On our end we'll look at adding a new column in next version and store the number when the order is saved, it will be easier and avoid loading stuff everywhere for something no one else uses...

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

- **[momentis](/forum/user/364-momentis "View momentis's Profile")**
- [![momentis's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar364.jpg)](/forum/user/364-momentis "View momentis's Profile") Topic Author
- [ Offline](/forum/user/364-momentis)

Less More

- Posts: 202
- Thank you received: 2
-
-

15 years 6 months ago [\#13568](#13568) by [momentis](/forum/user/364-momentis "View momentis's Profile")  Replied by *[momentis](/forum/user/364-momentis "View momentis's Profile")* on topic *[Re: Add custom user field to Order Number format](/forum/4-how-to/13407-add-custom-user-field-to-order-number-format?start=20#13568 "Nicolas,  I have created a custom user field named &quot;Customer Number&quot;. This number matches our internal tracking system. Is there a way to include this field in the Custom Order Number Format? Ideally, my order number would be:  {customer&#95;no}-{full date of order}-{sequential ID}  I can get the date and ID just as I'd like them, but can't figure out how (if) I can include the customer number.  Thanks!!! Rick")*

Poop! Well, I am not going to try to mess with that. Much more than I want to tackle. I appreciate all of your help on this. Saving the order number makes sense to me, but that's only MY opinion!! ![:-)](/media/kunena/emoticons/9.png ":-)")

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

- **[momentis](/forum/user/364-momentis "View momentis's Profile")**
- [![momentis's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar364.jpg)](/forum/user/364-momentis "View momentis's Profile") Topic Author
- [ Offline](/forum/user/364-momentis)

Less More

- Posts: 202
- Thank you received: 2
-
-

15 years 6 months ago [\#13579](#13579) by [momentis](/forum/user/364-momentis "View momentis's Profile")  Replied by *[momentis](/forum/user/364-momentis "View momentis's Profile")* on topic *[Re: Add custom user field to Order Number format](/forum/4-how-to/13407-add-custom-user-field-to-order-number-format?start=20#13579 "Nicolas,  I have created a custom user field named &quot;Customer Number&quot;. This number matches our internal tracking system. Is there a way to include this field in the Custom Order Number Format? Ideally, my order number would be:  {customer&#95;no}-{full date of order}-{sequential ID}  I can get the date and ID just as I'd like them, but can't figure out how (if) I can include the customer number.  Thanks!!! Rick")*

Just to pick your brain - can you think of any way I can get a field somewhere that can be used like this, that WOULD be available? Even if I have to populate it from the db when I add a new user?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzEzNDA3LWFkZC1jdXN0b20tdXNlci1maWVsZC10by1vcmRlci1udW1iZXItZm9ybWF0P3N0YXJ0PTIwJnRtcGw9bWFya2Rvd24=) 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")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86289
- Thank you received: 14265
-
-

15 years 6 months ago [\#13581](#13581) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Add custom user field to Order Number format](/forum/4-how-to/13407-add-custom-user-field-to-order-number-format?start=20#13581 "Nicolas,  I have created a custom user field named &quot;Customer Number&quot;. This number matches our internal tracking system. Is there a way to include this field in the Custom Order Number Format? Ideally, my order number would be:  {customer&#95;no}-{full date of order}-{sequential ID}  I can get the date and ID just as I'd like them, but can't figure out how (if) I can include the customer number.  Thanks!!! Rick")*

As I said, the modification I proposed allows you to use custom order fields in that way. So you can just create a custom order field which would be displayed on the checkout and that the user could fill or that you could prefill in the view.
Also if you wait for next release, you will be able to do that with custom user fields.

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

- **[momentis](/forum/user/364-momentis "View momentis's Profile")**
- [![momentis's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar364.jpg)](/forum/user/364-momentis "View momentis's Profile") Topic Author
- [ Offline](/forum/user/364-momentis)

Less More

- Posts: 202
- Thank you received: 2
-
-

15 years 6 months ago [\#13582](#13582) by [momentis](/forum/user/364-momentis "View momentis's Profile")  Replied by *[momentis](/forum/user/364-momentis "View momentis's Profile")* on topic *[Re: Add custom user field to Order Number format](/forum/4-how-to/13407-add-custom-user-field-to-order-number-format?start=20#13582 "Nicolas,  I have created a custom user field named &quot;Customer Number&quot;. This number matches our internal tracking system. Is there a way to include this field in the Custom Order Number Format? Ideally, my order number would be:  {customer&#95;no}-{full date of order}-{sequential ID}  I can get the date and ID just as I'd like them, but can't figure out how (if) I can include the customer number.  Thanks!!! Rick")*

Okay, I will wait for the next release!!

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

- **[momentis](/forum/user/364-momentis "View momentis's Profile")**
- [![momentis's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar364.jpg)](/forum/user/364-momentis "View momentis's Profile") Topic Author
- [ Offline](/forum/user/364-momentis)

Less More

- Posts: 202
- Thank you received: 2
-
-

15 years 5 months ago [\#15784](#15784) by [momentis](/forum/user/364-momentis "View momentis's Profile")  Replied by *[momentis](/forum/user/364-momentis "View momentis's Profile")* on topic *[Re: Add custom user field to Order Number format](/forum/4-how-to/13407-add-custom-user-field-to-order-number-format?start=20#15784 "Nicolas,  I have created a custom user field named &quot;Customer Number&quot;. This number matches our internal tracking system. Is there a way to include this field in the Custom Order Number Format? Ideally, my order number would be:  {customer&#95;no}-{full date of order}-{sequential ID}  I can get the date and ID just as I'd like them, but can't figure out how (if) I can include the customer number.  Thanks!!! Rick")*

nicolas,

Just checking in to see if you may have an idea when the change you mention might be implemented? Just curious!!

Rick

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzEzNDA3LWFkZC1jdXN0b20tdXNlci1maWVsZC10by1vcmRlci1udW1iZXItZm9ybWF0P3N0YXJ0PTIwJnRtcGw9bWFya2Rvd24=) 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")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86289
- Thank you received: 14265
-
-

15 years 5 months ago [\#15806](#15806) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Add custom user field to Order Number format](/forum/4-how-to/13407-add-custom-user-field-to-order-number-format?start=20#15806 "Nicolas,  I have created a custom user field named &quot;Customer Number&quot;. This number matches our internal tracking system. Is there a way to include this field in the Custom Order Number Format? Ideally, my order number would be:  {customer&#95;no}-{full date of order}-{sequential ID}  I can get the date and ID just as I'd like them, but can't figure out how (if) I can include the customer number.  Thanks!!! Rick")*

We forgot about it. I just added it and it will be available in the 1.5.0

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

- **[momentis](/forum/user/364-momentis "View momentis's Profile")**
- [![momentis's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar364.jpg)](/forum/user/364-momentis "View momentis's Profile") Topic Author
- [ Offline](/forum/user/364-momentis)

Less More

- Posts: 202
- Thank you received: 2
-
-

15 years 4 months ago [\#17785](#17785) by [momentis](/forum/user/364-momentis "View momentis's Profile")  Replied by *[momentis](/forum/user/364-momentis "View momentis's Profile")* on topic *[Re: Add custom user field to Order Number format](/forum/4-how-to/13407-add-custom-user-field-to-order-number-format?start=20#17785 "Nicolas,  I have created a custom user field named &quot;Customer Number&quot;. This number matches our internal tracking system. Is there a way to include this field in the Custom Order Number Format? Ideally, my order number would be:  {customer&#95;no}-{full date of order}-{sequential ID}  I can get the date and ID just as I'd like them, but can't figure out how (if) I can include the customer number.  Thanks!!! Rick")*

nicolas,

I just downloaded and upgraded from 1.4.9 to 1.5.1

Is this feature in the newest release?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzEzNDA3LWFkZC1jdXN0b20tdXNlci1maWVsZC10by1vcmRlci1udW1iZXItZm9ybWF0P3N0YXJ0PTIwJnRtcGw9bWFya2Rvd24=) 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")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86289
- Thank you received: 14265
-
-

15 years 4 months ago [\#17789](#17789) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Add custom user field to Order Number format](/forum/4-how-to/13407-add-custom-user-field-to-order-number-format?start=20#17789 "Nicolas,  I have created a custom user field named &quot;Customer Number&quot;. This number matches our internal tracking system. Is there a way to include this field in the Custom Order Number Format? Ideally, my order number would be:  {customer&#95;no}-{full date of order}-{sequential ID}  I can get the date and ID just as I'd like them, but can't figure out how (if) I can include the customer number.  Thanks!!! Rick")*

Yes. You should be able to add tags like that:
{user custom_field_column_name}

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

- **[momentis](/forum/user/364-momentis "View momentis's Profile")**
- [![momentis's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar364.jpg)](/forum/user/364-momentis "View momentis's Profile") Topic Author
- [ Offline](/forum/user/364-momentis)

Less More

- Posts: 202
- Thank you received: 2
-
-

15 years 4 months ago [\#17792](#17792) by [momentis](/forum/user/364-momentis "View momentis's Profile")  Replied by *[momentis](/forum/user/364-momentis "View momentis's Profile")* on topic *[Re: Add custom user field to Order Number format](/forum/4-how-to/13407-add-custom-user-field-to-order-number-format?start=20#17792 "Nicolas,  I have created a custom user field named &quot;Customer Number&quot;. This number matches our internal tracking system. Is there a way to include this field in the Custom Order Number Format? Ideally, my order number would be:  {customer&#95;no}-{full date of order}-{sequential ID}  I can get the date and ID just as I'd like them, but can't figure out how (if) I can include the customer number.  Thanks!!! Rick")*

Thanks, nicolas!!! You guys are the best!

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

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

Less More

- Posts: 7
- Thank you received: 1
-
-

13 years 6 months ago [\#100078](#100078) by [geg](/forum/user/8031-geg "View geg's Profile")  Replied by *[geg](/forum/user/8031-geg "View geg's Profile")* on topic *[Re: Add custom user field to Order Number format](/forum/4-how-to/13407-add-custom-user-field-to-order-number-format?start=20#100078 "Nicolas,  I have created a custom user field named &quot;Customer Number&quot;. This number matches our internal tracking system. Is there a way to include this field in the Custom Order Number Format? Ideally, my order number would be:  {customer&#95;no}-{full date of order}-{sequential ID}  I can get the date and ID just as I'd like them, but can't figure out how (if) I can include the customer number.  Thanks!!! Rick")*

Hi Nicolas,

Would one way to address this issue be to provide a function that translates order_number to order_id?

Anyway, I find I need such a function, or alternatively, get_by_number() as alternative to $orderClass-&gt;get(). Does it exist, or suggestions?

Cheers,
/george

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzEzNDA3LWFkZC1jdXN0b20tdXNlci1maWVsZC10by1vcmRlci1udW1iZXItZm9ybWF0P3N0YXJ0PTIwJnRtcGw9bWFya2Rvd24=) 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")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86289
- Thank you received: 14265
-
-

13 years 6 months ago [\#100081](#100081) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Add custom user field to Order Number format](/forum/4-how-to/13407-add-custom-user-field-to-order-number-format?start=20#100081 "Nicolas,  I have created a custom user field named &quot;Customer Number&quot;. This number matches our internal tracking system. Is there a way to include this field in the Custom Order Number Format? Ideally, my order number would be:  {customer&#95;no}-{full date of order}-{sequential ID}  I can get the date and ID just as I'd like them, but can't figure out how (if) I can include the customer number.  Thanks!!! Rick")*

The hikashop_decode function can be used to revert order_numbers to order_ids.

The following user(s) said Thank You: [geg](/forum/user/8031-geg "View geg's Profile")

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

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

Less More

- Posts: 7
- Thank you received: 1
-
-

13 years 6 months ago [\#100193](#100193) by [geg](/forum/user/8031-geg "View geg's Profile")  Replied by *[geg](/forum/user/8031-geg "View geg's Profile")* on topic *[Re: Add custom user field to Order Number format](/forum/4-how-to/13407-add-custom-user-field-to-order-number-format?start=20#100193 "Nicolas,  I have created a custom user field named &quot;Customer Number&quot;. This number matches our internal tracking system. Is there a way to include this field in the Custom Order Number Format? Ideally, my order number would be:  {customer&#95;no}-{full date of order}-{sequential ID}  I can get the date and ID just as I'd like them, but can't figure out how (if) I can include the customer number.  Thanks!!! Rick")*

Thanks Nicolas, As usual, very prompt response, right on the mark. Worked perfectly ![:)](/media/kunena/emoticons/8.png ":)").

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

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

[](#top)
