extra fields in admin notification mail

  • Posts: 41
  • Thank you received: 0
12 years 4 months ago #56584

Hi,

how would I go about to have values of extra defined fields in the admin notification field (order_admin_notification.html.php) ?


cheers!

BC

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

  • Posts: 82867
  • Thank you received: 13373
  • MODERATOR
12 years 4 months ago #56607

What kind of custom fields info do you want to add there ?

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

  • Posts: 41
  • Thank you received: 0
12 years 4 months ago #56630

One of the "own fields" that have been defined for a customer, or even the standard fields that are associated with a customer.

Cheers!

BC

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

  • Posts: 82867
  • Thank you received: 13373
  • MODERATOR
12 years 4 months ago #56670

That doesn't help.
There are 7 tables for custom fields: user, address, category, order, product, entry and item.
For each one, the way to display it will be different.
Please do a screenshot of the options of your custom field so that we can see what you're trying to display.

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

  • Posts: 41
  • Thank you received: 0
12 years 4 months ago #56699

OK - hope this helps. It's in Dutch though, but you'll probably recognize it.

Cheers,

BC

Attachments:

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

  • Posts: 82867
  • Thank you received: 13373
  • MODERATOR
12 years 4 months ago #56744

You will have to edit the order admin notification email via the menu System->Emails and add some code like that:

<?php
$class = hikashop_get('class.user');
$user = $class->get($data->order_user_id);
echo $user->ax_customer_code;
?>

You can try to add it at the end for example.

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

  • Posts: 41
  • Thank you received: 0
12 years 4 months ago #57237

Hi,

I entered this code at the desired location. The code is executed as the output of an extra "echo" command is shown, however it seems that the field's value is not shown. I suppose something is not quite right in the code?

thx,

BC

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

  • Posts: 41
  • Thank you received: 0
12 years 4 months ago #57241

Wait a sec, utter brain-fart: I was testing with a user where this field was not filled in. DUH.

Works like a charm, cheers!

BC

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

Time to create page: 0.064 seconds
Powered by Kunena Forum