public function createdToCustomer($order)
    {
        $store = $this->store->get($order['store_id']);
        $url = $this->store->getUrl($store);
        $user = $this->user->get($order['user_id']);
        $store_name = $this->store->getTranslation('title', $this->translation->getLangcode(), $store);

        $options = $this->store->getConfig(null, $store);
        $options['from'] = reset($store['data']['email']);

        $vars = array(
            '@store' => $store_name,
            '@order_id' => $order['order_id'],
            '@order' => "$url/account/{$order['user_id']}",
            '@status' => $this->order->getStatusName($order['status']),
        );

        $subject = $this->translation->text('Order #@order_id on @store', $vars);
        $message = $this->translation->text("Thank you for ordering on @store\r\n\r\nOrder ID: @order_id\r\nOrder status: @status\r\nView orders: @order", $vars);
        $message .= $this->getSignature($options);

        return array($user['email'], $subject, $message, $options);
    }
public function createdToCustomer($order)
    {
        $store = $this->store->get($order['store_id']);
        $url = $this->store->getUrl($store);
        $user = $this->user->get($order['user_id']);
        $store_name = $this->store->getTranslation('title', $this->translation->getLangcode(), $store);

        $options = $this->store->getConfig(null, $store);
        $options['from'] = reset($store['data']['email']);

        $vars = array(
            '@store' => $store_name,
            '@order_id' => $order['order_id'],
            '@order' => "$url/account/{$order['user_id']}",
            '@status' => $this->order->getStatusName($order['status']),
        );

        $subject = $this->translation->text('Order #@order_id on @store', $vars);
        $message = $this->translation->text("Thank you for ordering on @store\r\n\r\nOrder ID: @order_id\r\nOrder status: @status\r\nView orders: @order", $vars);
        $message .= $this->getSignature($options);

        return array($user['email'], $subject, $message, $options);
    }
public function createdToCustomer ( $ order ) { $ store = $ this -> store -> get ( $ order [ 'store_id' ] ) ; $ url = $ this -> store -> getUrl ( $ store ) ; $ user = $ this -> user -> get ( $ order [ 'user_id' ] ) ; $ store_name = $ this -> store -> getTranslation ( 'title' , $ this -> translation -> getLangcode ( ) , $ store ) ; $ options = $ this -> store -> getConfig ( null , $ store ) ; $ options [ 'from' ] = reset ( $ store [ 'data' ] [ 'email' ] ) ; $ vars = array ( '@store' => $ store_name , '@order_id' => $ order [ 'order_id' ] , '@order' => "$url/account/{$order['user_id']}" , '@status' => $ this -> order -> getStatusName ( $ order [ 'status' ] ) , ) ; $ subject = $ this -> translation -> text ( 'Order #@order_id on @store' , $ vars ) ; $ message = $ this -> translation -> text ( "Thank you for ordering on @store\r\n\r\nOrder ID: @order_id\r\nOrder status: @status\r\nView orders: @order" , $ vars ) ; $ message .= $ this -> getSignature ( $ options ) ; return array ( $ user [ 'email' ] , $ subject , $ message , $ options ) ; }
Sends an email to a logged in customer after his order has been created
@param array $order
@return array
Sends an email to a logged in customer after his order has been created