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

#   Product Name, Cust. Name to Subject Admin Email

##

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

Less More

- Posts: 30
- Thank you received: 2
-
-

12 years 6 months ago [\#157198](#157198) by [solia](/forum/user/10273-solia "View solia's Profile")  *[Product Name, Cust. Name to Subject Admin Email](/forum/35-orders-management/868465-product-name-cust-name-to-subject-admin-email#157198 "Dear friends:  I have read many other posts about customization of emails, but for some reason I have not been successful in adding the customer name and product name to the administrative email notification SUBJECT line. I have attempted to edit the order.php file like as follows:  $order-&gt;mail-&gt;subject = ''; if(empty($order-&gt;mail-&gt;subject)) { $order-&gt;mail-&gt;subject = JText::sprintf('NEW&#95;ORDER&#95;SUBJECT',$order-&gt;order&#95;number,HIKASHOP&#95;LIVE,$order-&gt;order&#95;product&#95;name,HIKASHOP&#95;LIVE);  (this to add the product name), but I am clearly missing something. Thanks in advance for your patient advice.  Nadine")* was created by *[solia](/forum/user/10273-solia "View solia's Profile")*

Dear friends:

I have read many other posts about customization of emails, but for some reason I have not been successful in adding the customer name and product name to the administrative email notification SUBJECT line. I have attempted to edit the order.php file like as follows:

$order-&gt;mail-&gt;subject = '';
if(empty($order-&gt;mail-&gt;subject)) {
$order-&gt;mail-&gt;subject = JText::sprintf('NEW_ORDER_SUBJECT',$order-&gt;order_number,HIKASHOP_LIVE,$order-&gt;order_product_name,HIKASHOP_LIVE);

(this to add the product name), but I am clearly missing something. Thanks in advance for your patient advice.

Nadine

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

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

12 years 6 months ago [\#157337](#157337) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Product Name, Cust. Name to Subject Admin Email](/forum/35-orders-management/868465-product-name-cust-name-to-subject-admin-email#157337 "Dear friends:  I have read many other posts about customization of emails, but for some reason I have not been successful in adding the customer name and product name to the administrative email notification SUBJECT line. I have attempted to edit the order.php file like as follows:  $order-&gt;mail-&gt;subject = ''; if(empty($order-&gt;mail-&gt;subject)) { $order-&gt;mail-&gt;subject = JText::sprintf('NEW&#95;ORDER&#95;SUBJECT',$order-&gt;order&#95;number,HIKASHOP&#95;LIVE,$order-&gt;order&#95;product&#95;name,HIKASHOP&#95;LIVE);  (this to add the product name), but I am clearly missing something. Thanks in advance for your patient advice.  Nadine")*

Hi,

You need this code: Code:

$order-&gt;mail-&gt;subject = JText::sprintf('NEW_ORDER_SUBJECT',$order-&gt;order_number,HIKASHOP_LIVE,$order-&gt;customer-&gt;name);

And edit the translation via the menu Configuration &gt; Languages:

> NEW\_ORDER\_SUBJECT="New order No. %s created on %s, cust name: %s"

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

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

Less More

- Posts: 30
- Thank you received: 2
-
-

12 years 5 months ago [\#158510](#158510) by [solia](/forum/user/10273-solia "View solia's Profile")  Replied by *[solia](/forum/user/10273-solia "View solia's Profile")* on topic *[Product Name, Cust. Name to Subject Admin Email](/forum/35-orders-management/868465-product-name-cust-name-to-subject-admin-email#158510 "Dear friends:  I have read many other posts about customization of emails, but for some reason I have not been successful in adding the customer name and product name to the administrative email notification SUBJECT line. I have attempted to edit the order.php file like as follows:  $order-&gt;mail-&gt;subject = ''; if(empty($order-&gt;mail-&gt;subject)) { $order-&gt;mail-&gt;subject = JText::sprintf('NEW&#95;ORDER&#95;SUBJECT',$order-&gt;order&#95;number,HIKASHOP&#95;LIVE,$order-&gt;order&#95;product&#95;name,HIKASHOP&#95;LIVE);  (this to add the product name), but I am clearly missing something. Thanks in advance for your patient advice.  Nadine")*

Xavier, thank you very much for the prompt reply. I spent the time since your reply repeatedly trying to do this and I am failing.

I did precisely what you said to do. I actually made the following change not only in the order.php, but in the overrides too, to make sure I was calling the right code:

if(empty($order-&gt;mail-&gt;subject)) {

$order-&gt;mail-&gt;subject = JText::sprintf('NEW_ORDER_SUBJECT',$order-&gt;order_number,HIKASHOP_LIVE,$order-&gt;customer-&gt;name);

I found that I had to DELETE the usual subject line in the email template, but I cut and pasted your language modifications precisely as you indicate. And then on the tests, I get:

New order No. D7C1 created on http://[site url]/, cust name:

The constant is there, but the variable data for the name is just not being called properly.

Is there anything else I can try? THANKS.

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

- **[Eliot](/forum/user/1824-eliot "View Eliot's Profile")**
- [![Eliot's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar1824.png)](/forum/user/1824-eliot "View Eliot's Profile")
- [ Offline](/forum/user/1824-eliot)

Less More

- Posts: 2334
- Thank you received: 403
-
-

12 years 5 months ago [\#159666](#159666) by [Eliot](/forum/user/1824-eliot "View Eliot's Profile")  Replied by *[Eliot](/forum/user/1824-eliot "View Eliot's Profile")* on topic *[Product Name, Cust. Name to Subject Admin Email](/forum/35-orders-management/868465-product-name-cust-name-to-subject-admin-email#159666 "Dear friends:  I have read many other posts about customization of emails, but for some reason I have not been successful in adding the customer name and product name to the administrative email notification SUBJECT line. I have attempted to edit the order.php file like as follows:  $order-&gt;mail-&gt;subject = ''; if(empty($order-&gt;mail-&gt;subject)) { $order-&gt;mail-&gt;subject = JText::sprintf('NEW&#95;ORDER&#95;SUBJECT',$order-&gt;order&#95;number,HIKASHOP&#95;LIVE,$order-&gt;order&#95;product&#95;name,HIKASHOP&#95;LIVE);  (this to add the product name), but I am clearly missing something. Thanks in advance for your patient advice.  Nadine")*

Hi there,

Could you try to do something like var_dump($order); to see if the information you are looking for is loaded here.
Maybe the path is just not the good one.
Could you tell us exactly where you are adding this?

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

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