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

#   Show custom field in invoices

##

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

Less More

- Posts: 145
- Thank you received: 6
-
-

5 years 3 months ago [\#335154](#335154) by [levelup](/forum/user/61801-levelup "View levelup's Profile")  *[Show custom field in invoices](/forum/27-checkout/903095-show-custom-field-in-invoices#335154 "-- HikaShop version -- : 4.4.3 -- Joomla version -- : 3.9.27 -- PHP version -- : 5.6  Hi I create a custom field with name &quot;user&#95;code&#95;melli&quot; in user table (attached picture 1). I add this to invoices in hikashop config -&gt; main -&gt; Checkout tab -&gt; ADDRESS &amp; SHIPPING section (attached picture 2).  but don't show anything. Thanks for your help")* was created by *[levelup](/forum/user/61801-levelup "View levelup's Profile")*

-- HikaShop version -- : 4.4.3
-- Joomla version -- : 3.9.27
-- PHP version -- : 5.6

Hi
I create a custom field with name "user_code_melli" in user table (attached picture 1).
I add this to invoices in hikashop config -&gt; main -&gt; Checkout tab -&gt; ADDRESS &amp; SHIPPING section (attached picture 2). Code:

{user_code_melli}

but don't show anything.
Thanks for your help

---

Life is the unique stage of our art. Everyone sings their own song and leaves the stage. The stage is always permanent. Blessed is that song that people remember.

- [ ![2.jpg](/forum/attachment/53419) ](/forum/attachment/53419 "2.jpg") [ ](/forum/attachment/53419?download=1 "2.jpg")
- [ ![1.jpg](/forum/attachment/53420) ](/forum/attachment/53420 "1.jpg") [ ](/forum/attachment/53420?download=1 "1.jpg")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0LzkwMzA5NS1zaG93LWN1c3RvbS1maWVsZC1pbi1pbnZvaWNlcz90bXBsPW1hcmtkb3du) 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: 86587
- Thank you received: 14327
-
-

