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

#   Send order created email to custom field email address

##

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

Less More

- Posts: 10
- Thank you received: 0
-
-

3 years 10 months ago [\#348197](#348197) by [Adnohr](/forum/user/65625-adnohr "View Adnohr's Profile")  *[Send order created email to custom field email address](/forum/35-orders-management/905684-send-order-created-email-to-custom-field-email-address#348197 "-- HikaShop version -- : 4.7.0 -- Joomla version -- : 3.10.11  Hi,  I found this:   www.hikashop.com/support/forum/4-how-to/...firmation-email.html  which is similar to the issue I'm trying to deal with.  We have 2 warehouses and depending on the user, we'd like the order emails to go directly to the correct warehouse email address. I created a single drop-down custom field called 'dispatch' and set the value to the 2 different email addresses.  How do I get the order emails to use the value in the custom field to send the email?  Thanks for your help.")* was created by *[Adnohr](/forum/user/65625-adnohr "View Adnohr's Profile")*

-- HikaShop version -- : 4.7.0
-- Joomla version -- : 3.10.11

Hi,

I found this: [ www.hikashop.com/support/forum/4-how-to/...firmation-email.html](https://www.hikashop.com/support/forum/4-how-to/872622-add-custom-bcc-on-admin-confirmation-email.html) which is similar to the issue I'm trying to deal with.

We have 2 warehouses and depending on the user, we'd like the order emails to go directly to the correct warehouse email address. I created a single drop-down custom field called 'dispatch' and set the value to the 2 different email addresses.

How do I get the order emails to use the value in the custom field to send the email?

Thanks for your help.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL29yZGVycy1tYW5hZ2VtZW50LzkwNTY4NC1zZW5kLW9yZGVyLWNyZWF0ZWQtZW1haWwtdG8tY3VzdG9tLWZpZWxkLWVtYWlsLWFkZHJlc3M/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?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86556
- Thank you received: 14304
-
-

3 years 10 months ago [\#348201](#348201) 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 created email to custom field email address](/forum/35-orders-management/905684-send-order-created-email-to-custom-field-email-address#348201 "-- HikaShop version -- : 4.7.0 -- Joomla version -- : 3.10.11  Hi,  I found this:   www.hikashop.com/support/forum/4-how-to/...firmation-email.html  which is similar to the issue I'm trying to deal with.  We have 2 warehouses and depending on the user, we'd like the order emails to go directly to the correct warehouse email address. I created a single drop-down custom field called 'dispatch' and set the value to the 2 different email addresses.  How do I get the order emails to use the value in the custom field to send the email?  Thanks for your help.")*

Hi,

You would have to first create a custom field of the table "order" and of the type "single dropdown" via the menu Display&gt;Custom fields. In the DATA section, you would enter the email addresses in the "value" area and the name of the warehouses in the "title" area.
That way, the customer would be able to select the warehouse during the checkout.
Then, you can customize the emails via the menu System&gt;Emails and add such code at the end of the preload section: Code:

$mail-&gt;bcc_email = array($data-&gt;cart-&gt;xxx);

where xxx is the column name of your custom field. That way, a copy of the email will be sent to the email address selected by the customer.

Note however that since that thread, our solutions have evolved.
Now, with HikaMarket Multivendor, you could configure each warehouse as a vendor and activate the setting to allow the customer to select the vendor during the checkout with the "Allow vendor selector" setting:
[ www.hikashop.com/support/documentation/1...onfig\_market\_general](https://www.hikashop.com/support/documentation/143-hikamarket-configuration.html#config_market_general)
That way, you could do it without any customization.

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

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

Less More

- Posts: 10
- Thank you received: 0
-
-

3 years 10 months ago [\#348242](#348242) by [Adnohr](/forum/user/65625-adnohr "View Adnohr's Profile")  Replied by *[Adnohr](/forum/user/65625-adnohr "View Adnohr's Profile")* on topic *[Send order created email to custom field email address](/forum/35-orders-management/905684-send-order-created-email-to-custom-field-email-address#348242 "-- HikaShop version -- : 4.7.0 -- Joomla version -- : 3.10.11  Hi,  I found this:   www.hikashop.com/support/forum/4-how-to/...firmation-email.html  which is similar to the issue I'm trying to deal with.  We have 2 warehouses and depending on the user, we'd like the order emails to go directly to the correct warehouse email address. I created a single drop-down custom field called 'dispatch' and set the value to the 2 different email addresses.  How do I get the order emails to use the value in the custom field to send the email?  Thanks for your help.")*

Hi,

This is close but a bit too far. We don't actually need the customer to pick the warehouse because the staff will set that in the backend. I've made a custom field: user_dispatch

I have put the emails in the 'Value' column.

Also, we don't really need to use CC/BCC, I rather that the email was sent directly to the right place rather than just copied to it with BCC.

Thanks again for your help.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL29yZGVycy1tYW5hZ2VtZW50LzkwNTY4NC1zZW5kLW9yZGVyLWNyZWF0ZWQtZW1haWwtdG8tY3VzdG9tLWZpZWxkLWVtYWlsLWFkZHJlc3M/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?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86556
- Thank you received: 14304
-
-

3 years 10 months ago [\#348243](#348243) 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 created email to custom field email address](/forum/35-orders-management/905684-send-order-created-email-to-custom-field-email-address#348243 "-- HikaShop version -- : 4.7.0 -- Joomla version -- : 3.10.11  Hi,  I found this:   www.hikashop.com/support/forum/4-how-to/...firmation-email.html  which is similar to the issue I'm trying to deal with.  We have 2 warehouses and depending on the user, we'd like the order emails to go directly to the correct warehouse email address. I created a single drop-down custom field called 'dispatch' and set the value to the 2 different email addresses.  How do I get the order emails to use the value in the custom field to send the email?  Thanks for your help.")*

Hi,

Then, in the order admin notiifcation, you should be able to do it by add this at the end of the preload section : Code:

$data-&gt;customer-&gt;user_email = $data-&gt;cart-&gt;user_dispatch;

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

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

Less More

- Posts: 10
- Thank you received: 0
-
-

3 years 10 months ago [\#348290](#348290) by [Adnohr](/forum/user/65625-adnohr "View Adnohr's Profile")  Replied by *[Adnohr](/forum/user/65625-adnohr "View Adnohr's Profile")* on topic *[Send order created email to custom field email address](/forum/35-orders-management/905684-send-order-created-email-to-custom-field-email-address#348290 "-- HikaShop version -- : 4.7.0 -- Joomla version -- : 3.10.11  Hi,  I found this:   www.hikashop.com/support/forum/4-how-to/...firmation-email.html  which is similar to the issue I'm trying to deal with.  We have 2 warehouses and depending on the user, we'd like the order emails to go directly to the correct warehouse email address. I created a single drop-down custom field called 'dispatch' and set the value to the 2 different email addresses.  How do I get the order emails to use the value in the custom field to send the email?  Thanks for your help.")*

Doesn't seem to be send the email, did I do something wrong?

- [ ![line-code.jpg](/forum/attachment/56314) ](/forum/attachment/56314 "line-code.jpg") [ ](/forum/attachment/56314?download=1 "line-code.jpg")
- [ ![custom-field.jpg](/forum/attachment/56315) ](/forum/attachment/56315 "custom-field.jpg") [ ](/forum/attachment/56315?download=1 "custom-field.jpg")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL29yZGVycy1tYW5hZ2VtZW50LzkwNTY4NC1zZW5kLW9yZGVyLWNyZWF0ZWQtZW1haWwtdG8tY3VzdG9tLWZpZWxkLWVtYWlsLWFkZHJlc3M/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?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86556
- Thank you received: 14304
-
-

3 years 10 months ago [\#348294](#348294) 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 created email to custom field email address](/forum/35-orders-management/905684-send-order-created-email-to-custom-field-email-address#348294 "-- HikaShop version -- : 4.7.0 -- Joomla version -- : 3.10.11  Hi,  I found this:   www.hikashop.com/support/forum/4-how-to/...firmation-email.html  which is similar to the issue I'm trying to deal with.  We have 2 warehouses and depending on the user, we'd like the order emails to go directly to the correct warehouse email address. I created a single drop-down custom field called 'dispatch' and set the value to the 2 different email addresses.  How do I get the order emails to use the value in the custom field to send the email?  Thanks for your help.")*

Hi,

Your custom field column name is not user_dispatch but dispatch, and it is in the "user" table, not the "order" table so you need to change the code to: Code:

$data-&gt;customer-&gt;user_email = $data-&gt;customer-&gt;dispatch;

The following user(s) said Thank You: [Adnohr](/forum/user/65625-adnohr "View Adnohr's Profile")

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

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