Add custom Address fields to admin order email

  • Posts: 202
  • Thank you received: 2
10 years 10 months ago #139069

-- 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.

  • Posts: 13201
  • Thank you received: 2322
10 years 10 months ago #139167

Hi,

Have you tried with, for example:

{LINEVAR:address.PURCHASE_ORDER}

The following user(s) said Thank You: momentis

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

  • Posts: 202
  • Thank you received: 2
10 years 10 months ago #139181

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.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
10 years 10 months ago #139184

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

{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.

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.
The following user(s) said Thank You: momentis

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

  • Posts: 202
  • Thank you received: 2
10 years 10 months ago #139191

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.071 seconds
Powered by Kunena Forum