- Posts: 16
- Thank you received: 0
Changing the customers name in emails
- rossdesigns
-
Topic Author
- Offline
Less
More
14 years 1 month ago #60752
by rossdesigns
Changing the customers name in emails was created by rossdesigns
Hi,
I have a site where there is no registration at checkout.
This has resulted in the emails for 'order creation notification' and 'order status notification' having 'Hi ,' at the start of the email.
To have the email start with 'Hi [billing address->first name],' what do I need to change in the code:
echo JText::sprintf('HI_CUSTOMER',@$data->customer->name);?>
and
echo JText::sprintf('HI_CUSTOMER',@$customer->name);?>
Thanks,
Geoff
I have a site where there is no registration at checkout.
This has resulted in the emails for 'order creation notification' and 'order status notification' having 'Hi ,' at the start of the email.
To have the email start with 'Hi [billing address->first name],' what do I need to change in the code:
echo JText::sprintf('HI_CUSTOMER',@$data->customer->name);?>
and
echo JText::sprintf('HI_CUSTOMER',@$customer->name);?>
Thanks,
Geoff
Please Log in or Create an account to join the conversation.
14 years 1 month ago #60754
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Replied by Jerome on topic Re: Changing the customers name in emails
Hi,
In the creation notification and status notification emails you can use:
Regards,
In the creation notification and status notification emails you can use:
Code:
echo @$data->cart->billing_address->address_firstname;
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Please Log in or Create an account to join the conversation.
- rossdesigns
-
Topic Author
- Offline
Less
More
- Posts: 16
- Thank you received: 0
14 years 1 month ago #60797
by rossdesigns
Replied by rossdesigns on topic Re: Changing the customers name in emails
Thanks Jerome
Please Log in or Create an account to join the conversation.
13 years 11 months ago #69683
by Rolandus1
Replied by Rolandus1 on topic Re: Changing the customers name in emails
Hi refreshing this thread:
I put the following line in the "Order creation notification" template
<?php echo JText::sprintf('HI_CUSTOMER',@$data->cart->billing_address->address__title." ".@$data->customer->name);?>
In the e-mail to the customer the output is ""Hello Mr. XXXYYY".
But my Page is in German and the Shop (Select in Registration and Output auf Title in the shipping Adress) is korrect in German (Herr, Frau).
What I have to do, to get in the email the German Traslation of what User see on Webpage in the Select (drop down) for the Titel (Mr, Ms)?
Thank you
I put the following line in the "Order creation notification" template
<?php echo JText::sprintf('HI_CUSTOMER',@$data->cart->billing_address->address__title." ".@$data->customer->name);?>
In the e-mail to the customer the output is ""Hello Mr. XXXYYY".
But my Page is in German and the Shop (Select in Registration and Output auf Title in the shipping Adress) is korrect in German (Herr, Frau).
What I have to do, to get in the email the German Traslation of what User see on Webpage in the Select (drop down) for the Titel (Mr, Ms)?
Thank you
Please Log in or Create an account to join the conversation.
13 years 11 months ago - 10 years 7 months ago #69888
by nicolas
Replied by nicolas on topic Re: Changing the customers name in emails
Hi,
Instead of @$data->cart->billing_address->address_title, you should have:
JText::_(preg_replace('#[^a-z0-9]#i','_',strtoupper(@$data->cart->billing_address->address_title))
That will convert the data in the database, which is always in english, to the current language.
Instead of @$data->cart->billing_address->address_title, you should have:
JText::_(preg_replace('#[^a-z0-9]#i','_',strtoupper(@$data->cart->billing_address->address_title))
That will convert the data in the database, which is always in english, to the current language.
Last edit: 10 years 7 months ago by nicolas.
Please Log in or Create an account to join the conversation.
Time to create page: 0.208 seconds