Exemple #1
0
     $billing_address = json_decode($model->billing_address, true);
     $shipping_address = json_decode($model->shipping_address, true);
     $param = array('{NAME}' => $model->user->name, '{ORDER_NO}' => $model->order_no, '{CREATED_DATE}' => date('Y-m-d H:i:s', strtotime($model->created_date)), '{BILLING_NAME}' => $billing_address['first_name'] . ' ' . $billing_address['last_name'], '{BILLING_EMAIL}' => $billing_address['email'], '{BILLING_NUMBER}' => $billing_address['contact_number'], '{BILLING_ADDRESS}' => $billing_address['address'], '{BILLING_COUNTRY}' => AreaCode::model()->findByPk($billing_address['country_id'])->area_name, '{BILLING_POSTCODE}' => $billing_address['postal_code'], '{SHIPPING_NAME}' => $shipping_address['first_name'] . ' ' . $shipping_address['last_name'], '{SHIPPING_EMAIL}' => $shipping_address['email'], '{SHIPPING_NUMBER}' => $shipping_address['contact_number'], '{SHIPPING_ADDRESS}' => $shipping_address['address'], '{SHIPPING_COUNTRY}' => AreaCode::model()->findByPk($shipping_address['country_id'])->area_name, '{SHIPPING_POSTCODE}' => $shipping_address['postal_code'], '{PRODUCT_LIST}' => $list_product);
     EmailHelper::bindEmailContent(EMAIL_CONFIRM_PAYMENT_PRODUCT, $param, $model->user->email);
 }
 public static function sendMailContact($model, $email_to)
 public static function sendmailpayment($model, $list_product)
 {
     $billing_address = json_decode($model->billing_address, true);
     $shipping_address = json_decode($model->shipping_address, true);
     $param = array('{NAME}' => $model->user->name, '{ORDER_NO}' => $model->order_no, '{CREATED_DATE}' => date('Y-m-d H:i:s', strtotime($model->created_date)), '{BILLING_NAME}' => $billing_address['first_name'] . ' ' . $billing_address['last_name'], '{BILLING_EMAIL}' => $billing_address['email'], '{BILLING_NUMBER}' => $billing_address['contact_number'], '{BILLING_ADDRESS}' => $billing_address['address'], '{BILLING_COUNTRY}' => AreaCode::model()->findByPk($billing_address['country_id'])->area_name, '{BILLING_POSTCODE}' => $billing_address['postal_code'], '{SHIPPING_NAME}' => $shipping_address['first_name'] . ' ' . $shipping_address['last_name'], '{SHIPPING_EMAIL}' => $shipping_address['email'], '{SHIPPING_NUMBER}' => $shipping_address['contact_number'], '{SHIPPING_ADDRESS}' => $shipping_address['address'], '{SHIPPING_COUNTRY}' => AreaCode::model()->findByPk($shipping_address['country_id'])->area_name, '{SHIPPING_POSTCODE}' => $shipping_address['postal_code'], '{PRODUCT_LIST}' => $list_product);
     EmailHelper::bindEmailContent(EMAIL_CONFIRM_PAYMENT_PRODUCT, $param, $model->user->email);
 }