Skip to main content

Trigger hikashop to send "order status notification" email through a PHP script

More
9 years 11 months ago #253777 by veeco
-- HikaShop version -- : 2.6.0

Hello

Is there a script to trigger the order status notification email? I want to create a script to automatically cancel order after certain period of time and send the "order status notification" email to notify both user and admin that order's status have changed

Thank you

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

More
9 years 11 months ago #253797 by nicolas
Hi,

You can do it like that:
Code:
$order = new stdClass(); $order->order_id = $order_id; $order->order_status = "cancel"; $order->history = new stdClass(); $order->history->history_notified = 1; $orderClass = hikashop_get('class.order'); $orderClass->save($order);
That will change the status of the order and send a notification email to the customer.
If you want to receive a copy of the email, you can add your email address in the "BCC" field of the email when you edit it via the menu System>Emails.
The following user(s) said Thank You: veeco

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

Time to create page: 0.161 seconds
Powered by Kunena Forum