Hi,
In the shoppingcart.php , you will find the onshoppingcartaftersaveorder function.
I have just added few lines to test it and i have received correctly the email.
`
public function onShoppingCartSaveOrder($event)
{
$order = $event['order'];
$this->order_id = $this->saveOrderToFilesystem($order);
$this->grav->fireEvent('onShoppingCartAfterSaveOrder', new Event([
'order' => $order,
'order_id' => $this->order_id
]));
$to = '[email protected]';
$from = '[email protected]';
$subject = 'Test';
$content = 'Test';
$message = $this->grav['Email']->message($subject, $content, 'text/html')
->setFrom($from)
->setTo($to);
$sent = $this->grav['Email']->send($message);
}
`
I am not sure that is the best way but it works!