- Posts: 71
- Thank you received: 0
Custom fields in administrator email notification
-- HikaShop version -- : 2.2.3
-- Joomla version -- : 3.2.1
-- PHP version -- : 5.3.10
-- Browser(s) name and version -- : XXXXX x.x.x
-- Error-message(debug-mod must be tuned on) -- : Error_message
Hi
I have some custom fields in table user.
How I can see in the ORDER_ADMIN_NOTIFICATION_SUBJECT, ORDER_CREATION_NOTIFICATION_SUBJECT and ORDER_STATUS_NOTIFICATION_SUBJECT include the custom fields in the table "user"
Thanks
Regards
Please Log in or Create an account to join the conversation.
- Posts: 12953
- Thank you received: 1778
There is no option to do that, so the solution will be to edit the file "administrator\components\com_hikashop\classes\order.php" and edit this line :
Please Log in or Create an account to join the conversation.
Could you help with the code, please? the custom fileds in User Table are "Name, Last Name, VAT number, Address and City)
Yes, these field are same the adress table, but I need use this fields in the User table with custom fields :blush:
Please Log in or Create an account to join the conversation.
Do you want to add them in the subject of the email or in the email body ?
If it is in the body, you can use code like:
Please Log in or Create an account to join the conversation.
Yes in the email body. This CODE is in the class order.php or in the email template? Where in the code?
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
I got it using this code:
It's correct too?
Thanks
Please Log in or Create an account to join the conversation.
Yes it's correct too.
Please Log in or Create an account to join the conversation.
Do you want to add them in the subject of the email or in the email body ?
If it is in the body, you can use code like:
{VAR:user.custom_field_name}
Following your example, I added this code in the order admin notification email body :
infosutiles is the name of my address custom field.
But I only see the text "Infos utiles :" but nothing else in the notification email...
I also tried : {VAR:user.infosutiles} and {VAR:user.address.infosutiles}. None of them are working.
Can you help on this ?
Thanks !
Please Log in or Create an account to join the conversation.
Remember that you can have both a billing and a shipping address.
Because of that, we had to separate them.
So you can do either:
{VAR:billing_address.infosutiles}
or:
{VAR:shipping_address.infosutiles}
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.