Jump to content

Oscar

Members
  • Posts

    6
  • Joined

  • Last visited

Everything posted by Oscar

  1. Hello Prestashop 1.6.0.9 I am trying to include in the subject of the email that admin receives when there is a new order the day of the week that is at that moment but I do not get it to work. For example I want to receive as admin in the subject this: Oscar Cuenca, New order: # 4524 - YKSUCKDON - Monday This is because I am using a CRM and I am interested in the email I receive to set the current day of the week in which the email was created. What I do is this: I add the variables: $fecha = array("sunday","monday","twesday","Wednesday","Thursday","Friday","saturday"); $dia = $fecha[date("w")]; In the file mailalerts.php, line approx 254 public function hookActionValidateOrder($params) { if (!$this->merchant_order || empty($this->merchant_mails)) return; // Getting differents vars $context = Context::getContext(); $id_lang = (int)$context->language->id; $id_shop = (int)$context->shop->id; $currency = $params['currency']; $order = $params['order']; $fecha = array("sunday","monday","Tuesday","miercoles","Thursday","Friday","saturday"); $dia = $fecha[date("w")]; $customer = $params['customer']; $configuration = Configuration::getM........ Once this is done, in this same file, line 466 in the Mail :: Send function $mail_id_lang, 'new_order', sprintf(Mail::l($customer->lastname.', '.'New order : #%d - %s'.', '.$dia, $mail_id_lang), $order->id, $order->reference), $template_vars, $merchant_mail, null, $customer->email, $configuration['PS_SHOP_NAME'], null, null, $dir_mail, null, $id_shop ); This done, it does not cause any effect. I still receiving the same subject: Oscar Cuenca, New order: # 4524 - YKSUCKDON Without the day of the week. If someone can help me, I'll thank you-
  2. Hola Prestashop 1.6.0.9 Estoy intentando incluir en el subject del email que recibe el admin cuando hay un pedido nuevo el día de la semana que es en ese momento pero no consigo que funcione. Por ejemplo yo quiero recibir como admin en el subject esto: Oscar Cuenca, New order : #4524 - YKSUCKDON - Lunes Esto es porque estoy usando un CRM y me interesa que el email que recibo ponga el día actual de la semana en que el email se ha creado. Lo que hago es esto: Añado las variables: $fecha = array("domingo","lunes","martes","miércoles","jueves","viernes","sábado"); $dia = $fecha[date("w")]; En el archivo mailalerts.php, linea aprox 254 public function hookActionValidateOrder($params) { if (!$this->merchant_order || empty($this->merchant_mails)) return; // Getting differents vars $context = Context::getContext(); $id_lang = (int)$context->language->id; $id_shop = (int)$context->shop->id; $currency = $params['currency']; $order = $params['order']; $fecha = array("domingo","lunes","martes","miércoles","jueves","viernes","sábado"); $dia = $fecha[date("w")]; $customer = $params['customer']; $configuration = Configuration::getM........ Una vez hecho esto, en este mismo archivo aprox línea 466 en la funcion Mail::Send Mail::Send( $mail_id_lang, 'new_order', sprintf(Mail::l($customer->lastname.', '.'New order : #%d - %s'.', '.$dia, $mail_id_lang), $order->id, $order->reference), $template_vars, $merchant_mail, null, $customer->email, $configuration['PS_SHOP_NAME'], null, null, $dir_mail, null, $id_shop ); Hecho esto, no causa ningún efecto. Sigo recibiendo el mismo subject: Oscar Cuenca, New order : #4524 - YKSUCKDON Sin el día de la semana. Si alguien me puede ayudar, se lo agradeceré-
  3. Hola a todos. Tengo Prestashop 1.6.0.9 Estoy intentando que prestashop me facture de forma automática (me emita factura en PDF) cuando pasa a estado "pago aceptado" solo para ciertas categorías de producto. Por lo general mis clientes solo compran un producto, no hay varios productos en el pedido, pero hay ciertas categorías de producto que deseo yo generar la factura manual. Agradecería si lguién me puede orientar,. Desde ya muchas gracias Óscar
  4. Hola Estoy intentando implementar el código de seguimiento de Kelkoo. En el archivo order-confirmation.tpl se me pide que introduzca código pero hay dos variables que son dinámicas. "$sales y $orderid . El prestashop dónde estoy intentando introducir el traking es el 1.6.XX Estas dos varibles dependen del prestashop, por tanto en kelkoo no saben decirme cual es el nombre de cada una de las 2 etquetas. Alguien me puede ayudar, pues necesito saber cual serían estas dos etqiuetas que deben sustituir a $sales y $orderir Muchas Gracias. orderValue: '{$sales}', orderId: '{$orderid}', Este es parte del código de OrderConfirmationControler.php public function initContent() { /* Kelkoo Sales Tracking */ $order = new Order($this->id_order); $products = $order->getProducts(); $productsKelkoo=array(); foreach ($products as $product) { $productKelkoo=array('productname'=>$product['product_name'], 'productid'=>$product['product_reference'], 'svn1'=>$product['product_quantity'], 'svn2'=>$product['unit_price_tax_incl']); array_push($productsKelkoo,$productKelkoo); } $this->context->smarty->assign(array( 'is_guest' => $this->context->customer->is_guest, 'HOOK_ORDER_CONFIRMATION' => $this->displayOrderConfirmation(), 'HOOK_PAYMENT_RETURN' => $this->displayPaymentReturn(), 'products_json' => json_encode($productsKelkoo), 'sales' => $order->getOrdersTotalPaid(), 'orderid' => $this->id_order )); /* end Kelkoo Sales Tracking*/ parent::initContent(); $this->context->smarty->assign(array( 'is_guest' => $this->context->customer->is_guest, 'HOOK_ORDER_CONFIRMATION' => $this->displayOrderConfirmation(), 'HOOK_PAYMENT_RETURN' => $this->displayPaymentReturn() )); if ($this->context->customer->is_guest) { $this->context->smarty->assign(array( 'id_order' => $this->id_order, 'reference_order' => $this->reference, 'id_order_formatted' => sprintf('#%06d', $this->id_order), 'total_paid_tax_incl' => number_format($order->total_paid_tax_incl, 2, ',', ' '), 'email' => $this->context->customer->email )); /* If guest we clear the cookie for security reason */ $this->context->customer->mylogout(); } $this->setTemplate(_PS_THEME_DIR_.'order-confirmation.tpl'); }
  5. Hola Cuando pincho sobre una categoría quisiera que se mostraran las subcategorias de dicha categoría padre en el centro, Alguien podría ayudarme . Muchas gracias desde ya.
×
×
  • Create New...