diff --git a/modules/followup/followup.php b/modules/followup/followup.php index 407593723..30feb6c78 100644 --- a/modules/followup/followup.php +++ b/modules/followup/followup.php @@ -90,174 +90,18 @@ class Followup extends Module { $html = ''; /* Save settings */ - if (Tools::isSubmit('submitFollowUp')) + if (Tools::isSubmit('submitFollowUp')) + { + $ok = true; foreach ($this->confKeys AS $c) - Configuration::updateValue($c, (float)(Tools::getValue($c))); - - /* Init */ - $conf = Configuration::getMultiple($this->confKeys); - foreach ($this->confKeys AS $k) - if (!isset($conf[$k])) - $conf[$k] = ''; - $currency = new Currency((int)(Configuration::get('PS_CURRENCY_DEFAULT'))); - - $n1 = $this->cancelledCart(true); - $n2 = $this->reOrder(true); - $n3 = $this->bestCustomer(true); - $n4 = $this->badCustomer(true); - - $html .= ' -
'.$this->l('Four kinds of e-mail alerts available in order to stay in touch with your customers!').' - '.$this->l('Define settings and place this URL in crontab or call it manually daily:').' - '.Tools::getShopDomain(true, true).__PS_BASE_URI__.'modules/followup/cron.php?secure_key='.Configuration::get('PS_FOLLOWUP_SECURE_KEY').'
1. '.$this->l('Cancelled carts').''.$this->l('For each cancelled cart (with no order), generate a discount and send it to the customer.').'
'.($n1 > 1 ? sprintf($this->l('Next process will send: %d e-mails'), $n1) : sprintf($this->l('Next process will send: %d e-mail'), $n1)).'
2. '.$this->l('Re-order').''.$this->l('For each validated order, generate a discount and send it to the customer.').'
'.($n2 > 1 ? sprintf($this->l('Next process will send: %d e-mails'), $n2) : sprintf($this->l('Next process will send: %d e-mail'), $n2)).'
3. '.$this->l('Best customers').''.$this->l('For each customer raising a threshold, generate a discount and send it to the customer.').'
'.($n3 > 1 ? sprintf($this->l('Next process will send: %d e-mails'), $n3) : sprintf($this->l('Next process will send: %d e-mail'), $n3)).'
4. '.$this->l('Bad customers').''.$this->l('For each customer who has already passed at least one order and with no orders since a given duration, generate a discount and send it to the customer.').'
'.($n4 > 1 ? sprintf($this->l('Next process will send: %d e-mails'), $n4) : sprintf($this->l('Next process will send: %d e-mail'), $n4)).'
- '.$this->l('S = Number of sent e-mails').' - '.$this->l('U = Number of discounts used (valid orders only)').' - '.$this->l('% = Conversion rate').' -