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

#   Show username in subject admin notification email

##

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

Less More

- Posts: 45
- Thank you received: 0
-
-

10 years 11 months ago [\#222396](#222396) by [Squashtoppertje](/forum/user/39506-squashtoppertje "View Squashtoppertje's Profile")  *[Show username in subject admin notification email](/forum/4-how-to/880779-show-username-in-subject-admin-notification-email#222396 "-- HikaShop version -- : 2.6.0. Business  Hi,  I want to show the customer name in the subject of the admin notification email. Is this possible? And how?  Thanks!")* was created by *[Squashtoppertje](/forum/user/39506-squashtoppertje "View Squashtoppertje's Profile")*

-- HikaShop version -- : 2.6.0. Business

Hi,

I want to show the customer name in the subject of the admin notification email. Is this possible? And how?

Thanks!

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

10 years 11 months ago [\#222499](#222499) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Show username in subject admin notification email](/forum/4-how-to/880779-show-username-in-subject-admin-notification-email#222499 "-- HikaShop version -- : 2.6.0. Business  Hi,  I want to show the customer name in the subject of the admin notification email. Is this possible? And how?  Thanks!")*

Hi,

There is no option to do that.
You would have to modify the preload code of the email via the menu System&gt;Emails in order to do that.
There, you could add such code: Code:

&lt;?php $data-&gt;mail-&gt;subject = 'new order for user '.$order-&gt;customer-&gt;username; ?&gt;

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

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

Less More

- Posts: 45
- Thank you received: 0
-
-

10 years 11 months ago [\#223858](#223858) by [Squashtoppertje](/forum/user/39506-squashtoppertje "View Squashtoppertje's Profile")  Replied by *[Squashtoppertje](/forum/user/39506-squashtoppertje "View Squashtoppertje's Profile")* on topic *[Show username in subject admin notification email](/forum/4-how-to/880779-show-username-in-subject-admin-notification-email#223858 "-- HikaShop version -- : 2.6.0. Business  Hi,  I want to show the customer name in the subject of the admin notification email. Is this possible? And how?  Thanks!")*

Hi Nicolas,

I tried your code in the preload code. I added it at the end, but it did not have any effect. I removed the original subjectline (ORDER_ADMIN_NOTIFICATION_SUBJECT).

Does the position matter?

Thanks!

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

10 years 11 months ago [\#223898](#223898) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Show username in subject admin notification email](/forum/4-how-to/880779-show-username-in-subject-admin-notification-email#223898 "-- HikaShop version -- : 2.6.0. Business  Hi,  I want to show the customer name in the subject of the admin notification email. Is this possible? And how?  Thanks!")*

Hi,

I would rather recommend to add it at the beginning of the preload.

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

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

Less More

- Posts: 45
- Thank you received: 0
-
-

10 years 11 months ago [\#224097](#224097) by [Squashtoppertje](/forum/user/39506-squashtoppertje "View Squashtoppertje's Profile")  Replied by *[Squashtoppertje](/forum/user/39506-squashtoppertje "View Squashtoppertje's Profile")* on topic *[Show username in subject admin notification email](/forum/4-how-to/880779-show-username-in-subject-admin-notification-email#224097 "-- HikaShop version -- : 2.6.0. Business  Hi,  I want to show the customer name in the subject of the admin notification email. Is this possible? And how?  Thanks!")*

Hi Nicolas,

I tried that also, but it didn't work. I removed the original subject line, but in the email the subject now is something like:

New order nr. xxxx generated on [ www.example.com](http://www.example.com) (translated).

Do you have any other suggestions?

Thanks again.

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

10 years 10 months ago [\#224115](#224115) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Show username in subject admin notification email](/forum/4-how-to/880779-show-username-in-subject-admin-notification-email#224115 "-- HikaShop version -- : 2.6.0. Business  Hi,  I want to show the customer name in the subject of the admin notification email. Is this possible? And how?  Thanks!")*

Hi,

My bad, I made a mistake.
Try like this instead:
&lt;?php $data-&gt;mail-&gt;subject = 'new order for user '.$data-&gt;customer-&gt;username; ?&gt;

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

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

Less More

- Posts: 45
- Thank you received: 0
-
-

10 years 10 months ago [\#224214](#224214) by [Squashtoppertje](/forum/user/39506-squashtoppertje "View Squashtoppertje's Profile")  Replied by *[Squashtoppertje](/forum/user/39506-squashtoppertje "View Squashtoppertje's Profile")* on topic *[Show username in subject admin notification email](/forum/4-how-to/880779-show-username-in-subject-admin-notification-email#224214 "-- HikaShop version -- : 2.6.0. Business  Hi,  I want to show the customer name in the subject of the admin notification email. Is this possible? And how?  Thanks!")*

Hi Nicolas,

No, this doesn't work either. Nothing happens. Below is the start of my preload code:
Code:

/** * @package HikaShop for Joomla! * @version 2.6.0 * @author hikashop.com * @copyright (C) 2010-2015 HIKARI SOFTWARE. All rights reserved. * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html */ defined('_JEXEC') or die('Restricted access'); ?&gt; &lt;?php $data-&gt;mail-&gt;subject = 'new order for user '.$data-&gt;customer-&gt;username; $app = JFactory::getApplication(); $config = hikashop_config(); $orderClass = hikashop_get('class.order'); $imageHelper = hikashop_get('helper.image'); $productClass = hikashop_get('class.product'); $fieldsClass = hikashop_get('class.field'); if(hikashop_level(2)) { $null = null; $itemFields = $fieldsClass-&gt;getFields('frontcomp',$null,'item'); }

Any other ideas?

Thanks!

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

- **[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")**
- [![Mohamed Thelji's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar6861.png)](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")
- [ Offline](/forum/user/6861-mohamed-thelji)

Less More

- Posts: 12953
- Thank you received: 1778
-
-
-

10 years 10 months ago [\#225641](#225641) by [Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")  Replied by *[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")* on topic *[Show username in subject admin notification email](/forum/4-how-to/880779-show-username-in-subject-admin-notification-email#225641 "-- HikaShop version -- : 2.6.0. Business  Hi,  I want to show the customer name in the subject of the admin notification email. Is this possible? And how?  Thanks!")*

Hello,
Sorry for the late reply, If you still have that issue, can you try it with that code : Code:

&lt;?php $mail-&gt;subject = 'new order for user '.$data-&gt;customer-&gt;username; ?&gt;

The following user(s) said Thank You: [pepecortez](/forum/user/31475-pepecortez "View pepecortez's Profile"), [Squashtoppertje](/forum/user/39506-squashtoppertje "View Squashtoppertje's Profile")

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

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

Less More

- Posts: 45
- Thank you received: 0
-
-

10 years 9 months ago [\#226567](#226567) by [Squashtoppertje](/forum/user/39506-squashtoppertje "View Squashtoppertje's Profile")  Replied by *[Squashtoppertje](/forum/user/39506-squashtoppertje "View Squashtoppertje's Profile")* on topic *[Show username in subject admin notification email](/forum/4-how-to/880779-show-username-in-subject-admin-notification-email#226567 "-- HikaShop version -- : 2.6.0. Business  Hi,  I want to show the customer name in the subject of the admin notification email. Is this possible? And how?  Thanks!")*

Hi Mohamed,

This is the solution. Great, thanks!

Have a nice weekend!

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

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