miguelangelss4 Posted June 8, 2017 Share Posted June 8, 2017 Hello, I'm trying to add some variables to shipped email template. The data I need add are: delivery_block_html, invoice_block_html, delivery_other and followup variables. I started with delivery_bock_html, by editing /controllers/admin/AdminOrdersController.php, replacing (2 occurrences, lines 408 and 535): if ($history->id_order_state == Configuration::get('PS_OS_SHIPPING') && $order->shipping_number) { $templateVars = array('{followup}' => str_replace('@', $order->shipping_number, $carrier->url)); } with this piece of code: if ($history->id_order_state == Configuration::get('PS_OS_SHIPPING') && $order->shipping_number) { $templateVars = array( '{followup}' => str_replace('@', $order->shipping_number, $carrier->url), '{delivery_block_html}' => MailAlert::getFormatedAddress( $delivery, '<br />', array( 'firstname' => '<span style="color:'.$configuration['PS_MAIL_COLOR'].'; font-weight:bold;">%s</span>', 'lastname' => '<span style="color:'.$configuration['PS_MAIL_COLOR'].'; font-weight:bold;">%s</span>' ) ) ); } but the email I receive has {delivery_block_html} shortcode, as if I didn't anything. I attach screenshot of received email. What am I doing wrog? Thanks!! 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