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

#   Order Email to an address with some extra field

##

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

Less More

- Posts: 12
- Thank you received: 0
-
-

11 years 5 months ago [\#200919](#200919) by [mohsin](/forum/user/32476-mohsin "View mohsin's Profile")  *[Order Email to an address with some extra field](/forum/30-integrations/876818-order-email-to-an-address-with-some-extra-field#200919 "-- HikaShop version -- : 2.3.2 -- Joomla version -- : 3.4  Hello, My client wants the order confirmation email goes to a different address along with admin email with some extra field. Actually it is &quot;FTD Mercury Point of Sale&quot; . I can add email addresses in order notification email but how can I add those extra filed only for that email address ?  Thank you for your help.")* was created by *[mohsin](/forum/user/32476-mohsin "View mohsin's Profile")*

-- HikaShop version -- : 2.3.2
-- Joomla version -- : 3.4

Hello,
My client wants the order confirmation email goes to a different address along with admin email with some extra field. Actually it is "FTD Mercury Point of Sale" . I can add email addresses in order notification email but how can I add those extra filed only for that email address ?

Thank you for your help.

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

Less More

- Posts: 86292
- Thank you received: 14269
-
-

11 years 5 months ago [\#200945](#200945) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Order Email to an address with some extra field](/forum/30-integrations/876818-order-email-to-an-address-with-some-extra-field#200945 "-- HikaShop version -- : 2.3.2 -- Joomla version -- : 3.4  Hello, My client wants the order confirmation email goes to a different address along with admin email with some extra field. Actually it is &quot;FTD Mercury Point of Sale&quot; . I can add email addresses in order notification email but how can I add those extra filed only for that email address ?  Thank you for your help.")*

Hi,

That won't be possible. When you add the email address in the BCC or CC field of the emails, the system will tell your email server to send one copy of the generated email to all the email addresses. But it will be the same copy for all of them.
So having stuff displayed for only some of the recipients is not possible with the same email.
This means that you'll have to send two different emails and thus it would require a custom plugin to be developed to send that second email with the extra data. That won't be easy to do and will require the help of a professional PHP developer.

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

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

Less More

- Posts: 12
- Thank you received: 0
-
-

11 years 4 months ago -  11 years 4 months ago [\#203981](#203981) by [mohsin](/forum/user/32476-mohsin "View mohsin's Profile")  Replied by *[mohsin](/forum/user/32476-mohsin "View mohsin's Profile")* on topic *[Order Email to an address with some extra field](/forum/30-integrations/876818-order-email-to-an-address-with-some-extra-field#203981 "-- HikaShop version -- : 2.3.2 -- Joomla version -- : 3.4  Hello, My client wants the order confirmation email goes to a different address along with admin email with some extra field. Actually it is &quot;FTD Mercury Point of Sale&quot; . I can add email addresses in order notification email but how can I add those extra filed only for that email address ?  Thank you for your help.")*

Hello Nicolas,

Thank you for your suggestion.

I have planed to edit the order admin email notification file. I need its text version only. So, I am editing order_admin_notification.text.php

I need the email in the following format and I am trying to do it like this:

echo"Email :".$data-&gt;customer-&gt;user_email[0]."\n";
echo "Bill Name :".$data-&gt;customer."\n";
echo "Bill Address1 :".$data-&gt;cart-&gt;billing_address."\n";
echo "Bill Address2 :".$data-&gt;customer-&gt;user_email[0]."\n";
echo "Bill City :".$data-&gt;cart-&gt;billing_address-&gt;adress_city."\n";
echo "Bill State :".$data-&gt;cart-&gt;billing_address-&gt;adress_state."\n";
echo "Bill Country :".$data-&gt;cart-&gt;billing_address-&gt;adress_country."\n";
echo "Bill Zip Code :".$data-&gt;cart-&gt;billing_address-&gt;adress_post_code."\n";
echo "Bill Phone Area Code :".$data-&gt;cart-&gt;billing_address-&gt;adress_city."\n";
echo "Bill Phone Prefix :".$data-&gt;cart-&gt;billing_address-&gt;adress_telephone."\n";
echo "Bill Phone Number :".$data-&gt;cart-&gt;billing_address-&gt;adress_telephone."\n";

I know very little about PHP and didnt find any professional one for this. however, I see the error "Catchable fatal error: Object of class stdClass could not be converted to string" from 2nd line in ' $data-&gt;customer', ' $data-&gt;cart-&gt;billing_address' etc.

What mistake I am making here and what is the solution please.

Thank you very much.
Mohsin

Last edit: 11 years 4 months ago by [mohsin](/forum/user/32476-mohsin "View mohsin's Profile").

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

Less More

- Posts: 86292
- Thank you received: 14269
-
-

11 years 4 months ago [\#203996](#203996) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Order Email to an address with some extra field](/forum/30-integrations/876818-order-email-to-an-address-with-some-extra-field#203996 "-- HikaShop version -- : 2.3.2 -- Joomla version -- : 3.4  Hello, My client wants the order confirmation email goes to a different address along with admin email with some extra field. Actually it is &quot;FTD Mercury Point of Sale&quot; . I can add email addresses in order notification email but how can I add those extra filed only for that email address ?  Thank you for your help.")*

Hi,

The error is what the error message says.
The variables $data-&gt;customer and $data-&gt;cart-&gt;billing_address are objects and you try to echo them.
You can't do that.
What you want to do is actually to echo an attribute of these variable.
So instead of $data-&gt;customer, you'll want to have $data-&gt;customer-&gt;name
And instead of $data-&gt;cart-&gt;billing_address, you'll want: $data-&gt;cart-&gt;billing_address-&gt;address_street

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

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

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

Less More

- Posts: 12
- Thank you received: 0
-
-

11 years 4 months ago [\#204047](#204047) by [mohsin](/forum/user/32476-mohsin "View mohsin's Profile")  Replied by *[mohsin](/forum/user/32476-mohsin "View mohsin's Profile")* on topic *[Order Email to an address with some extra field](/forum/30-integrations/876818-order-email-to-an-address-with-some-extra-field#204047 "-- HikaShop version -- : 2.3.2 -- Joomla version -- : 3.4  Hello, My client wants the order confirmation email goes to a different address along with admin email with some extra field. Actually it is &quot;FTD Mercury Point of Sale&quot; . I can add email addresses in order notification email but how can I add those extra filed only for that email address ?  Thank you for your help.")*

Hi Nicolas,

Thank you so much for the help. Its worked. This Hikashop's support is amazing.

I still need help on few fields:
1. echo "Bill Name: " .$data-&gt;customer-&gt;name."\n"; This is not working. No value in email.
2. echo "Tax Amount: " .$data-&gt;cart-&gt;order_product_tax."\n"; This is not working,
3. echo "Product: " .$data-&gt;cart-&gt;order_product_name. "\n"; This is not working. I need product with varient as its listed html version.

Another issue, echo "Total Order Amount: " .$data-&gt;cart-&gt;order_full_price."\n"; its printing price like 49.0000 , how can I make it like 49.00

Kind Regards

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

Less More

- Posts: 86292
- Thank you received: 14269
-
-

11 years 4 months ago [\#204048](#204048) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Order Email to an address with some extra field](/forum/30-integrations/876818-order-email-to-an-address-with-some-extra-field#204048 "-- HikaShop version -- : 2.3.2 -- Joomla version -- : 3.4  Hello, My client wants the order confirmation email goes to a different address along with admin email with some extra field. Actually it is &quot;FTD Mercury Point of Sale&quot; . I can add email addresses in order notification email but how can I add those extra filed only for that email address ?  Thank you for your help.")*

Hi,

1. if you want the email, you should use Code:

$data-&gt;customer-&gt;email

2. Like that: Code:

$data-&gt;cart-&gt;products[0]-&gt;order_product_tax

3. Like that: Code:

$data-&gt;cart-&gt;products[0]-&gt;order_product_name

4. Like that: Code:

round($data-&gt;cart-&gt;order_full_price,2)

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

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

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

Less More

- Posts: 12
- Thank you received: 0
-
-

11 years 4 months ago [\#204136](#204136) by [mohsin](/forum/user/32476-mohsin "View mohsin's Profile")  Replied by *[mohsin](/forum/user/32476-mohsin "View mohsin's Profile")* on topic *[Order Email to an address with some extra field](/forum/30-integrations/876818-order-email-to-an-address-with-some-extra-field#204136 "-- HikaShop version -- : 2.3.2 -- Joomla version -- : 3.4  Hello, My client wants the order confirmation email goes to a different address along with admin email with some extra field. Actually it is &quot;FTD Mercury Point of Sale&quot; . I can add email addresses in order notification email but how can I add those extra filed only for that email address ?  Thank you for your help.")*

Hi Nicolas,

Good day. Those works but two fileds still have issue:

1. Customer Name: $data-&gt;customer-&gt;name , not working. I want to print Customer name

2. Product Name: $data-&gt;cart-&gt;products[0]-&gt;order_product_name , It prints only main product name. But I want to print the product with additional products. which I see in the customer copy email.
Name Unit price Qty Total
Bromeliad $34.99 1 $34.99
Alstromeria Topiary $34.99 1 $34.99
Mylar Balloon : 2 $9.89 1 $9.89

Thank you.

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

Less More

- Posts: 86292
- Thank you received: 14269
-
-

11 years 4 months ago [\#204178](#204178) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Order Email to an address with some extra field](/forum/30-integrations/876818-order-email-to-an-address-with-some-extra-field#204178 "-- HikaShop version -- : 2.3.2 -- Joomla version -- : 3.4  Hello, My client wants the order confirmation email goes to a different address along with admin email with some extra field. Actually it is &quot;FTD Mercury Point of Sale&quot; . I can add email addresses in order notification email but how can I add those extra filed only for that email address ?  Thank you for your help.")*

Hi,

1. I don't see why it wouldn't work unless the customer is a guest. In that case that variable doesn't exist as it comes from the Joomla user account's name which isn't there for guests.
In that case, you need instead to look in the billing address for the firstname and lastname of the customer.

2. Then you need to do like this:
foreach( $data-&gt;cart-&gt;products as $product){ echo $product-&gt;order_product_name; }

Please note that this forum is about user support. Not customization of HikaShop. I believe we already helped a lot with the customization of your email. For further customization please contact our partners:
[ www.hikashop.com/home/our-partners.html](http://www.hikashop.com/home/our-partners.html)

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

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

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

Less More

- Posts: 12
- Thank you received: 0
-
-

11 years 4 months ago [\#204265](#204265) by [mohsin](/forum/user/32476-mohsin "View mohsin's Profile")  Replied by *[mohsin](/forum/user/32476-mohsin "View mohsin's Profile")* on topic *[Order Email to an address with some extra field](/forum/30-integrations/876818-order-email-to-an-address-with-some-extra-field#204265 "-- HikaShop version -- : 2.3.2 -- Joomla version -- : 3.4  Hello, My client wants the order confirmation email goes to a different address along with admin email with some extra field. Actually it is &quot;FTD Mercury Point of Sale&quot; . I can add email addresses in order notification email but how can I add those extra filed only for that email address ?  Thank you for your help.")*

Hi Nicolas,

Thank you Very much for such help.

I was able to solve those all.

Yes I know this forum is not about customization. But I really appriciate your help which was a great reliefe for me to get a website up and running with Hikashop.

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

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

[](#top)
