Order History Information in Admin order notifcation

  • Posts: 5
  • Thank you received: 0
6 years 3 months ago #286522

-- HikaShop version -- : 3.2.2

Hi,

Is there a way to include order history information table into the admin order email notification?

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

  • Posts: 81539
  • Thank you received: 13069
  • MODERATOR
6 years 3 months ago #286529

Hi,

There is no easy way.
However, the admin order notification is sent when the order is created, so there will always be only one line in the history table at that point without much information besides the fact that the order status is "created" and the IP of the customer.

Nevertheless, if you want to do that, you'll have to edit the email via the menu System>Emails and add custom code there.

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

  • Posts: 5
  • Thank you received: 0
6 years 2 months ago #286676

Thanks. Here are some more details. We are storing a Purchase Order number in the history_data field in the database. I have tried this in the notification email and it has not worked.

<?php
$userClass = hikashop_get('class.user');
foreach($this->order->history as $k => $history) {
echo $history->history_data;
}
?>
Am I not doing this correctly?

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

  • Posts: 81539
  • Thank you received: 13069
  • MODERATOR
6 years 2 months ago #286679

Hi,

$this->order doesn't exist in the emails.
You need to replace it by $data->cart and that should work.

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

Time to create page: 0.062 seconds
Powered by Kunena Forum