- Posts: 17
- Thank you received: 0
Put Order ref details in email subject
- bobhawthorne
-
Topic Author
- Offline
-- Joomla version -- : 3.6
Hi
How can we get some order details put in the subject line of notification emails?
This is for the shop owner not the customer - they would like the customer name inserted in the subject I think.
Thanks
Please Log in or Create an account to join the conversation.
There is no easy override system for that.
You'll have to edit the code of the file administrator/components/com_hikashop/classes/order.php to do it but the code will depends based on which email you want to modify exactly.
Actually, we're working on a modification for the next version of HikaShop so that you'll be able to add tags in the translation of the subject of emails like that {customer.name} to easily do that. So if it's not urgent, I would recommend to wait until then to do that.
Please Log in or Create an account to join the conversation.
When do you expect this new version to be available with the feature of being able to add the customer's name to the notification emails?
Please Log in or Create an account to join the conversation.
The next version of my previous message has been released a few weeks ago and thus, if you have HikaShop 2.6.4, you already have that modification.
Please Log in or Create an account to join the conversation.
- bobhawthorne
-
Topic Author
- Offline
- Posts: 17
- Thank you received: 0
Please Log in or Create an account to join the conversation.
Well, it's what I said two messages above:
So edit the email, and in the subject of the email, you can modify your text to have such tags.you'll be able to add tags in the translation of the subject of emails like that {customer.name}
Please Log in or Create an account to join the conversation.
Tried modifying the subject line of the Order Administrator Notification email with the line "Web Order - {customer.name}" and it came back with only "Web Order - " as the subject in the email. Is there something else that needs to be done to get this to work? I have already upgraded to 2.6.4
Please Log in or Create an account to join the conversation.
Thanks for the feedback. Then, can you try changing the code:
Please Log in or Create an account to join the conversation.
Modified that code but am getting the same results. No customer name included on the subject line.
Please Log in or Create an account to join the conversation.
Thanks. I've done additional tests and I think it comes from this line in my code:
list($table, $var) = explode($var, '.', 2);
Replace it by:
list($table, $var) = explode('.', $var, 2);
That fixes the problem on my end.
Please Log in or Create an account to join the conversation.
Now I get the word "Array" instead of the customer's name
Any more thoughts as to why it isn't working for me?
Please Log in or Create an account to join the conversation.
I'm out of ideas. I've done the tests and fix myself on my end and it's now working for me.
Could you provide a backend access and FTP access and some instructions to easily reproduce the problem on your website so that we could have a look at it ?
You can send that with a link to this thread via our contact form:
www.hikashop.com/support/contact-us.html
Please Log in or Create an account to join the conversation.
We got your backend access but your mesage didn't contain information for a FTP access. Could you also provide a FTP access so that we can move forward please ?
Please Log in or Create an account to join the conversation.
We got your FTP access but it doesn't allow us to access your website files:
take.ms/xZfvh
Could you do something about that please ?
Please Log in or Create an account to join the conversation.
I've adapted the code to:
Please Log in or Create an account to join the conversation.
It still is not working. The subject line on the notification email still says "Array" instead of the customer's name.
Please Log in or Create an account to join the conversation.
I'm not able to reproduce the problem on your website.
I've changed temporarily your "order admin notification email address" to our contact email address and you can see that the subject of the email we receive correctly contains the name of the user account of our test user account:
take.ms/cTVn3
And that's the same with the tests we did on our local test server.
Please Log in or Create an account to join the conversation.
Just figure a little bit more out.
It is working if the customer is registered. It is not if the customer checks out as guest. Also appears to be only using the First Name, Full name if possible, would be much more useful.
Also upon clicking "Finish" there is coding that comes up in the pop up window. Please see attached.
Thank you for all your attention to this.
Please Log in or Create an account to join the conversation.
It's normal that it doesn't work if the user is a guest since there user no user account for him and the name field of the user account that it used by that tag is not available.
Then, instead of that tag, you probably want to use the tags {billing_address.address_firstname} {billing_address.address_lastname}
so that the information comes from the billing address which is always there.
Please Log in or Create an account to join the conversation.
where to put that tags {billing_address.address_firstname} {billing_address.address_lastname}?
In translations file or in email config email subject field?
Please Log in or Create an account to join the conversation.