fametown Posted September 4, 2018 Share Posted September 4, 2018 ¡Muy buenas a todos! ¿Sabéis la forma de personalizar los correos electrónicos que se envían cuando un producto de la tienda se queda sin stock? Hablo de Prestashop 1.7 con el módulo oficial de "ps_emailalerts". Querría añadir la Marca y el Código de Producto. Por defecto solo te pone el nombre, y en la tienda donde necesito realizar el cambio ese dato es totalmente insuficiente. ¡Muchas gracias! Link to comment Share on other sites More sharing options...
fametown Posted September 15, 2018 Author Share Posted September 15, 2018 No sé si interesará a alguien, pero os dejo la solución al problema. En el archivo “ps_emailalerts.php” modificar la función “hookActionUpdateQuantity” que controla las modificaciones de stock. Añadir estos parámetros: $referencia = $product->reference; $id_fabricante = $product->id_manufacturer; $fabricante = Manufacturer::getnamebyid($id_fabricante); Y añadirlos al array $template_vars $template_vars = array( '{qty}' => $quantity, '{last_qty}' => $ma_last_qties, '{product}' => $product_name, '{fabricante}' => $fabricante, '{referencia}' => $referencia, ); Luego ya los podremos utilizar en las plantillas que están en /mails/es/productoutofstock.html y /mail/es/productoutofstock.txt. Simplemente sería utilizar {fabricante} y {referencia} en las posiciones que se quieran. Link to comment Share on other sites More sharing options...
VIRALMARKTING Posted September 17, 2018 Share Posted September 17, 2018 On 15/9/2018 at 2:09 PM, fametown said: No sé si interesará a alguien, pero os dejo la solución al problema. En el archivo “ps_emailalerts.php” modificar la función “hookActionUpdateQuantity” que controla las modificaciones de stock. Añadir estos parámetros: $referencia = $product->reference; $id_fabricante = $product->id_manufacturer; $fabricante = Manufacturer::getnamebyid($id_fabricante); Y añadirlos al array $template_vars $template_vars = array( '{qty}' => $quantity, '{last_qty}' => $ma_last_qties, '{product}' => $product_name, '{fabricante}' => $fabricante, '{referencia}' => $referencia, ); Luego ya los podremos utilizar en las plantillas que están en /mails/es/productoutofstock.html y /mail/es/productoutofstock.txt. Simplemente sería utilizar {fabricante} y {referencia} en las posiciones que se quieran. Muchas Gracias por el aporte Saludos!! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now