WebUp Posted January 8, 2014 Share Posted January 8, 2014 Hello, I am having problems with my Mail Alerts module as it is not sending the delivery address to Merchant. PS 1.5.4.1 Mail alerts 2.3 So, when the order is placed the mails are sent to customer and merchant. Customer recieves the complete email with address but merchants mail is missing {delivery_address_block} and {invoice_block_html} . As you can see in picture. I've checked translations themes mail alerts and root mail alerts, it all seems fine. Does anyone has a solution?? Link to comment Share on other sites More sharing options...
NemoPS Posted January 8, 2014 Share Posted January 8, 2014 These functions assign the variable you mentioned (mailalerts.php) '{delivery_block_txt}' => MailAlert::getFormatedAddress($delivery, "\n"), '{invoice_block_txt}' => MailAlert::getFormatedAddress($invoice, "\n"), However, customers get an email sent by the PaymentModule class. THerefore, chances are those 2 assignments are broken. In any case they can't be replaced. Can you check if they are being assigned in mailalerts.php? Link to comment Share on other sites More sharing options...
WebUp Posted January 8, 2014 Author Share Posted January 8, 2014 I don't have those lines of code in mailalerts.php, I have this for new order: public function hookNewOrder($params) { if (!$this->_merchant_order OR empty($this->_merchant_mails)) return; // Getting differents vars $id_lang = (( ! isset($cookie)) OR ( ! is_object($cookie))) ? intval(Configuration::get('PS_LANG_DEFAULT')) : intval($cookie->id_lang); $currency = $params['currency']; $configuration = Configuration::getMultiple(array('PS_SHOP_EMAIL', 'PS_MAIL_METHOD', 'PS_MAIL_SERVER', 'PS_MAIL_USER', 'PS_MAIL_PASSWD', 'PS_SHOP_NAME')); $order = $params['order']; $customer = $params['customer']; $delivery = new Address(intval($order->id_address_delivery)); $invoice = new Address(intval($order->id_address_invoice)); // $order_date_text = Tools::displayDate($order->date_add, intval($id_lang)); $order_date_text = Tools::displayDate($order->date_add, intval($id_lang), 1); $carrier = new Carrier(intval($order->id_carrier)); $message = $order->getFirstMessage(); if (!$message OR empty($message)) $message = $this->l('No message'); Link to comment Share on other sites More sharing options...
NemoPS Posted January 8, 2014 Share Posted January 8, 2014 What about the $template_vars variable? If it's not there, try and get a fresh 1.5.4.1 package, and copy the mailalerts folder over yours 1 Link to comment Share on other sites More sharing options...
WebUp Posted January 10, 2014 Author Share Posted January 10, 2014 Thank you. I copied new mailalerts forum and it works now! 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