Skip to content

Instantly share code, notes, and snippets.

@michaelhjulskov
Created February 11, 2015 09:33
Show Gist options
  • Save michaelhjulskov/7d1bea09ab679958e161 to your computer and use it in GitHub Desktop.
Save michaelhjulskov/7d1bea09ab679958e161 to your computer and use it in GitHub Desktop.
prestashop - add order id or order ref to email subject
<?php
/**
* NOTICE OF LICENSE
*
* This source file is subject to the Software License Agreement
* that is bundled with this package in the file LICENSE.txt.
*
* @author Michael Hjulskov
* @copyright 2014-2015 Michael Hjulskov
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/
class Mail extends MailCore
{
public static function Send($id_lang, $template, $subject, $template_vars, $to,
$to_name = null, $from = null, $from_name = null, $file_attachment = null, $mode_smtp = null,
$template_path = _PS_MAIL_DIR_, $die = false, $id_shop = null, $bcc = null)
{
// add order id or ref to email subject
if (isset($template_vars['{order_name}']) && $template_vars['{order_name}'])
$subject .= ' (ID '.$template_vars['{order_name}'].')';
return parent::Send($id_lang, $template, $subject, $template_vars, $to, $to_name, $from, $from_name, $file_attachment, $mode_smtp, $template_path, $die, $id_shop, $bcc);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment