Jump to content

Expeditor Inet email conflict


Mark_CL

Recommended Posts

Hi Community,

 

We've installed Prestashop 1.6 and Expeditor Inet, using La Poste.

 

When we fulfil an order manually through the back office, we get our email sent correctly based on the template file we have.

 

 

Commande PQQYAKVIF - Expédiée

Le livraison de votre commande PQQYAKVIF est en cours. 

Votre numéro de suivi est 6767555

Vous pouvez suivre la progression de votre livraison à l'adresse suivante: 

N'hésitez pas à nous contacter si vous avez la moindre question.

 

But when Expeditor fulfils an order for us, it automatically sends the following email, missing a couple of fields - order_name and shipping_number

 

 

Commande {order_name} - Expédiée

Le livraison de votre commande {order_name} est en cours. 

Votre numéro de suivi est {shipping_number}. 
Vous pouvez suivre la progression de votre livraison à l'adresse suivante: http://www.colissimo.fr/portail_colissimo/suivreResultat.do?parcelnumber=9L16281207830

Vous recevrez prochainement un lien vous permettant le suivi de votre colis. 
N'hésitez pas à nous contacter si vous avez la moindre question.

 

 

So I have looked at the AdminExpeditor.php file and the existing code is:

 

global $_LANGMAIL;
$templateVars = array(
'{followup}' => str_replace('@', $shipping_number, $carrier->url),
'{firstname}' => $customer->firstname,
'{lastname}' => $customer->lastname,
'{id_order}' => intval($order->id)
);
//send email with traking number
$subject = 'Package in transit';
if (Mail::Send(intval($order->id_lang), 'in_transit', ((is_array($_LANGMAIL) AND key_exists($subject, $_LANGMAIL)) ? $_LANGMAIL[$subject] : $subject), $templateVars, $customer->email, $customer->firstname.' '.$customer->lastname))
echo '<br/>' . $this->l('Email send to') . ': ' . $customer->email;
else
echo '<br/>' . $this->l('Email faild to') . ': ' . $customer->email;
echo '<li>' . $this->l('Order number') . ': ' . $id_order;
echo '<br/>' . $this->l('Shipping number') . ': ' . $shipping_number;
echo "</li>\n";
}
echo '</ul>';
echo '
<form action="index.php" method="get">
<p>
<input type="hidden" name="tab" value="AdminExpeditor" />
<input type="hidden" name="token" value="'.Tools::getValue('token').'" />
<input type="submit" value="'.$this->l('   Back   ').'" class="button" />
</p>
</form>';
 
If i change this by adding in
 
global $_LANGMAIL;
$templateVars = array(
'{followup}' => str_replace('@', $shipping_number, $carrier->url),
'{firstname}' => $customer->firstname,
'{lastname}' => $customer->lastname,
'{shipping_number}' => $shipping_number,
'{order_name}' => intval($order->id)
'{id_order}' => intval($order->id)
);
//send email with traking number
$subject = 'Package in transit';
if (Mail::Send(intval($order->id_lang), 'in_transit', ((is_array($_LANGMAIL) AND key_exists($subject, $_LANGMAIL)) ? $_LANGMAIL[$subject] : $subject), $templateVars, $customer->email, $customer->firstname.' '.$customer->lastname))
echo '<br/>' . $this->l('Email send to') . ': ' . $customer->email;
else
echo '<br/>' . $this->l('Email faild to') . ': ' . $customer->email;
echo '<li>' . $this->l('Order number') . ': ' . $id_order;
echo '<br/>' . $this->l('Shipping number') . ': ' . $shipping_number;
echo "</li>\n";
}
echo '</ul>';
echo '
<form action="index.php" method="get">
<p>
<input type="hidden" name="tab" value="AdminExpeditor" />
<input type="hidden" name="token" value="'.Tools::getValue('token').'" />
<input type="submit" value="'.$this->l('   Back   ').'" class="button" />
</p>
</form>';
 
return true;

 

would it be expected to work? Could this break the email's function?

 

If anyone has any experience with the expeditor inet module and the best way to configure your backoffice in order to have great automatic communications, I would really love to hear your ideas.

 

Thanks!

 

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