Jump to content

Emails missing smarty variables

Recommended Posts


randomly in some emails to my clients the smarty variables are missed. Is not a single type of email, it is happening with all the emails randomly. Seems to be a smarty bug or something like. Do you guys know what can be happenning?



This email in particular it's sending by a hook on change order status:


Module code:

$orderReference = $comprafacil->getOrderReference($cart->id);
$templateVars = array(
  '{order_name}' => $orderReference,
  '{firstname}' => $customer->firstname,
  '{lastname}' => $customer->lastname,
  '{cf_entity}' => $multibanco->entity,
  '{cf_reference}' => $multibanco->reference,
  '{cf_value}' => $multibanco->amountOut.' €'

$template_name = 'wfxcomprafacil_data';
$title = 'Dados para Pagamento Multibanco';
$from = Configuration::get('PS_SHOP_EMAIL');
$fromName = Configuration::get('PS_SHOP_NAME');
$mailDir = dirname(__FILE__).'/mails/';
$send = Mail::Send($cart->id_lang, $template_name, $title, $templateVars, $customer->email, $customer->firstname.' '.$customer->lastname, $from, $fromName, NULL, NULL, $mailDir);


All it's ok, these emails never fails except sometimes that for some reason the variables are not showing it value.

Edited by lsard (see edit history)

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More