Jump to content

Mail alerts module problem


Recommended Posts

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??

 

 

post-507246-0-71158400-1389172951_thumb.png

Link to comment
Share on other sites

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...