Skip to main content

Add custom Address fields to admin order email

12 years 9 months ago #139069 by momentis
-- url of the page with the problem -- : www.baycorporation.com
-- HikaShop version -- : 2.2.3
-- Joomla version -- : 3.2.1
-- PHP version -- : 5.3.21
-- Browser(s) name and version -- : Firefox 26.0
-- Error-message(debug-mod must be tuned on) -- : No error message

I have created several custom Address fields (purchase_order, shipping_comments, general_comments) which I would like to include in the Administrator Order Notification email. I have looked over this thread . I cannot seem to figure out how to insert these fields in the email. Is there a way to do this within the email setup (as referenced in above post, was coming in next version of HS)? Or, do I need to edit a php file?

Thanks!
Rick

Please Log in or Create an account to join the conversation.

12 years 9 months ago #139167 by Xavier
Hi,

Have you tried with, for example:
Code:
{LINEVAR:address.PURCHASE_ORDER}
The following user(s) said Thank You: momentis

Please Log in or Create an account to join the conversation.

12 years 9 months ago #139181 by momentis
Yes, because I had found that in a prior post. nicolas had mentioned that the functionality to use that verbiage would be implemented in the next release of HS, but I am beginnig to think perhaps that was not included in the latest release.

When I insert that code, that's exactly what shows on the email - {LINEVAR:address.PURCHASE_ORDER}.

Please Log in or Create an account to join the conversation.

12 years 9 months ago #139184 by Jerome
Hi,

You have to insert the content into the html part of the mail you want to edit ( order_admin_notification I guess ).
"LINEVAR" is used for products in the cart so you your case, you will use "VAR" instead.

In the mail, you can read the content of the billing_address and of the shipping_address. I suppose that you want to read it from the shipping one.
So you can put in the HTML content
Code:
{VAR:shipping_address.purchase_order}
In this code I suppose that "purchase_order" is the namekey of your custom field. It is, in fact, the name of the column in the database.

Regards,

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
The following user(s) said Thank You: momentis

Please Log in or Create an account to join the conversation.

12 years 9 months ago #139191 by momentis
That did it Jerome! Thank you SO much!!! I had tried using {VAR..., but it was not working because I was just using "address." instead of "shipping_address.".

Again, think you very much!!

Please Log in or Create an account to join the conversation.

Time to create page: 0.100 seconds
Powered by Kunena Forum