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

#   Use Guest Name in customer emails

##

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

Less More

- Posts: 24
- Thank you received: 0
-
-

9 years 6 months ago [\#267002](#267002) by [gojyuan](/forum/user/47476-gojyuan "View gojyuan's Profile")  *[Use Guest Name in customer emails](/forum/33-customers/889741-use-guest-name-in-customer-emails#267002 "-- HikaShop version -- : 3.0.1 Business -- Joomla version -- : 3.6.5 -- PHP version -- : 5.6.29  Hi,  We are using guest checkout only I and would like to populate the email To Name with the customers name from the address table.  Also could you please tell me where the HTML customisation and preload customisation files are stored. When searching for code it is easier to do it outside of the back end using an editor search option.  Much appreciated.  Regards Linda")* was created by *[gojyuan](/forum/user/47476-gojyuan "View gojyuan's Profile")*

-- HikaShop version -- : 3.0.1 Business
-- Joomla version -- : 3.6.5
-- PHP version -- : 5.6.29

Hi,

We are using guest checkout only I and would like to populate the email To Name with the customers name from the address table.

Also could you please tell me where the HTML customisation and preload customisation files are stored. When searching for code it is easier to do it outside of the back end using an editor search option.

Much appreciated.

Regards
Linda

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

Less More

- Posts: 86286
- Thank you received: 14263
-
-

9 years 6 months ago [\#267044](#267044) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Use Guest Name in customer emails](/forum/33-customers/889741-use-guest-name-in-customer-emails#267044 "-- HikaShop version -- : 3.0.1 Business -- Joomla version -- : 3.6.5 -- PHP version -- : 5.6.29  Hi,  We are using guest checkout only I and would like to populate the email To Name with the customers name from the address table.  Also could you please tell me where the HTML customisation and preload customisation files are stored. When searching for code it is easier to do it outside of the back end using an editor search option.  Much appreciated.  Regards Linda")*

Hi,

You can add such code to the email and that should do it:
&lt;?php $data-&gt;customer-&gt;name = @$data-&gt;cart-&gt;billing_address-&gt;address_title." ".@$data-&gt;cart-&gt;billing_address-&gt;address_firstname." ".@$data-&gt;cart-&gt;billing_address-&gt;address_lastname; ?&gt;

They are stored in media/com_hikashop/mail/

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

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

Less More

- Posts: 24
- Thank you received: 0
-
-

9 years 6 months ago [\#267115](#267115) by [gojyuan](/forum/user/47476-gojyuan "View gojyuan's Profile")  Replied by *[gojyuan](/forum/user/47476-gojyuan "View gojyuan's Profile")* on topic *[Use Guest Name in customer emails](/forum/33-customers/889741-use-guest-name-in-customer-emails#267115 "-- HikaShop version -- : 3.0.1 Business -- Joomla version -- : 3.6.5 -- PHP version -- : 5.6.29  Hi,  We are using guest checkout only I and would like to populate the email To Name with the customers name from the address table.  Also could you please tell me where the HTML customisation and preload customisation files are stored. When searching for code it is easier to do it outside of the back end using an editor search option.  Much appreciated.  Regards Linda")*

HI,

Thank you. I wasn't very clear with my question.

I am using HikaMarket and my vendors will be sending customer emails from the vendor control panel in the front end. I can see the email is generated from HikaShop ( blue ) and the popup box has the guest email ( To Address ) and a blank To Name. I wanted to fill the name with the guest name from the billing address.

Also the email is being sent from the vendor. The email is picking up the store name. I have tried to change the 'regards' to use the vendor name but do not know where it may be stored. I have tried $data-&gt;vendor-&gt;vendor_name and $data-&gt;order-&gt;vendor-&gt;vendor_name with no luck.

This is the original code
JText::sprintf('BEST_REGARDS_CUSTOMER',$mail-&gt;from_name),

Thank you.

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

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26394
- Thank you received: 4078
-
- [](http://obsi.dev)
-

9 years 6 months ago [\#267116](#267116) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Use Guest Name in customer emails](/forum/33-customers/889741-use-guest-name-in-customer-emails#267116 "-- HikaShop version -- : 3.0.1 Business -- Joomla version -- : 3.6.5 -- PHP version -- : 5.6.29  Hi,  We are using guest checkout only I and would like to populate the email To Name with the customers name from the address table.  Also could you please tell me where the HTML customisation and preload customisation files are stored. When searching for code it is easier to do it outside of the back end using an editor search option.  Much appreciated.  Regards Linda")*

Hello,

In the email preload, you can access to the $mail object which contains the different values for the email address and the name.
You can modify these values in the preload and they will be used afterwards when the email is sent. Code:

$mail-&gt;dst_name = @$data-&gt;cart-&gt;billing_address-&gt;address_firstname;

If you want to sign with the vendor name, it will be more complicated because you're in an HikaShop email (so in the HikaShop context) ; the order is the customer order and not the vendor one, so the vendor information cannot be reach like that (specially if the order can have products of several vendors in the same time).

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

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

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

[](#top)
