diff --git a/include/library/Crunchbutton/Order.php b/include/library/Crunchbutton/Order.php index 0ae9af434..a5bdc22a9 100644 --- a/include/library/Crunchbutton/Order.php +++ b/include/library/Crunchbutton/Order.php @@ -642,6 +642,14 @@ class Crunchbutton_Order extends Cana_Table { $this->save(); 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) { parent::__construct(); diff --git a/include/views/mail/crunchbutton/order/index.phtml b/include/views/mail/crunchbutton/order/index.phtml index 8b51549f0..4cf43914f 100644 --- a/include/views/mail/crunchbutton/order/index.phtml +++ b/include/views/mail/crunchbutton/order/index.phtml @@ -19,7 +19,7 @@

name?>

-

phone?>

+

phone()?>

delivery_type == 'delivery') : ?> address))?>
@@ -67,7 +67,10 @@


-For Crunchbutton support:
+This order was send on behalf of name?>.
+Contact the customer at: +

phone()?>


+For technical related issues, contact Crunchbutton at:

213-293-6935

restaurant-support@crunchbutton.com