public function createdToAdmin($order)
    {
        $store = $this->store->get($order['store_id']);
        $store_name = $this->store->getTranslation('title', $this->translation->getLangcode(), $store);
        $options = array('from' => reset($store['data']['email']));

        $default = (array) $this->store->getDefault(true);
        $url = $this->store->getUrl($default);

        $vars = array(
            '@store' => $store_name,
            '@order_id' => $order['order_id'],
            '@order' => "$url/admin/sale/order/{$order['order_id']}",
            '@status' => $this->order->getStatusName($order['status']),
            '@total' => $this->price->format($order['total'], $order['currency']),
        );

        $subject = $this->translation->text('New order #@order_id on @store', $vars);
        $message = $this->translation->text("Order status: @status\r\nTotal: @total\r\nView: @order", $vars);

        return array($options['from'], $subject, $message, $options);
    }
public function createdToAdmin($order)
    {
        $store = $this->store->get($order['store_id']);
        $store_name = $this->store->getTranslation('title', $this->translation->getLangcode(), $store);
        $options = array('from' => reset($store['data']['email']));

        $default = (array) $this->store->getDefault(true);
        $url = $this->store->getUrl($default);

        $vars = array(
            '@store' => $store_name,
            '@order_id' => $order['order_id'],
            '@order' => "$url/admin/sale/order/{$order['order_id']}",
            '@status' => $this->order->getStatusName($order['status']),
            '@total' => $this->price->format($order['total'], $order['currency']),
        );

        $subject = $this->translation->text('New order #@order_id on @store', $vars);
        $message = $this->translation->text("Order status: @status\r\nTotal: @total\r\nView: @order", $vars);

        return array($options['from'], $subject, $message, $options);
    }
public function createdToAdmin ( $ order ) { $ store = $ this -> store -> get ( $ order [ 'store_id' ] ) ; $ store_name = $ this -> store -> getTranslation ( 'title' , $ this -> translation -> getLangcode ( ) , $ store ) ; $ options = array ( 'from' => reset ( $ store [ 'data' ] [ 'email' ] ) ) ; $ default = ( array ) $ this -> store -> getDefault ( true ) ; $ url = $ this -> store -> getUrl ( $ default ) ; $ vars = array ( '@store' => $ store_name , '@order_id' => $ order [ 'order_id' ] , '@order' => "$url/admin/sale/order/{$order['order_id']}" , '@status' => $ this -> order -> getStatusName ( $ order [ 'status' ] ) , '@total' => $ this -> price -> format ( $ order [ 'total' ] , $ order [ 'currency' ] ) , ) ; $ subject = $ this -> translation -> text ( 'New order #@order_id on @store' , $ vars ) ; $ message = $ this -> translation -> text ( "Order status: @status\r\nTotal: @total\r\nView: @order" , $ vars ) ; return array ( $ options [ 'from' ] , $ subject , $ message , $ options ) ; }
Sends an email to admin after a customer created an order
@param array $order
@return array
Sends an email to admin after a customer created an order