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

#   Custom field in email notification

##

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

Less More

- Posts: 267
- Thank you received: 5
-
-
-
-

7 years 4 months ago [\#308977](#308977) by [dvddvd](/forum/user/7721-dvddvd "View dvddvd's Profile")  Replied by *[dvddvd](/forum/user/7721-dvddvd "View dvddvd's Profile")* on topic *[Custom field in email notification](/forum/35-orders-management/876574-custom-field-in-email-notification?start=20#308977 "-- HikaShop version -- : 2.3.5 -- Joomla version -- : 2.5.11  Hi,  I'm only new to PHP and could use some help with adding custom fields to notification emails.  I'm trying to add a field from the item table to a notification email and am using the code . org&#95;member being the field I want to display. When I send a test email the field isn't displayed.  I'm guessing I need to add some additional code to the preload version to allow the table 'item' to be displayed. Can you tell me what the code should be and where it should be placed.  Regards - Rich")*

Muchas gracias Nicolas

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

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

Less More

- Posts: 267
- Thank you received: 5
-
-
-
-

7 years 3 months ago [\#308990](#308990) by [dvddvd](/forum/user/7721-dvddvd "View dvddvd's Profile")  Replied by *[dvddvd](/forum/user/7721-dvddvd "View dvddvd's Profile")* on topic *[Custom field in email notification](/forum/35-orders-management/876574-custom-field-in-email-notification?start=20#308990 "-- HikaShop version -- : 2.3.5 -- Joomla version -- : 2.5.11  Hi,  I'm only new to PHP and could use some help with adding custom fields to notification emails.  I'm trying to add a field from the item table to a notification email and am using the code . org&#95;member being the field I want to display. When I send a test email the field isn't displayed.  I'm guessing I need to add some additional code to the preload version to allow the table 'item' to be displayed. Can you tell me what the code should be and where it should be placed.  Regards - Rich")*

Thanks Nicolas,

And to make the same change in the custom fields in the order view of the administration?

[ ![Sinttulo-1&#95;2019-07-21.jpg](/forum/attachment/47317) ](/forum/attachment/47317 "...2019-07-21.jpg")

- [ ![Sinttulo-1&#95;2019-07-21.jpg](/forum/attachment/47317) ](/forum/attachment/47317 "...2019-07-21.jpg") [ ](/forum/attachment/47317?download=1 "...2019-07-21.jpg")

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

Less More

- Posts: 86575
- Thank you received: 14318
-
-

7 years 3 months ago [\#309002](#309002) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Custom field in email notification](/forum/35-orders-management/876574-custom-field-in-email-notification?start=20#309002 "-- HikaShop version -- : 2.3.5 -- Joomla version -- : 2.5.11  Hi,  I'm only new to PHP and could use some help with adding custom fields to notification emails.  I'm trying to add a field from the item table to a notification email and am using the code . org&#95;member being the field I want to display. When I send a test email the field isn't displayed.  I'm guessing I need to add some additional code to the preload version to allow the table 'item' to be displayed. Can you tell me what the code should be and where it should be placed.  Regards - Rich")*

Hi,

You would have to edit the file show_additional via the menu Display&gt;Views and change the line: Code:

&lt;td class="key"&gt;&lt;?php echo $this-&gt;fieldsClass-&gt;getFieldName($oneExtraField);?&gt;&lt;/td&gt;

to: Code:

&lt;td class="key"&gt;&lt;?php echo JText::_($oneExtraField-&gt;field_realname);?&gt;&lt;/td&gt;

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

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

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

Less More

- Posts: 267
- Thank you received: 5
-
-
-
-

7 years 3 months ago [\#309113](#309113) by [dvddvd](/forum/user/7721-dvddvd "View dvddvd's Profile")  Replied by *[dvddvd](/forum/user/7721-dvddvd "View dvddvd's Profile")* on topic *[Custom field in email notification](/forum/35-orders-management/876574-custom-field-in-email-notification?start=20#309113 "-- HikaShop version -- : 2.3.5 -- Joomla version -- : 2.5.11  Hi,  I'm only new to PHP and could use some help with adding custom fields to notification emails.  I'm trying to add a field from the item table to a notification email and am using the code . org&#95;member being the field I want to display. When I send a test email the field isn't displayed.  I'm guessing I need to add some additional code to the preload version to allow the table 'item' to be displayed. Can you tell me what the code should be and where it should be placed.  Regards - Rich")*

I need to change the name of the translation string to the real name of the custom fields in a couple of other sites, but I can't do it right:

1.- In the list of products
2.- On the editing screen of the custom field itself

[ ![Sinttulo-1&#95;2019-07-24-2.jpg](/forum/attachment/47347) ](/forum/attachment/47347 "...19-07-24-2.jpg")

[ ![Sinttulo-2&#95;2019-07-24-2.jpg](/forum/attachment/47346) ](/forum/attachment/47346 "...19-07-24-2.jpg")

- [ ![Sinttulo-2&#95;2019-07-24-2.jpg](/forum/attachment/47346) ](/forum/attachment/47346 "...19-07-24-2.jpg") [ ](/forum/attachment/47346?download=1 "...19-07-24-2.jpg")
- [ ![Sinttulo-1&#95;2019-07-24-2.jpg](/forum/attachment/47347) ](/forum/attachment/47347 "...19-07-24-2.jpg") [ ](/forum/attachment/47347?download=1 "...19-07-24-2.jpg")

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

Less More

- Posts: 86575
- Thank you received: 14318
-
-

7 years 3 months ago [\#309122](#309122) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Custom field in email notification](/forum/35-orders-management/876574-custom-field-in-email-notification?start=20#309122 "-- HikaShop version -- : 2.3.5 -- Joomla version -- : 2.5.11  Hi,  I'm only new to PHP and could use some help with adding custom fields to notification emails.  I'm trying to add a field from the item table to a notification email and am using the code . org&#95;member being the field I want to display. When I send a test email the field isn't displayed.  I'm guessing I need to add some additional code to the preload version to allow the table 'item' to be displayed. Can you tell me what the code should be and where it should be placed.  Regards - Rich")*

Hi,

1. In the file product / listing.php for your backend template, you want to change the line:
echo '&lt;td&gt;'.$this-&gt;fieldsClass-&gt;show($field,$row-&gt;$namekey).'&lt;/td&gt;';
to:
echo '&lt;td&gt;'.JText::_($row-&gt;$namekey).'&lt;/td&gt;';

2. You should not change that. Otherwise, if you save the custom field settings, it will remove the translation keys for the values and it will be refused so you won't be able to save the settings of the custom fields if you were to change that.

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

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

Less More

- Posts: 267
- Thank you received: 5
-
-
-
-

7 years 3 months ago [\#309143](#309143) by [dvddvd](/forum/user/7721-dvddvd "View dvddvd's Profile")  Replied by *[dvddvd](/forum/user/7721-dvddvd "View dvddvd's Profile")* on topic *[Custom field in email notification](/forum/35-orders-management/876574-custom-field-in-email-notification?start=20#309143 "-- HikaShop version -- : 2.3.5 -- Joomla version -- : 2.5.11  Hi,  I'm only new to PHP and could use some help with adding custom fields to notification emails.  I'm trying to add a field from the item table to a notification email and am using the code . org&#95;member being the field I want to display. When I send a test email the field isn't displayed.  I'm guessing I need to add some additional code to the preload version to allow the table 'item' to be displayed. Can you tell me what the code should be and where it should be placed.  Regards - Rich")*

Sorry Nicolas,

I was wrong in point 2. I mean change it in the product editing screen.

[ ![Sinttulo-11.jpg](/forum/attachment/47355) ](/forum/attachment/47355 "Sinttulo-11.jpg")

Thanks very much

- [ ![Sinttulo-11.jpg](/forum/attachment/47355) ](/forum/attachment/47355 "Sinttulo-11.jpg") [ ](/forum/attachment/47355?download=1 "Sinttulo-11.jpg")

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

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

Less More

- Posts: 267
- Thank you received: 5
-
-
-
-

7 years 3 months ago [\#309144](#309144) by [dvddvd](/forum/user/7721-dvddvd "View dvddvd's Profile")  Replied by *[dvddvd](/forum/user/7721-dvddvd "View dvddvd's Profile")* on topic *[Custom field in email notification](/forum/35-orders-management/876574-custom-field-in-email-notification?start=20#309144 "-- HikaShop version -- : 2.3.5 -- Joomla version -- : 2.5.11  Hi,  I'm only new to PHP and could use some help with adding custom fields to notification emails.  I'm trying to add a field from the item table to a notification email and am using the code . org&#95;member being the field I want to display. When I send a test email the field isn't displayed.  I'm guessing I need to add some additional code to the preload version to allow the table 'item' to be displayed. Can you tell me what the code should be and where it should be placed.  Regards - Rich")*

Hello again Nicolas,

I have realized that when making the change in the list of products, another customized change that is generated through the advanced date selector is modified, would it be possible that this did not happen?

Thank you very much for your patience.

[ ![Sinttulo-1&#95;2019-07-25.jpg](/forum/attachment/47356) ](/forum/attachment/47356 "...2019-07-25.jpg")

[ ![Sinttulo-2&#95;2019-07-25.jpg](/forum/attachment/47357) ](/forum/attachment/47357 "...2019-07-25.jpg")

- [ ![Sinttulo-1&#95;2019-07-25.jpg](/forum/attachment/47356) ](/forum/attachment/47356 "...2019-07-25.jpg") [ ](/forum/attachment/47356?download=1 "...2019-07-25.jpg")
- [ ![Sinttulo-2&#95;2019-07-25.jpg](/forum/attachment/47357) ](/forum/attachment/47357 "...2019-07-25.jpg") [ ](/forum/attachment/47357?download=1 "...2019-07-25.jpg")

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

Less More

- Posts: 86575
- Thank you received: 14318
-
-

7 years 3 months ago [\#309154](#309154) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Custom field in email notification](/forum/35-orders-management/876574-custom-field-in-email-notification?start=20#309154 "-- HikaShop version -- : 2.3.5 -- Joomla version -- : 2.5.11  Hi,  I'm only new to PHP and could use some help with adding custom fields to notification emails.  I'm trying to add a field from the item table to a notification email and am using the code . org&#95;member being the field I want to display. When I send a test email the field isn't displayed.  I'm guessing I need to add some additional code to the preload version to allow the table 'item' to be displayed. Can you tell me what the code should be and where it should be placed.  Regards - Rich")*

Hi,

2. You can't have HTML in dropdown values so I don't think you can change that.

3. In that case, you should use some more complex code like this: Code:

if($namekey=='XXX') echo '&lt;td&gt;'.$this-&gt;fieldsClass-&gt;show($field,$row-&gt;$namekey).'&lt;/td&gt;'; else echo '&lt;td&gt;'.JText::_($row-&gt;$namekey).'&lt;/td&gt;';

where XXX is the column name of the date field.

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

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

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

Less More

- Posts: 267
- Thank you received: 5
-
-
-
-

7 years 3 months ago [\#309172](#309172) by [dvddvd](/forum/user/7721-dvddvd "View dvddvd's Profile")  Replied by *[dvddvd](/forum/user/7721-dvddvd "View dvddvd's Profile")* on topic *[Custom field in email notification](/forum/35-orders-management/876574-custom-field-in-email-notification?start=20#309172 "-- HikaShop version -- : 2.3.5 -- Joomla version -- : 2.5.11  Hi,  I'm only new to PHP and could use some help with adding custom fields to notification emails.  I'm trying to add a field from the item table to a notification email and am using the code . org&#95;member being the field I want to display. When I send a test email the field isn't displayed.  I'm guessing I need to add some additional code to the preload version to allow the table 'item' to be displayed. Can you tell me what the code should be and where it should be placed.  Regards - Rich")*

Thanks very much

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

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