public function docancel($data, $form)
{
if (self::config()->allow_cancelling && $this->order->canCancel()) {
$this->order->Status = 'MemberCancelled';
$this->order->write();
if (self::config()->email_notification) {
OrderEmailNotifier::create($this->order)->sendCancelNotification();
}
$this->controller->sessionMessage(_t("OrderForm.OrderCancelled", "Order sucessfully cancelled"), 'warning');
if (Member::currentUser() && ($link = $this->order->Link())) {
$this->controller->redirect($link);
} else {
$this->controller->redirectBack();
}
}
}