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

#   Send order email to Ship To customer field.

##

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

Less More

- Posts: 18
- Thank you received: 0
-
-

12 years 5 months ago [\#155049](#155049) by [ycb](/forum/user/27244-ycb "View ycb's Profile")  *[Send order email to Ship To customer field.](/forum/35-orders-management/868004-send-order-email-to-ship-to-customer-field#155049 "How can I send an order confirmation email to another email address?  My clients store is operating with sales reps who maintain several clients on the hikashop system. They have several ship to addresses and fill out orders on their behalf. Problem is both the Sales Rep and the Ship To require the order confirmation email.  I have currently added an address&#95;email field where the sales rep can enter the Ship To's email address.  What code can I add that will email the order confirmation to the address&#95;email field?  Thanks in advance,  YCB")* was created by *[ycb](/forum/user/27244-ycb "View ycb's Profile")*

How can I send an order confirmation email to another email address?

My clients store is operating with sales reps who maintain several clients on the hikashop system. They have several ship to addresses and fill out orders on their behalf. Problem is both the Sales Rep and the Ship To require the order confirmation email.

I have currently added an address_email field where the sales rep can enter the Ship To's email address.

What code can I add that will email the order confirmation to the address_email field?

Thanks in advance,

YCB

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL29yZGVycy1tYW5hZ2VtZW50Lzg2ODAwNC1zZW5kLW9yZGVyLWVtYWlsLXRvLXNoaXAtdG8tY3VzdG9tZXItZmllbGQ/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: 86283
- Thank you received: 14263
-
-

12 years 5 months ago [\#155097](#155097) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Send order email to Ship To customer field.](/forum/35-orders-management/868004-send-order-email-to-ship-to-customer-field#155097 "How can I send an order confirmation email to another email address?  My clients store is operating with sales reps who maintain several clients on the hikashop system. They have several ship to addresses and fill out orders on their behalf. Problem is both the Sales Rep and the Ship To require the order confirmation email.  I have currently added an address&#95;email field where the sales rep can enter the Ship To's email address.  What code can I add that will email the order confirmation to the address&#95;email field?  Thanks in advance,  YCB")*

Hi,

Supposing that you have a recent version of HikaShop, you can add such code at the end of the order notification emails via the menu System&gt;Emails in the HTML version:
&lt;?php $data-&gt;customer-&gt;user_email = array($data-&gt;customer-&gt;user_email,$data-&gt;cart-&gt;billing_address-&gt;address_email); ?&gt;

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

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

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

Less More

- Posts: 18
- Thank you received: 0
-
-

12 years 5 months ago [\#155172](#155172) by [ycb](/forum/user/27244-ycb "View ycb's Profile")  Replied by *[ycb](/forum/user/27244-ycb "View ycb's Profile")* on topic *[Send order email to Ship To customer field.](/forum/35-orders-management/868004-send-order-email-to-ship-to-customer-field#155172 "How can I send an order confirmation email to another email address?  My clients store is operating with sales reps who maintain several clients on the hikashop system. They have several ship to addresses and fill out orders on their behalf. Problem is both the Sales Rep and the Ship To require the order confirmation email.  I have currently added an address&#95;email field where the sales rep can enter the Ship To's email address.  What code can I add that will email the order confirmation to the address&#95;email field?  Thanks in advance,  YCB")*

Nicolas,

Thank you for the support.. It worked perfectly.

One more question.

How can it be automated to send order status notifications in the same manner?

I tried adding the same code to order status notification and it does not do the same trick.

Is this possible without copying and pasting another email address into the notification form?

Thanks!

YCB

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL29yZGVycy1tYW5hZ2VtZW50Lzg2ODAwNC1zZW5kLW9yZGVyLWVtYWlsLXRvLXNoaXAtdG8tY3VzdG9tZXItZmllbGQ/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: 86283
- Thank you received: 14263
-
-

12 years 5 months ago [\#155210](#155210) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Send order email to Ship To customer field.](/forum/35-orders-management/868004-send-order-email-to-ship-to-customer-field#155210 "How can I send an order confirmation email to another email address?  My clients store is operating with sales reps who maintain several clients on the hikashop system. They have several ship to addresses and fill out orders on their behalf. Problem is both the Sales Rep and the Ship To require the order confirmation email.  I have currently added an address&#95;email field where the sales rep can enter the Ship To's email address.  What code can I add that will email the order confirmation to the address&#95;email field?  Thanks in advance,  YCB")*

Hi,

It will work the same for the order status notification which is sent automatically by the system when an order is automatically confirmed.

For the order status notification which is sent from the confirmation popup when you change a status in the backend, that's as different change which is needed and which is more complex.
You need to edit the file "mailform" via the menu Display&gt;Views and add such code at the beginning: Code:

&lt;?php $class = hikashop_get('class.order'); $order = $class-&gt;loadFullOrder($this-&gt;element-&gt;order_id,false,false); $this-&gt;element-&gt;mail-&gt;dst_email.=$order-&gt;billing_address-&gt;address_email; ?&gt;

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

- **[lt635](/forum/user/32929-lt635 "View lt635's Profile")**
- [![lt635's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar32929.jpg)](/forum/user/32929-lt635 "View lt635's Profile")
- [ Offline](/forum/user/32929-lt635)

Less More

- Posts: 191
- Thank you received: 5
-
-

9 years 11 months ago [\#253990](#253990) by [lt635](/forum/user/32929-lt635 "View lt635's Profile")  Replied by *[lt635](/forum/user/32929-lt635 "View lt635's Profile")* on topic *[Send order email to Ship To customer field.](/forum/35-orders-management/868004-send-order-email-to-ship-to-customer-field#253990 "How can I send an order confirmation email to another email address?  My clients store is operating with sales reps who maintain several clients on the hikashop system. They have several ship to addresses and fill out orders on their behalf. Problem is both the Sales Rep and the Ship To require the order confirmation email.  I have currently added an address&#95;email field where the sales rep can enter the Ship To's email address.  What code can I add that will email the order confirmation to the address&#95;email field?  Thanks in advance,  YCB")*

Hello,

I have sales people putting through orders on behalf of clients and I need to setup exactly the same and I am having some trouble getting the email through to the shipping email address.

I setup a custom field address_email as a text field (no option for email field). I added the code to the order notification emails at the bottom of the html (after last div). I then added the code below in template isis, back end, mailform just before &lt;table class="table"&gt;.

I did a test purchase, no email are being sent to the email added in the ship to.

Any suggestions on what I am doing wrong?

Thank you
Kind regards
Lene

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL29yZGVycy1tYW5hZ2VtZW50Lzg2ODAwNC1zZW5kLW9yZGVyLWVtYWlsLXRvLXNoaXAtdG8tY3VzdG9tZXItZmllbGQ/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: 86283
- Thank you received: 14263
-
-

9 years 11 months ago [\#254012](#254012) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Send order email to Ship To customer field.](/forum/35-orders-management/868004-send-order-email-to-ship-to-customer-field#254012 "How can I send an order confirmation email to another email address?  My clients store is operating with sales reps who maintain several clients on the hikashop system. They have several ship to addresses and fill out orders on their behalf. Problem is both the Sales Rep and the Ship To require the order confirmation email.  I have currently added an address&#95;email field where the sales rep can enter the Ship To's email address.  What code can I add that will email the order confirmation to the address&#95;email field?  Thanks in advance,  YCB")*

Hi,

What code exactly did you add in which email ?
And which version of HikaShop are you using ?
Did you disable any emails in the menu System&gt;Emails ?

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

- **[lt635](/forum/user/32929-lt635 "View lt635's Profile")**
- [![lt635's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar32929.jpg)](/forum/user/32929-lt635 "View lt635's Profile")
- [ Offline](/forum/user/32929-lt635)

Less More

- Posts: 191
- Thank you received: 5
-
-

9 years 11 months ago [\#254087](#254087) by [lt635](/forum/user/32929-lt635 "View lt635's Profile")  Replied by *[lt635](/forum/user/32929-lt635 "View lt635's Profile")* on topic *[Send order email to Ship To customer field.](/forum/35-orders-management/868004-send-order-email-to-ship-to-customer-field#254087 "How can I send an order confirmation email to another email address?  My clients store is operating with sales reps who maintain several clients on the hikashop system. They have several ship to addresses and fill out orders on their behalf. Problem is both the Sales Rep and the Ship To require the order confirmation email.  I have currently added an address&#95;email field where the sales rep can enter the Ship To's email address.  What code can I add that will email the order confirmation to the address&#95;email field?  Thanks in advance,  YCB")*

Hi Nicolas,

I am using HikaShop Business 2.6.4 and Joomla 3.6.4.

I created a custom field named address_email.

The following code was added at the end of the email in system -&gt; emails, order creation notification, order creation, notification, order notification:
&lt;?php $data-&gt;customer-&gt;user_email = array($data-&gt;customer-&gt;user_email,$data-&gt;cart-&gt;billing_address-&gt;address_email); ?&gt;

And I added the following code in template isis (set as default), back end, mailform just before &lt;table class="table"&gt;.
&lt;?php
$class = hikashop_get('class.order');
$order = $class-&gt;loadFullOrder($this-&gt;element-&gt;order_id,false,false);
$this-&gt;element-&gt;mail-&gt;dst_email.=$order-&gt;billing_address-&gt;address_email;
?&gt;

The only emails disabled are 'wait list administrator notification; and 'subscription expired' notification.

Kind regards
Lene

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL29yZGVycy1tYW5hZ2VtZW50Lzg2ODAwNC1zZW5kLW9yZGVyLWVtYWlsLXRvLXNoaXAtdG8tY3VzdG9tZXItZmllbGQ/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: 86283
- Thank you received: 14263
-
-

9 years 11 months ago [\#254092](#254092) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Send order email to Ship To customer field.](/forum/35-orders-management/868004-send-order-email-to-ship-to-customer-field#254092 "How can I send an order confirmation email to another email address?  My clients store is operating with sales reps who maintain several clients on the hikashop system. They have several ship to addresses and fill out orders on their behalf. Problem is both the Sales Rep and the Ship To require the order confirmation email.  I have currently added an address&#95;email field where the sales rep can enter the Ship To's email address.  What code can I add that will email the order confirmation to the address&#95;email field?  Thanks in advance,  YCB")*

Hi,

Try like that instead:
&lt;?php $data-&gt;customer-&gt;user_email = $data-&gt;cart-&gt;billing_address-&gt;address_email; ?&gt;

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

- **[lt635](/forum/user/32929-lt635 "View lt635's Profile")**
- [![lt635's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar32929.jpg)](/forum/user/32929-lt635 "View lt635's Profile")
- [ Offline](/forum/user/32929-lt635)

Less More

- Posts: 191
- Thank you received: 5
-
-

9 years 11 months ago [\#254184](#254184) by [lt635](/forum/user/32929-lt635 "View lt635's Profile")  Replied by *[lt635](/forum/user/32929-lt635 "View lt635's Profile")* on topic *[Send order email to Ship To customer field.](/forum/35-orders-management/868004-send-order-email-to-ship-to-customer-field#254184 "How can I send an order confirmation email to another email address?  My clients store is operating with sales reps who maintain several clients on the hikashop system. They have several ship to addresses and fill out orders on their behalf. Problem is both the Sales Rep and the Ship To require the order confirmation email.  I have currently added an address&#95;email field where the sales rep can enter the Ship To's email address.  What code can I add that will email the order confirmation to the address&#95;email field?  Thanks in advance,  YCB")*

Hi Nicholas,

I tried replacing the string in the email to:
&lt;?php $data-&gt;customer-&gt;user_email = $data-&gt;cart-&gt;billing_address-&gt;address_email; ?&gt;

That resulted in no emails to both original order email and the shipping address. Switched back to the other and it goes to order email only.

Regards
Lene

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL29yZGVycy1tYW5hZ2VtZW50Lzg2ODAwNC1zZW5kLW9yZGVyLWVtYWlsLXRvLXNoaXAtdG8tY3VzdG9tZXItZmllbGQ/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: 86283
- Thank you received: 14263
-
-

9 years 11 months ago [\#254194](#254194) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Send order email to Ship To customer field.](/forum/35-orders-management/868004-send-order-email-to-ship-to-customer-field#254194 "How can I send an order confirmation email to another email address?  My clients store is operating with sales reps who maintain several clients on the hikashop system. They have several ship to addresses and fill out orders on their behalf. Problem is both the Sales Rep and the Ship To require the order confirmation email.  I have currently added an address&#95;email field where the sales rep can enter the Ship To's email address.  What code can I add that will email the order confirmation to the address&#95;email field?  Thanks in advance,  YCB")*

Hi,

Then that means that your problem is not with that code but with your custom field.
Either its column name is not address_email, or it's not from the table address, or it's empty for the billing address of the order.

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

- **[lt635](/forum/user/32929-lt635 "View lt635's Profile")**
- [![lt635's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar32929.jpg)](/forum/user/32929-lt635 "View lt635's Profile")
- [ Offline](/forum/user/32929-lt635)

Less More

- Posts: 191
- Thank you received: 5
-
-

9 years 11 months ago [\#254308](#254308) by [lt635](/forum/user/32929-lt635 "View lt635's Profile")  Replied by *[lt635](/forum/user/32929-lt635 "View lt635's Profile")* on topic *[Send order email to Ship To customer field.](/forum/35-orders-management/868004-send-order-email-to-ship-to-customer-field#254308 "How can I send an order confirmation email to another email address?  My clients store is operating with sales reps who maintain several clients on the hikashop system. They have several ship to addresses and fill out orders on their behalf. Problem is both the Sales Rep and the Ship To require the order confirmation email.  I have currently added an address&#95;email field where the sales rep can enter the Ship To's email address.  What code can I add that will email the order confirmation to the address&#95;email field?  Thanks in advance,  YCB")*

Hi Nicolas,

I have attached some images of what I have done, probably the easiest.

Thank you
Regards
Lene

- [ ![hikashop-form-field.jpg](/forum/attachment/34409) ](/forum/attachment/34409 "...form-field.jpg") [ ](/forum/attachment/34409?download=1 "...form-field.jpg")
- [ ![hikashop-notification-email.jpg](/forum/attachment/34410) ](/forum/attachment/34410 "...tion-email.jpg") [ ](/forum/attachment/34410?download=1 "...tion-email.jpg")
- [ ![hikashop-order-mailform.jpg](/forum/attachment/34411) ](/forum/attachment/34411 "...r-mailform.jpg") [ ](/forum/attachment/34411?download=1 "...r-mailform.jpg")
- [ ![hikashop-backend-order.jpg](/forum/attachment/34412) ](/forum/attachment/34412 "...kend-order.jpg") [ ](/forum/attachment/34412?download=1 "...kend-order.jpg")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL29yZGVycy1tYW5hZ2VtZW50Lzg2ODAwNC1zZW5kLW9yZGVyLWVtYWlsLXRvLXNoaXAtdG8tY3VzdG9tZXItZmllbGQ/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: 86283
- Thank you received: 14263
-
-

9 years 11 months ago [\#254332](#254332) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Send order email to Ship To customer field.](/forum/35-orders-management/868004-send-order-email-to-ship-to-customer-field#254332 "How can I send an order confirmation email to another email address?  My clients store is operating with sales reps who maintain several clients on the hikashop system. They have several ship to addresses and fill out orders on their behalf. Problem is both the Sales Rep and the Ship To require the order confirmation email.  I have currently added an address&#95;email field where the sales rep can enter the Ship To's email address.  What code can I add that will email the order confirmation to the address&#95;email field?  Thanks in advance,  YCB")*

Hi,

In your order details screenshot, the value of the custom field is empty for the billing address and it is only filled for the shipping address. But in your code, you use billing_address instead of shipping_address. So it's normal that you don't get the email address from the shipping address in the receiver field.

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

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

- **[lt635](/forum/user/32929-lt635 "View lt635's Profile")**
- [![lt635's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar32929.jpg)](/forum/user/32929-lt635 "View lt635's Profile")
- [ Offline](/forum/user/32929-lt635)

Less More

- Posts: 191
- Thank you received: 5
-
-

9 years 11 months ago [\#254389](#254389) by [lt635](/forum/user/32929-lt635 "View lt635's Profile")  Replied by *[lt635](/forum/user/32929-lt635 "View lt635's Profile")* on topic *[Send order email to Ship To customer field.](/forum/35-orders-management/868004-send-order-email-to-ship-to-customer-field#254389 "How can I send an order confirmation email to another email address?  My clients store is operating with sales reps who maintain several clients on the hikashop system. They have several ship to addresses and fill out orders on their behalf. Problem is both the Sales Rep and the Ship To require the order confirmation email.  I have currently added an address&#95;email field where the sales rep can enter the Ship To's email address.  What code can I add that will email the order confirmation to the address&#95;email field?  Thanks in advance,  YCB")*

Hi Nicolas,

Got it ![:)](/media/kunena/emoticons/8.png ":)") , problem solved.

Thank you
Kind regards
Lene

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

- **[lt635](/forum/user/32929-lt635 "View lt635's Profile")**
- [![lt635's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar32929.jpg)](/forum/user/32929-lt635 "View lt635's Profile")
- [ Offline](/forum/user/32929-lt635)

Less More

- Posts: 191
- Thank you received: 5
-
-

9 years 11 months ago [\#254593](#254593) by [lt635](/forum/user/32929-lt635 "View lt635's Profile")  Replied by *[lt635](/forum/user/32929-lt635 "View lt635's Profile")* on topic *[Send order email to Ship To customer field.](/forum/35-orders-management/868004-send-order-email-to-ship-to-customer-field#254593 "How can I send an order confirmation email to another email address?  My clients store is operating with sales reps who maintain several clients on the hikashop system. They have several ship to addresses and fill out orders on their behalf. Problem is both the Sales Rep and the Ship To require the order confirmation email.  I have currently added an address&#95;email field where the sales rep can enter the Ship To's email address.  What code can I add that will email the order confirmation to the address&#95;email field?  Thanks in advance,  YCB")*

Hi Nicholas,

Sorry to bother you again.....

I added another custom field address_salesrep. I tried a couple of solutions from the forum but it still does not show. The field is showing in order address backend and the name that is added on checkout, I just need it to print on the order invoice.

Thank you
Kind regards
Lene

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL29yZGVycy1tYW5hZ2VtZW50Lzg2ODAwNC1zZW5kLW9yZGVyLWVtYWlsLXRvLXNoaXAtdG8tY3VzdG9tZXItZmllbGQ/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: 86283
- Thank you received: 14263
-
-

9 years 11 months ago [\#254600](#254600) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Send order email to Ship To customer field.](/forum/35-orders-management/868004-send-order-email-to-ship-to-customer-field#254600 "How can I send an order confirmation email to another email address?  My clients store is operating with sales reps who maintain several clients on the hikashop system. They have several ship to addresses and fill out orders on their behalf. Problem is both the Sales Rep and the Ship To require the order confirmation email.  I have currently added an address&#95;email field where the sales rep can enter the Ship To's email address.  What code can I add that will email the order confirmation to the address&#95;email field?  Thanks in advance,  YCB")*

Hi,

Again, to be able to help, we'll need to have screenshots of what you've done to be able to tell you what's wrong.
Without those details we can only guess.
Could you provide a screenshot of the settings of the custom field and one from the order you've being useing for your tests ?
And the code modification that you did in the email in order to display the field ?

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

- **[lt635](/forum/user/32929-lt635 "View lt635's Profile")**
- [![lt635's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar32929.jpg)](/forum/user/32929-lt635 "View lt635's Profile")
- [ Offline](/forum/user/32929-lt635)

Less More

- Posts: 191
- Thank you received: 5
-
-

9 years 11 months ago [\#254668](#254668) by [lt635](/forum/user/32929-lt635 "View lt635's Profile")  Replied by *[lt635](/forum/user/32929-lt635 "View lt635's Profile")* on topic *[Send order email to Ship To customer field.](/forum/35-orders-management/868004-send-order-email-to-ship-to-customer-field#254668 "How can I send an order confirmation email to another email address?  My clients store is operating with sales reps who maintain several clients on the hikashop system. They have several ship to addresses and fill out orders on their behalf. Problem is both the Sales Rep and the Ship To require the order confirmation email.  I have currently added an address&#95;email field where the sales rep can enter the Ship To's email address.  What code can I add that will email the order confirmation to the address&#95;email field?  Thanks in advance,  YCB")*

Hi Nicolas,

I have attached an image of the custom field created and the order page in the backend. What I an trying to achieve is for the sales rep to print on the invoice.

I tried adding this to the notification email:
{LINEVAR:address_salesrep}
{VAR:address_salesrep}

Thank you
Kind regards
Lene

- [ ![custom-field.jpg](/forum/attachment/34499) ](/forum/attachment/34499 "custom-field.jpg") [ ](/forum/attachment/34499?download=1 "custom-field.jpg")
- [ ![invoice.jpg](/forum/attachment/34500) ](/forum/attachment/34500 "invoice.jpg") [ ](/forum/attachment/34500?download=1 "invoice.jpg")
- [ ![order.jpg](/forum/attachment/34501) ](/forum/attachment/34501 "order.jpg") [ ](/forum/attachment/34501?download=1 "order.jpg")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL29yZGVycy1tYW5hZ2VtZW50Lzg2ODAwNC1zZW5kLW9yZGVyLWVtYWlsLXRvLXNoaXAtdG8tY3VzdG9tZXItZmllbGQ/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: 86283
- Thank you received: 14263
-
-

9 years 11 months ago [\#254710](#254710) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Send order email to Ship To customer field.](/forum/35-orders-management/868004-send-order-email-to-ship-to-customer-field#254710 "How can I send an order confirmation email to another email address?  My clients store is operating with sales reps who maintain several clients on the hikashop system. They have several ship to addresses and fill out orders on their behalf. Problem is both the Sales Rep and the Ship To require the order confirmation email.  I have currently added an address&#95;email field where the sales rep can enter the Ship To's email address.  What code can I add that will email the order confirmation to the address&#95;email field?  Thanks in advance,  YCB")*

Hi,

These tags do not exist, so it's normal they don't work.
You want to use instead: {VAR:billing_address.address_salesrep}

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

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

- **[lt635](/forum/user/32929-lt635 "View lt635's Profile")**
- [![lt635's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar32929.jpg)](/forum/user/32929-lt635 "View lt635's Profile")
- [ Offline](/forum/user/32929-lt635)

Less More

- Posts: 191
- Thank you received: 5
-
-

9 years 11 months ago [\#254783](#254783) by [lt635](/forum/user/32929-lt635 "View lt635's Profile")  Replied by *[lt635](/forum/user/32929-lt635 "View lt635's Profile")* on topic *[Send order email to Ship To customer field.](/forum/35-orders-management/868004-send-order-email-to-ship-to-customer-field#254783 "How can I send an order confirmation email to another email address?  My clients store is operating with sales reps who maintain several clients on the hikashop system. They have several ship to addresses and fill out orders on their behalf. Problem is both the Sales Rep and the Ship To require the order confirmation email.  I have currently added an address&#95;email field where the sales rep can enter the Ship To's email address.  What code can I add that will email the order confirmation to the address&#95;email field?  Thanks in advance,  YCB")*

Hi Nicolas,

Fantastic! I knew something was missing...

Sorry, one last question....
With the email notification, I have a field so you can add one email under billing and one under shipping. If we did want the email to go to one person under billing and another email under shipping is this the best way to include it:

&lt;?php $data-&gt;customer-&gt;user_email = array($data-&gt;customer-&gt;user_email,$data-&gt;cart-&gt;billing_address-&gt;address_email); ?&gt;
&lt;?php $data-&gt;customer-&gt;user_email = array($data-&gt;customer-&gt;user_email,$data-&gt;cart-&gt;shipping_address-&gt;address_email); ?&gt;

I have tested it and it is working.

I am really happy, my client too, with the changes we have been able to make.

Thank you
Kind regards
Lene

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL29yZGVycy1tYW5hZ2VtZW50Lzg2ODAwNC1zZW5kLW9yZGVyLWVtYWlsLXRvLXNoaXAtdG8tY3VzdG9tZXItZmllbGQ/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: 86283
- Thank you received: 14263
-
-

9 years 11 months ago [\#254853](#254853) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Send order email to Ship To customer field.](/forum/35-orders-management/868004-send-order-email-to-ship-to-customer-field#254853 "How can I send an order confirmation email to another email address?  My clients store is operating with sales reps who maintain several clients on the hikashop system. They have several ship to addresses and fill out orders on their behalf. Problem is both the Sales Rep and the Ship To require the order confirmation email.  I have currently added an address&#95;email field where the sales rep can enter the Ship To's email address.  What code can I add that will email the order confirmation to the address&#95;email field?  Thanks in advance,  YCB")*

Hi,

The best is to do that: Code:

&lt;?php $data-&gt;customer-&gt;user_email = array($data-&gt;customer-&gt;user_email,$data-&gt;cart-&gt;shipping_address-&gt;address_email, $data-&gt;cart-&gt;billing_address-&gt;address_email); ?&gt;

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

- **[lt635](/forum/user/32929-lt635 "View lt635's Profile")**
- [![lt635's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar32929.jpg)](/forum/user/32929-lt635 "View lt635's Profile")
- [ Offline](/forum/user/32929-lt635)

Less More

- Posts: 191
- Thank you received: 5
-
-

9 years 11 months ago [\#254925](#254925) by [lt635](/forum/user/32929-lt635 "View lt635's Profile")  Replied by *[lt635](/forum/user/32929-lt635 "View lt635's Profile")* on topic *[Send order email to Ship To customer field.](/forum/35-orders-management/868004-send-order-email-to-ship-to-customer-field#254925 "How can I send an order confirmation email to another email address?  My clients store is operating with sales reps who maintain several clients on the hikashop system. They have several ship to addresses and fill out orders on their behalf. Problem is both the Sales Rep and the Ship To require the order confirmation email.  I have currently added an address&#95;email field where the sales rep can enter the Ship To's email address.  What code can I add that will email the order confirmation to the address&#95;email field?  Thanks in advance,  YCB")*

Perfect ![:)](/media/kunena/emoticons/8.png ":)"), thank you!

Kind regards
Lene

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

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

[](#top)
