In Opencart there is functionality to automate sending order email to admin which we send to customer after placing order.
For Opencart 2.2
Follow the following steps to automate sending order email to admin:
- Open admin panel and go to System -> Setting. On this page you will see store listing.
- Open store in edit mode by clicking on the edit icon.
- Open “Option” tab and check for “New Order Alert Mail” in checkout section. Select ‘Yes’ radio button and save.
Refer below screenshots
Note: Function addOrderHistory() in catalog/model/checkout/order.php file is used to send mail to mail to admin in. If you want to make any changes in the email then can make in this function.
Search for ‘if ($this->config->get(‘config_order_mail’)) {‘ to find code to send mail to admin.
For Opencart 2.3
Follow the following steps to automate sending order email to admin:
- Open admin panel and go to System -> Setting. On this page you will see store listing.
- Open store in edit mode by clicking on the edit icon.
- Open ‘Mail’ tab and check for “Alert Mail” in “Mail Alerts” section. Mark checkbox ‘orders’ and save.
Refer below screenshots
Note: Function addOrderHistory() in catalog/model/checkout/order.php file is used to send mail to mail to admin in. If you want to make any changes in the email then can make in this function.
Search for ‘if (in_array(‘order’, (array)$this->config->get(‘config_mail_alert’))) {‘ to find code to send mail to admin.