[-] MO : Referralprogram Prevent Exception when badly configured

This commit is contained in:
gRoussac
2013-11-18 14:58:17 +01:00
parent bcc851c98c
commit 8d627aa522

View File

@@ -93,6 +93,8 @@ class ReferralProgramModule extends ObjectModel
$cartRule->date_to = date('Y-m-d H:i:s', time() + 31536000); // + 1 year
$cartRule->code = $this->getDiscountPrefix().Tools::passwdGen(6);
$cartRule->name = Configuration::getInt('REFERRAL_DISCOUNT_DESCRIPTION');
if (empty($cartRule->name))
$cartRule->name = 'Referral reward';
$cartRule->id_customer = (int)$id_customer;
$cartRule->reduction_currency = (int)$id_currency;