Как пример:
$cart_rule = new CartRule();
$cart_rule->code = $discountCode;
foreach (Language::getLanguages(false) as $language)
$cart_rule->name[$language['id_lang']] = Configuration::get('COUPON_DESC');
$cart_rule->id_customer = (int)$customer->id;
$cart_rule->free_shipping = false;
$cart_rule->quantity = 1;
$cart_rule->quantity_per_user = 1;
$cart_rule->reduction_currency = (int)$this->context->cart->id_currency;
$cart_rule->reduction_percent = Configuration::get('COUPON_DISCOUNT');
$cart_rule->date_from = date('Y-m-d H:i:s', time());
$cart_rule->date_to = date('Y-m-d H:i:s', time() + (3600 * 24 * Configuration::get('COUPON_DAY')));
$cart_rule->active = 1;
if ($cart_rule->add())
{
Mail::Send(Configuration::get('PS_LANG_DEFAULT'), 'coupon', 'Вам купон на скидку', array('{shop_name}' => Configuration::get('PS_SHOP_NAME'), '{firstname}' => $customer->firstname, '{lastname}' => '', '{email}' => $customer->email, '{code}' => $discountCode), $customer->email, NULL, strval(Configuration::get('PS_SHOP_EMAIL')), strval(Configuration::get('PS_SHOP_NAME')), NULL, NULL, dirname(__FILE__).'/mails/');
die(true);
}