orders page text changes #2810
This commit is contained in:
parent
9be5789f54
commit
f21e36e4be
@ -9,6 +9,7 @@ class Crunchbutton_Message_Sms extends Crunchbutton_Message {
|
|||||||
const REASON_SUPPORT_SUGGESTION = 'support suggestion';
|
const REASON_SUPPORT_SUGGESTION = 'support suggestion';
|
||||||
const REASON_PASSWORD_RESET = 'password reset';
|
const REASON_PASSWORD_RESET = 'password reset';
|
||||||
const REASON_DRIVER_SETUP = 'driver setup notify';
|
const REASON_DRIVER_SETUP = 'driver setup notify';
|
||||||
|
const REASON_DRIVER_ORDER_CANCELED = 'driver order canceled';
|
||||||
const REASON_DRIVER_ORDER = 'driver new order';
|
const REASON_DRIVER_ORDER = 'driver new order';
|
||||||
const REASON_DRIVER_NOTIFIES_CUSTOMER = 'driver notifies customer';
|
const REASON_DRIVER_NOTIFIES_CUSTOMER = 'driver notifies customer';
|
||||||
const REASON_DRIVER_SHIFT = 'driver shift';
|
const REASON_DRIVER_SHIFT = 'driver shift';
|
||||||
|
|||||||
@ -2151,6 +2151,15 @@ class Crunchbutton_Order extends Crunchbutton_Order_Trackchange {
|
|||||||
return $this->_refundedAmount;
|
return $this->_refundedAmount;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function tellDriverTheOrderWasCanceled(){
|
||||||
|
$driver = $this->getDeliveryDriver();
|
||||||
|
if( $driver->id_admin && $driver->phone ){
|
||||||
|
$message = 'Sorry, ' . $this->restaurant()->name . ' order #' . $this->id_order . ' from ' . $this->name . ' was canceled! :(';
|
||||||
|
Crunchbutton_Support::createNewWarning( [ 'body' => $message, 'phone' => $driver->phone, 'dont_open_ticket' => true ] );
|
||||||
|
Crunchbutton_Message_Sms::send( [ 'to' => $driver->phone, 'message' => $message, 'reason' => Crunchbutton_Message_Sms::REASON_DRIVER_ORDER_CANCELED ] );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public function refund() {
|
public function refund() {
|
||||||
|
|
||||||
if (!$this->refunded){
|
if (!$this->refunded){
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user