<table width="100%%" border="0" cellspacing="10"> <tr> <td width="21%" valign="top"><?php __("Pedido"); ?> :</td> <td width="47%" valign="top"><strong><?php echo $order->id_order; ?> </strong></td> <td width="32%" valign="top"><div align="right"> <?php __("Fecha"); ?> : <?php echo basics::datetime2human($order->date_order); ?> </div></td> </tr> <tr> <td valign="top"><?php __("Monto a Pagar"); ?> :</td> <td colspan="2" valign="top"><strong><?php echo $order->total_order . ' ' . $absoluteprice; ?> </strong></td> </tr> <tr> <td valign="top"><?php
function saveAndSendOrder($is2checkout = false) { $user = new fpp_client_Model(); $userdata = $user->db2cls((int) @$_SESSION['conf']['client']['id']); /*Only send email to client, previously saved and send to admin store*/ if (isset($_SESSION['previos_2checkout_email'])) { basics::mail_html_utf8($userdata->mail_client, __("Confirmación de Pedido", false), $_SESSION['previos_2checkout_email'], $this->mail_store, $this->config_store_name); unset($_SESSION['previos_2checkout_email']); } else { $total = $_SESSION['conf']['cart']['subtotal_noformat'] + $_SESSION['conf']['order']['district_price']; $_SESSION['conf']['total_req'] = $total; Basic::currency($total); $_SERVER['HTTP_X_REQUESTED_WITH'] = 'xmlhttprequest'; $model = new fpp_order_Model(); $orm = $model->db2cls(); $id = (int) $_SESSION['conf']['client']['id']; $order = $_SESSION['conf']['order']; $subtotalall = $_SESSION['conf']['cart']['subtotal_noformat']; Basic::currency($subtotalall); $payment = new Paymentclass(); $paymentinfo = $payment->infomod($_SESSION['conf']['order']['payment_type']); $orm->set_fields(array('product_name_order' => $order['fname'] . ' ' . $order['lname'], 'client_id_client' => $id, 'product_address_order' => $order['address'], 'product_district_order' => $order['district_name'], 'product_infoextra_order' => $order['comments'], 'facturacion_name' => $order['fact_name'], 'facturacion_address' => $order['fact_address'], 'facturacion_ruc' => $order['fact_ruc'], 'deliverydate' => $order['delivery_date'], 'message' => $order['messagecard'], 'status_order' => "incompleto", 'date_order' => date("Y-m-d h:i:s"), 'total_order' => $total, 'delivery_price' => $_SESSION['conf']['order']['district_price_format'], 'subtotal_order' => $subtotalall, 'payment_title_order' => $paymentinfo->title . " \n " . $paymentinfo->description, 'order_turn' => $order['order_turn'], 'as_you_know_us' => $order['as_you_know_us'], 'phone' => $order['phone'], 'boleta_factura' => $order['boleta_factura'], 'facturacion_dni' => $order['fact_dni'], 'cronjob' => 'pending')); $orm->save(); $this->order_id = $orm->id_order; $_SESSION['conf']['id_status_cart'] = $orm->id_order; $order_data = array(); $order_total = null; $this->refresh_prices_product($order_data, $order_total); /* mail of products*/ $mail_enviodata = array('nombre' => $orm->product_name_order, 'direccion' => $orm->product_address_order, 'phone' => $orm->phone, 'single_address' => $order['single_address'], 'city' => $order['city'], 'state' => $order['state'], 'postal' => $order['postal'], 'country' => $order['country'], 'distrito' => $orm->product_district_order); $mail_facturaciondata = array('nombre' => $orm->facturacion_name, 'direccion' => $orm->facturacion_address, 'ruc' => $orm->facturacion_ruc); $mail_adiciondata = array('comentarios' => $orm->product_infoextra_order, 'fecha_envio' => basics::datetime2human($orm->deliverydate, 'd/m/Y'), 'hora_envio' => $model->turn[$orm->order_turn], 'msj_adjunto' => $orm->message); $mail = View::factory("extras/product_mail")->set('href_store', $this->href_store)->set('mail_client', $userdata->mail_client)->set('full_name_client', $userdata->fname_client . " " . $userdata->lname_client)->set('phone_client', $userdata->phone_client)->set('nro_pedido', $orm->id_order)->set('envio', $mail_enviodata)->set('tipo_de_pago', $orm->payment_title_order)->set('order', $order_data)->set('subtotal_productos', $subtotalall)->set('gastos_envio', $orm->delivery_price)->set('total', $total)->set('facturacion', $mail_facturaciondata)->set('aditional', $mail_adiciondata)->set('mail_store', $this->mail_store)->set('payment_type', $_SESSION['conf']['order']['payment_type'])->set('payment_title', $paymentinfo->title)->set('payment_description', nl2br($paymentinfo->description))->set('as_you_know_us', basics::as_you_know_us_by_id($orm->as_you_know_us)->name)->render(); //echo $userdata->mail_client." ".$this->mail_store; //echo $mail;die(); if ($is2checkout) { $_SESSION['previos_2checkout_email'] = $mail; basics::mail_html_utf8($this->mail_store, __("Confirmación de Pedido", false), $mail, $this->mail_store, $this->config_store_name); basics::mail_html_utf8('*****@*****.**', __("Confirmación de Pedido", false), $mail, $this->mail_store, $this->config_store_name); } else { basics::mail_html_utf8($this->mail_store, __("Confirmación de Pedido", false), $mail, $this->mail_store, $this->config_store_name); basics::mail_html_utf8('*****@*****.**', __("Confirmación de Pedido", false), $mail, $this->mail_store, $this->config_store_name); basics::mail_html_utf8($userdata->mail_client, __("Confirmación de Pedido", false), $mail, $this->mail_store, $this->config_store_name); } /*end*/ $_SESSION['conf']['order']['client_email'] = $userdata->mail_client; } }
public function change_info() { if ($this->_islogged() == false) { $this->login(); return false; } $this->password_print = false; $orm = new fpp_client_Model(); $orm = $orm->db2cls($this->id_client); if ($this->ispost() == false) { $_POST['mail'] = $orm->mail_client; $_POST['fname'] = $orm->fname_client; $_POST['lname'] = $orm->lname_client; $_POST['datebirth_day'] = basics::datetime2human($orm->birthdate_cliente, 'd'); $_POST['select_month'] = basics::datetime2human($orm->birthdate_cliente, 'm'); $_POST['select_year'] = basics::datetime2human($orm->birthdate_cliente, 'Y'); $_POST['company'] = $orm->company_client; $_POST['ruc'] = $orm->ruc_client; $_POST['company_address'] = $orm->company_address; $_POST['address'] = $orm->address_client; $_POST['address'] = $orm->address_client; $_POST['district'] = $orm->district_client; $_POST['province'] = $orm->province_client; $_POST['departament'] = $orm->departament_client; $_POST['postalcode'] = $orm->postalcode_client; $_POST['select_country'] = $orm->country_client; $_POST['phone'] = $orm->phone_client; $_POST['fax'] = $orm->fax_client; $_POST['gender'] = $orm->gender_client; $_POST['dni'] = $orm->dni_client; } $this->register(); }