- Posts: 175
- Thank you received: 0
Trigger hikashop to send "order status notification" email through a PHP script
9 years 11 months ago #253777
by veeco
Trigger hikashop to send "order status notification" email through a PHP script was created 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
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.
9 years 11 months ago #253797
by nicolas
Replied by nicolas on topic Trigger hikashop to send "order status notification" email through a PHP script
Hi,
You can do it like that:
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.
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);
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