fixes #348
This commit is contained in:
parent
a936e7783d
commit
a24840b24e
@ -642,6 +642,14 @@ class Crunchbutton_Order extends Cana_Table {
|
|||||||
$this->save();
|
$this->save();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function phone() {
|
||||||
|
$phone = $this->phone;
|
||||||
|
$phone = preg_replace('/[^\d]*/i','',$phone);
|
||||||
|
$phone = preg_replace('/(\d{3})(\d{3})(.*)/', '\\1-\\2-\\3', $phone);
|
||||||
|
|
||||||
|
return $phone;
|
||||||
|
}
|
||||||
|
|
||||||
public function __construct($id = null) {
|
public function __construct($id = null) {
|
||||||
parent::__construct();
|
parent::__construct();
|
||||||
|
|||||||
@ -19,7 +19,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td width="50%" valign="top">
|
<td width="50%" valign="top">
|
||||||
<h1><?=$order->name?></h1>
|
<h1><?=$order->name?></h1>
|
||||||
<h2><?=$order->phone?></h2>
|
<h2><?=$order->phone()?></h2>
|
||||||
<h2>
|
<h2>
|
||||||
<? if ($order->delivery_type == 'delivery') : ?>
|
<? if ($order->delivery_type == 'delivery') : ?>
|
||||||
<?=nl2br(strip_tags($order->address))?><br />
|
<?=nl2br(strip_tags($order->address))?><br />
|
||||||
@ -67,7 +67,10 @@
|
|||||||
|
|
||||||
|
|
||||||
<br /><br /><br />
|
<br /><br /><br />
|
||||||
For Crunchbutton support:<br />
|
This order was send on behalf of <b><?=$order->name?></b>.<br />
|
||||||
|
Contact the customer at:
|
||||||
|
<h2><?=$order->phone()?></h2><br />
|
||||||
|
For technical related issues, contact Crunchbutton at:<br />
|
||||||
<h2>213-293-6935</h2>
|
<h2>213-293-6935</h2>
|
||||||
<h2>restaurant-support@crunchbutton.com</h2>
|
<h2>restaurant-support@crunchbutton.com</h2>
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user