- Posts: 3
- Thank you received: 0
Re: include a custom field in the confirmation emails?
Please Log in or Create an account to join the conversation.
Custom order fields will be included in the email to the administrator automatically.
For the email sent to the user, you will have to edit the "order creation notification" email via the menu System->Emails and add the code below in it if you want the user to also have the information in his email :
Please Log in or Create an account to join the conversation.
You say that custom emails will be sent in the admin email automatically. All I'm getting in the admin email is the order number and the order total, and a link to the backend for more order details.
If the admin email is supposed to contain all the fields, what am I doing wrong?
And thanks for a great component!
Please Log in or Create an account to join the conversation.
These custom fields are the ones which go in the email to the administrator. If you created a custom field of the table "address" it will be for the address, not for the order.
Please Log in or Create an account to join the conversation.
I am, however, not able to get the customers name to appear in the administrator email, only the order number. How do I get the customer name to show up in the admin email?
I have also noticed that when people type into my custom field on the front end, the submit button does not do anything the first time you click it. It works once you click it a second time. Any suggestions as this can be confusing for customers.
Cheers
Please Log in or Create an account to join the conversation.
$user = hikashop::loadUser(true);
echo $user->name;
It's for them to verify the information. If you want to change that, you will have to change the code:
$changed = false;
to:
$changed = true;
in the file components/com_hikashop/controllers/checkout.php
Please Log in or Create an account to join the conversation.
I've got a problem with the address_street2 field in the client and admin Email. It's not included in both admin and client Emails.
The first address_street is included o.k. I went over all the parameters and there is no difference between the two.
I've attached a screen shot of both fields.
Guy.
Please Log in or Create an account to join the conversation.
You need to edit the views "order / address_template" (backend template) and "address / address_template" (frontend template) and add the entry:
Please Log in or Create an account to join the conversation.
I've added the line to the view and it works great.
I've encountered another issue with the same order view. I've created a second phone field for mobile phones. I've added the field and it shows up on the customer login page. But, it is not showing up in the next page with the details.
Checked my DB and the column is there with the right data. It's just not showing in the front end or in the admin and client Emails.
Pleas see attached images.
Thank you again for the quick and kind support.
Guy.
Please Log in or Create an account to join the conversation.
If you use:
MOBILETELEPHONE="Phone: %s"
Else you can only use:
Or:
Please Log in or Create an account to join the conversation.
Best support EVER!!!
Please Log in or Create an account to join the conversation.
I also try to put a custom field in the customer e-mail.
I created a custom field named "address_geburtsdatum".
I tried several variantions to put it to the e-mail which I found on this forum:
{VAR:ADDRESS_GEBURTSDATUM}
{LINEVAR:ADDRESS_GEBURTSDATUM}
{TXT:ADDRESS_GEBURTSDATUM}
{VAR:address.geburtsdatum}
{VAR:address.address_geburtsdatum}
I added {address_geburtsdatum} to address / address_template.php. order / address_template.php is not existing.
Any ideas?
Please Log in or Create an account to join the conversation.
You should not change the email code for address custom fields.
As you found on the forum, you need to add the {address_geburtsdatum} tag to both address_template view files.
And they both do exist. If you see only one, it means that you used some of the dropdowns at the top of the views listing to restrict the results. Undo these selections, and only enter "address_template" in the search box and you'll find them.
Please Log in or Create an account to join the conversation.
Could you tell me also how to add the customers E-Mail Adresse to the template?
It would be strange to add another custom field for it, because the user already provides his e-mail during registration. Do you have another hint for me?
Please Log in or Create an account to join the conversation.
You can add such tag in the email template:
{VAR:user.user_email}
Please Log in or Create an account to join the conversation.
the customer has to receive the same version of confirmation mail as the user. Therefore I am just using the confirmation mail and send the same mail vie cc to my client.
I added the line {VAR:user.user_email} but the e-mail didn't contain the users e-mail.
Please Log in or Create an account to join the conversation.
I just tried and it is working on our end, the email address is well displayed in the email.
Are you using a guest checkout ? Is the plugin "Redirect Joomla registration to HikaShop plugin" enabled ?
Please Log in or Create an account to join the conversation.
- Posts: 13
- Thank you received: 0
$fieldsClass = hikashop::get('class.field');
$fields = $fieldsClass->getFields('frontcomp',$data,'order','');
foreach($fields as $fieldName => $oneExtraField) {
echo "\r\n".$fieldsClass->trans($oneExtraField->field_realname).' : '.$fieldsClass->show($oneExtraField,$data->$fieldName);
}
Thank you.
Please Log in or Create an account to join the conversation.
This thread is really old (more than 5 years for the first message, more than 1 year for the last one).
I'm afraid that the context is not the same, specially when new feature has been added in HikaShop 2.6 in order to improve the display of custom fields.
You don't need to add such code with recent versions of HikaShop. You can just configure the display settings of your custom field and it will display in the emails.
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.
Please Log in or Create an account to join the conversation.