5 years 3 months ago [\#335158](#335158) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Show custom field in invoices](/forum/27-checkout/903095-show-custom-field-in-invoices#335158 "-- HikaShop version -- : 4.4.3 -- Joomla version -- : 3.9.27 -- PHP version -- : 5.6  Hi I create a custom field with name &quot;user&#95;code&#95;melli&quot; in user table (attached picture 1). I add this to invoices in hikashop config -&gt; main -&gt; Checkout tab -&gt; ADDRESS &amp; SHIPPING section (attached picture 2).  but don't show anything. Thanks for your help")*

Hi,

You can only use custom fields of the "address" table in the "address format" setting.

If you want to add a custom user field in the invoice that you can get with the "invoice" button of your backend, you need to edit the file order / invoice.php via the menu Display&gt;Views and add such code: Code:

&lt;?php echo $this-&gt;element-&gt;customer-&gt;xxx; ?&gt;

where xxx is to be replaced by the column name of your custom user field "user_code_melli".

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

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

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

Less More

- Posts: 145
- Thank you received: 6
-
-

4 years 10 months ago [\#338812](#338812) by [levelup](/forum/user/61801-levelup "View levelup's Profile")  Replied by *[levelup](/forum/user/61801-levelup "View levelup's Profile")* on topic *[Show custom field in invoices](/forum/27-checkout/903095-show-custom-field-in-invoices#338812 "-- HikaShop version -- : 4.4.3 -- Joomla version -- : 3.9.27 -- PHP version -- : 5.6  Hi I create a custom field with name &quot;user&#95;code&#95;melli&quot; in user table (attached picture 1). I add this to invoices in hikashop config -&gt; main -&gt; Checkout tab -&gt; ADDRESS &amp; SHIPPING section (attached picture 2).  but don't show anything. Thanks for your help")*

Hi
I did this before in HikaShop 4.2.2 and it worked. But it seems that in HikaShop 4.4.5 has changed in Joomla 4. I can not find order / invoice.php via the menu Display&gt;Views.

---

Life is the unique stage of our art. Everyone sings their own song and leaves the stage. The stage is always permanent. Blessed is that song that people remember.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0LzkwMzA5NS1zaG93LWN1c3RvbS1maWVsZC1pbi1pbnZvaWNlcz90bXBsPW1hcmtkb3du) 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: 86587
- Thank you received: 14327
-
-

4 years 10 months ago [\#338818](#338818) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Show custom field in invoices](/forum/27-checkout/903095-show-custom-field-in-invoices#338818 "-- HikaShop version -- : 4.4.3 -- Joomla version -- : 3.9.27 -- PHP version -- : 5.6  Hi I create a custom field with name &quot;user&#95;code&#95;melli&quot; in user table (attached picture 1). I add this to invoices in hikashop config -&gt; main -&gt; Checkout tab -&gt; ADDRESS &amp; SHIPPING section (attached picture 2).  but don't show anything. Thanks for your help")*

Hi,

It's still there though.
Please double check.
Note also that you have filters on the top right corner of the listing.
If you have a filter on the frontend template, you won't see the view files of the backend like this one for example.

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

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

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

Less More

- Posts: 145
- Thank you received: 6
-
-

4 years 10 months ago [\#338839](#338839) by [levelup](/forum/user/61801-levelup "View levelup's Profile")  Replied by *[levelup](/forum/user/61801-levelup "View levelup's Profile")* on topic *[Show custom field in invoices](/forum/27-checkout/903095-show-custom-field-in-invoices#338839 "-- HikaShop version -- : 4.4.3 -- Joomla version -- : 3.9.27 -- PHP version -- : 5.6  Hi I create a custom field with name &quot;user&#95;code&#95;melli&quot; in user table (attached picture 1). I add this to invoices in hikashop config -&gt; main -&gt; Checkout tab -&gt; ADDRESS &amp; SHIPPING section (attached picture 2).  but don't show anything. Thanks for your help")*

i want show user custom field in front end invoice.

---

Life is the unique stage of our art. Everyone sings their own song and leaves the stage. The stage is always permanent. Blessed is that song that people remember.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0LzkwMzA5NS1zaG93LWN1c3RvbS1maWVsZC1pbi1pbnZvaWNlcz90bXBsPW1hcmtkb3du) 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: 86587
- Thank you received: 14327
-
-

4 years 10 months ago [\#338851](#338851) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Show custom field in invoices](/forum/27-checkout/903095-show-custom-field-in-invoices#338851 "-- HikaShop version -- : 4.4.3 -- Joomla version -- : 3.9.27 -- PHP version -- : 5.6  Hi I create a custom field with name &quot;user&#95;code&#95;melli&quot; in user table (attached picture 1). I add this to invoices in hikashop config -&gt; main -&gt; Checkout tab -&gt; ADDRESS &amp; SHIPPING section (attached picture 2).  but don't show anything. Thanks for your help")*

Hi,

What I gave before on this thread was for the invoice available in the backend.
For the invoice in the frontend, you need to do the same modification but in the view file order / show.php for your frontend template.

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

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

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

Less More

- Posts: 145
- Thank you received: 6
-
-

4 years 8 months ago -  4 years 8 months ago [\#339950](#339950) by [levelup](/forum/user/61801-levelup "View levelup's Profile")  Replied by *[levelup](/forum/user/61801-levelup "View levelup's Profile")* on topic *[Show custom field in invoices](/forum/27-checkout/903095-show-custom-field-in-invoices#339950 "-- HikaShop version -- : 4.4.3 -- Joomla version -- : 3.9.27 -- PHP version -- : 5.6  Hi I create a custom field with name &quot;user&#95;code&#95;melli&quot; in user table (attached picture 1). I add this to invoices in hikashop config -&gt; main -&gt; Checkout tab -&gt; ADDRESS &amp; SHIPPING section (attached picture 2).  but don't show anything. Thanks for your help")*

Hi
i was create user custom field named **user\_code\_melli** and want to show in backend-&gt; order-&gt; edit in **Customer** section. How can I do this? I think I should change the **order/show\_user.php** file.
I used this Code:

&lt;tr&gt;&lt;td&gt;&lt;?php echo $this-&gt;user-&gt;user_code_melli ?&gt;{user_code_melli}&lt;/td&gt;&lt;/tr&gt;

and that Code:

&lt;tr&gt;&lt;td&gt;&lt;?php echo JText::_('USER_CODE_MELLI').': '.$this-&gt;element-&gt;customer-&gt;user_code_melli; ?&gt;&lt;/td&gt;&lt;/tr&gt;

But it does not work. what code should I use?

---

Life is the unique stage of our art. Everyone sings their own song and leaves the stage. The stage is always permanent. Blessed is that song that people remember.

Last edit: 4 years 8 months ago by [levelup](/forum/user/61801-levelup "View levelup's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0LzkwMzA5NS1zaG93LWN1c3RvbS1maWVsZC1pbi1pbnZvaWNlcz90bXBsPW1hcmtkb3du) 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: 86587
- Thank you received: 14327
-
-

4 years 8 months ago -  4 years 8 months ago [\#339957](#339957) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Show custom field in invoices](/forum/27-checkout/903095-show-custom-field-in-invoices#339957 "-- HikaShop version -- : 4.4.3 -- Joomla version -- : 3.9.27 -- PHP version -- : 5.6  Hi I create a custom field with name &quot;user&#95;code&#95;melli&quot; in user table (attached picture 1). I add this to invoices in hikashop config -&gt; main -&gt; Checkout tab -&gt; ADDRESS &amp; SHIPPING section (attached picture 2).  but don't show anything. Thanks for your help")*

Hi,

Check the code already in order / show_user.php
You can see this line: Code:

&lt;td&gt;&lt;span id="hikashop_order_customer_name"&gt;&lt;?php echo @$this-&gt;order-&gt;customer-&gt;name; ?&gt;&lt;/span&gt;&lt;/td&gt;

or this one: Code:

&lt;td&gt;&lt;span id="hikashop_order_customer_email"&gt;&lt;?php echo @$this-&gt;order-&gt;customer-&gt;user_email; ?&gt;&lt;/span&gt;&lt;/td&gt;

So you can see that the user data is in $this-&gt;order-&gt;customer
So you can do this: Code:

&lt;tr class="hikashop_order_customer_melli"&gt; &lt;td class="key"&gt;&lt;label&gt;&lt;?php echo JText::_('USER_CODE_MELLI');?&gt;&lt;/label&gt;&lt;/td&gt; &lt;td&gt;&lt;span id="hikashop_order_customer_melli"&gt;&lt;?php echo @$this-&gt;order-&gt;customer-&gt;user_code_melli; ?&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt;

Last edit: 4 years 8 months ago by [nicolas](/forum/user/63-nicolas "View nicolas's Profile").

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

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

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