diff --git a/modules/referralprogram/controllers/front/email.php b/modules/referralprogram/controllers/front/email.php new file mode 100755 index 000000000..77c6d1cd2 --- /dev/null +++ b/modules/referralprogram/controllers/front/email.php @@ -0,0 +1,73 @@ + +* @copyright 2007-2012 PrestaShop SA +* @version Release: $Revision: 13573 $ +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * @since 1.5.0 + */ +class ReferralprogramEmailModuleFrontController extends ModuleFrontController +{ + public $content_only = true; + + public $display_header = false; + + public $display_footer = false; + + /** + * @see FrontController::initContent() + */ + public function initContent() + { + parent::initContent(); + $shop_name = htmlentities(Configuration::get('PS_SHOP_NAME'), NULL, 'utf-8'); + $shop_url = Tools::getHttpHost(true, true); + $customer = Context::getContext()->customer; + + if (!preg_match("#.*\.html$#Ui", Tools::getValue('mail')) OR !preg_match("#.*\.html$#Ui", Tools::getValue('mail'))) + die(Tools::redirect()); + + $file = file_get_contents(dirname(__FILE__).'/../../mails/'.strval(preg_replace('#\.{2,}#', '.', Tools::getValue('mail')))); + + $file = str_replace('{shop_name}', $shop_name, $file); + $file = str_replace('{shop_url}', $shop_url.__PS_BASE_URI__, $file); + $file = str_replace('{shop_logo}', $shop_url._PS_IMG_.'logo.jpg', $file); + $file = str_replace('{firstname}', $customer->firstname, $file); + $file = str_replace('{lastname}', $customer->lastname, $file); + $file = str_replace('{email}', $customer->email, $file); + $file = str_replace('{firstname_friend}', 'XXXXX', $file); + $file = str_replace('{lastname_friend}', 'xxxxxx', $file); + $file = str_replace('{link}', 'authentication.php?create_account=1', $file); + $discount_type = (int)(Configuration::get('REFERRAL_DISCOUNT_TYPE')); + if ($discount_type == 1) + $file = str_replace('{discount}', Discount::display((float)(Configuration::get('REFERRAL_PERCENTAGE')), $discount_type, new Currency($this->context->currency->id)), $file); + else + $file = str_replace('{discount}', Discount::display((float)(Configuration::get('REFERRAL_DISCOUNT_VALUE_' . $this->context->currency->id)), $discount_type, new Currency($this->context->currency->id)), $file); + + $this->context->smarty->assign(array('content' => $file)); + + $this->setTemplate('email.tpl'); + } +} \ No newline at end of file diff --git a/modules/referralprogram/controllers/front/program.php b/modules/referralprogram/controllers/front/program.php new file mode 100755 index 000000000..459207781 --- /dev/null +++ b/modules/referralprogram/controllers/front/program.php @@ -0,0 +1,206 @@ + +* @copyright 2007-2012 PrestaShop SA +* @version Release: $Revision: 13573 $ +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * @since 1.5.0 + */ +include_once(dirname(__FILE__).'../../../ReferralProgramModule.php'); +include_once(dirname(__FILE__).'../../../referralprogram.php'); + +class ReferralprogramProgramModuleFrontController extends ModuleFrontController +{ + + public function init() + { + if (!$this->context->customer->isLogged()) + Tools::redirect('index.php?controller=authentication&back=modules/referralprogram/referralprogram-program.php'); + parent::init(); + } + + public function setMedia() + { + parent::setMedia(); + $this->addJqueryPlugin(array('thickbox', 'idTabs')); + } + + + /** + * @see FrontController::initContent() + */ + public function initContent() + { + parent::initContent(); + + // get discount value (ready to display) + $discount_type = (int)(Configuration::get('REFERRAL_DISCOUNT_TYPE')); + if ($discount_type == 1) + $discount = Discount::display((float)(Configuration::get('REFERRAL_PERCENTAGE')), $discount_type, new Currency($this->context->currency->id)); + else + $discount = Discount::display((float)(Configuration::get('REFERRAL_DISCOUNT_VALUE_'.(int)($this->context->currency->id))), $discount_type, new Currency($this->context->currency->id)); + + $activeTab = 'sponsor'; + $error = false; + + // Mailing invitation to friend sponsor + $invitation_sent = false; + $nbInvitation = 0; + if (Tools::isSubmit('submitSponsorFriends') AND Tools::getValue('friendsEmail') AND sizeof($friendsEmail = Tools::getValue('friendsEmail')) >= 1) + { + $activeTab = 'sponsor'; + if (!Tools::getValue('conditionsValided')) + $error = 'conditions not valided'; + else + { + $friendsLastName = Tools::getValue('friendsLastName'); + $friendsFirstName = Tools::getValue('friendsFirstName'); + $mails_exists = array(); + foreach ($friendsEmail AS $key => $friendEmail) + { + $friendEmail = strval($friendEmail); + $friendLastName = strval($friendsLastName[$key]); + $friendFirstName = strval($friendsFirstName[$key]); + + if (empty($friendEmail) AND empty($friendLastName) AND empty($friendFirstName)) + continue; + elseif (empty($friendEmail) OR !Validate::isEmail($friendEmail)) + $error = 'email invalid'; + elseif (empty($friendFirstName) OR empty($friendLastName) OR !Validate::isName($friendLastName) OR !Validate::isName($friendFirstName)) + $error = 'name invalid'; + elseif (ReferralProgramModule::isEmailExists($friendEmail) OR Customer::customerExists($friendEmail)) + $mails_exists[] = $friendEmail; + else + { + $referralprogram = new ReferralProgramModule(); + $referralprogram->id_sponsor = (int)($this->context->customer->id); + $referralprogram->firstname = $friendFirstName; + $referralprogram->lastname = $friendLastName; + $referralprogram->email = $friendEmail; + if (!$referralprogram->validateFields(false)) + $error = 'name invalid'; + else + { + if ($referralprogram->save()) + { + if (Configuration::get('PS_CIPHER_ALGORITHM')) + $cipherTool = new Rijndael(_RIJNDAEL_KEY_, _RIJNDAEL_IV_); + else + $cipherTool = new Blowfish(_COOKIE_KEY_, _COOKIE_IV_); + $vars = array( + '{email}' => strval($this->context->customer->email), + '{lastname}' => strval($this->context->customer->lastname), + '{firstname}' => strval($this->context->customer->firstname), + '{email_friend}' => $friendEmail, + '{lastname_friend}' => $friendLastName, + '{firstname_friend}' => $friendFirstName, + '{link}' => 'authentication.php?create_account=1&sponsor='.urlencode($cipherTool->encrypt($referralprogram->id.'|'.$referralprogram->email.'|')), + '{discount}' => $discount); + Mail::Send((int)$this->context->language->id, 'referralprogram-invitation', Mail::l('Referral Program', (int)$this->context->language->id), $vars, $friendEmail, $friendFirstName.' '.$friendLastName, strval(Configuration::get('PS_SHOP_EMAIL')), strval(Configuration::get('PS_SHOP_NAME')), NULL, NULL, dirname(__FILE__).'/../../mails/'); + $invitation_sent = true; + $nbInvitation++; + $activeTab = 'pending'; + } + else + $error = 'cannot add friends'; + } + } + if ($error) + break; + } + if ($nbInvitation > 0) + unset($_POST); + //Not to stop the sending of e-mails in case of doubloon + if(sizeof($mails_exists)) + $error = 'email exists'; + } + } + + // Mailing revive + $revive_sent = false; + $nbRevive = 0; + if (Tools::isSubmit('revive')) + { + $activeTab = 'pending'; + if (Tools::getValue('friendChecked') AND sizeof($friendsChecked = Tools::getValue('friendChecked')) >= 1) + { + foreach ($friendsChecked as $key => $friendChecked) + { + if (ReferralProgramModule::isSponsorFriend((int)($this->context->customer->id), (int)($friendChecked))) + { + if (Configuration::get('PS_CIPHER_ALGORITHM')) + $cipherTool = new Rijndael(_RIJNDAEL_KEY_, _RIJNDAEL_IV_); + else + $cipherTool = new Blowfish(_COOKIE_KEY_, _COOKIE_IV_); + $referralprogram = new ReferralProgramModule((int)($key)); + $vars = array( + '{email}' => $this->context->customer->email, + '{lastname}' => $this->context->customer->lastname, + '{firstname}' => $this->context->customer->firstname, + '{email_friend}' => $referralprogram->email, + '{lastname_friend}' => $referralprogram->lastname, + '{firstname_friend}' => $referralprogram->firstname, + '{link}' => 'authentication.php?create_account=1&sponsor='.urlencode($cipherTool->encrypt($referralprogram->id.'|'.$referralprogram->email.'|')), + '{discount}' => $discount + ); + $referralprogram->save(); + Mail::Send((int)$this->context->language->id, 'referralprogram-invitation', Mail::l('Referral Program', (int)$this->context->language->id), $vars, $referralprogram->email, $referralprogram->firstname.' '.$referralprogram->lastname, strval(Configuration::get('PS_SHOP_EMAIL')), strval(Configuration::get('PS_SHOP_NAME')), NULL, NULL, dirname(__FILE__).'/../../mails/'); + $revive_sent = true; + $nbRevive++; + } + } + } + else + $error = 'no revive checked'; + } + + $customer = new Customer((int)($this->context->customer->id)); + $stats = $customer->getStats(); + + $orderQuantity = (int)(Configuration::get('REFERRAL_ORDER_QUANTITY')); + $canSendInvitations = false; + + if ((int)($stats['nb_orders']) >= $orderQuantity) + $canSendInvitations = true; + + // Smarty display + $this->context->smarty->assign(array( + 'activeTab' => $activeTab, + 'discount' => $discount, + 'orderQuantity' => $orderQuantity, + 'canSendInvitations' => $canSendInvitations, + 'nbFriends' => (int)(Configuration::get('REFERRAL_NB_FRIENDS')), + 'error' => $error, + 'invitation_sent' => $invitation_sent, + 'nbInvitation' => $nbInvitation, + 'pendingFriends' => ReferralProgramModule::getSponsorFriend((int)($this->context->customer->id), 'pending'), + 'revive_sent' => $revive_sent, + 'nbRevive' => $nbRevive, + 'subscribeFriends' => ReferralProgramModule::getSponsorFriend((int)($this->context->customer->id), 'subscribed'), + 'mails_exists' => (isset($mails_exists) ? $mails_exists : array()) + )); + $this->setTemplate('program.tpl'); + } +} \ No newline at end of file diff --git a/modules/referralprogram/referralprogram-rules.php b/modules/referralprogram/controllers/front/rules.php old mode 100644 new mode 100755 similarity index 54% rename from modules/referralprogram/referralprogram-rules.php rename to modules/referralprogram/controllers/front/rules.php index 18aa70cf5..acbc8e5e8 --- a/modules/referralprogram/referralprogram-rules.php +++ b/modules/referralprogram/controllers/front/rules.php @@ -20,35 +20,39 @@ * * @author PrestaShop SA * @copyright 2007-2012 PrestaShop SA -* @version Release: $Revision: 6844 $ +* @version Release: $Revision: 13573 $ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA */ -require_once(dirname(__FILE__).'/../../config/config.inc.php'); -require_once(dirname(__FILE__).'/../../init.php'); - -include_once(dirname(__FILE__).'/referralprogram.php'); - -if (!Tools::getValue('width') AND !Tools::getValue('height')) - require_once(dirname(__FILE__).'/../../header.php'); - -$xmlFile = _PS_MODULE_DIR_.'referralprogram/referralprogram.xml'; - -if (file_exists($xmlFile)) +/** + * @since 1.5.0 + */ +class ReferralprogramRulesModuleFrontController extends ModuleFrontController { - if ($xml = @simplexml_load_file($xmlFile)) + public $content_only = true; + + public $display_header = false; + + public $display_footer = false; + + /** + * @see FrontController::initContent() + */ + public function initContent() { - $smarty->assign(array( - 'xml' => $xml, - 'paragraph' => 'paragraph_'.$cookie->id_lang - )); + parent::initContent(); + $xmlFile = _PS_MODULE_DIR_.'referralprogram/referralprogram.xml'; + if (file_exists($xmlFile)) + { + if ($xml = @simplexml_load_file($xmlFile)) + { + $this->context->smarty->assign(array( + 'xml' => $xml, + 'paragraph' => 'paragraph_'.$this->context->language->id + )); + } + } + $this->setTemplate('rules.tpl'); } -} - -$referralprogram = new ReferralProgram(); -echo $referralprogram->display(dirname(__FILE__).'/referralprogram', 'referralprogram-rules.tpl'); - -if (!Tools::getValue('width') AND !Tools::getValue('height')) - require_once(dirname(__FILE__).'/../../footer.php'); - +} \ No newline at end of file diff --git a/modules/referralprogram/preview-email.php b/modules/referralprogram/preview-email.php deleted file mode 100644 index 8bf15184b..000000000 --- a/modules/referralprogram/preview-email.php +++ /dev/null @@ -1,60 +0,0 @@ - -* @copyright 2007-2012 PrestaShop SA -* @version Release: $Revision: 6844 $ -* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) -* International Registered Trademark & Property of PrestaShop SA -*/ - -require_once('../../config/config.inc.php'); -require_once('../../init.php'); - -$shop_name = htmlentities(Configuration::get('PS_SHOP_NAME'), NULL, 'utf-8'); -$shop_url = Tools::getHttpHost(true, true); -$customer = Context::getContext()->customer; - -if (!preg_match("#.*\.html$#Ui", Tools::getValue('mail')) OR !preg_match("#.*\.html$#Ui", Tools::getValue('mail'))) - die(Tools::displayError()); - -$file = file_get_contents(dirname(__FILE__).'/mails/'.strval(preg_replace('#\.{2,}#', '.', Tools::getValue('mail')))); - -$file = str_replace('{shop_name}', $shop_name, $file); -$file = str_replace('{shop_url}', $shop_url.__PS_BASE_URI__, $file); -$file = str_replace('{shop_logo}', $shop_url._PS_IMG_.'logo.jpg', $file); -$file = str_replace('{firstname}', $customer->firstname, $file); -$file = str_replace('{lastname}', $customer->lastname, $file); -$file = str_replace('{email}', $customer->email, $file); -$file = str_replace('{firstname_friend}', 'XXXXX', $file); -$file = str_replace('{lastname_friend}', 'xxxxxx', $file); -$file = str_replace('{link}', 'authentication.php?create_account=1', $file); -$discount_type = (int)(Configuration::get('REFERRAL_DISCOUNT_TYPE')); -if ($discount_type == 1) -{ - $file = str_replace('{discount}', Discount::display((float)(Configuration::get('REFERRAL_PERCENTAGE')), $discount_type, new Currency($cookie->id_currency)), $file); -} -else -{ - $file = str_replace('{discount}', Discount::display((float)(Configuration::get('REFERRAL_DISCOUNT_VALUE_' . $cookie->id_currency)), $discount_type, new Currency($cookie->id_currency)), $file); -} -echo $file; - - diff --git a/modules/referralprogram/referralprogram-program.php b/modules/referralprogram/referralprogram-program.php deleted file mode 100644 index 5b05f0113..000000000 --- a/modules/referralprogram/referralprogram-program.php +++ /dev/null @@ -1,201 +0,0 @@ - -* @copyright 2007-2012 PrestaShop SA -* @version Release: $Revision: 7310 $ -* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) -* International Registered Trademark & Property of PrestaShop SA -*/ - -/* SSL Management */ -$useSSL = true; -require_once(dirname(__FILE__).'/../../config/config.inc.php'); -require_once(dirname(__FILE__).'/../../init.php'); - -include_once(dirname(__FILE__).'/ReferralProgramModule.php'); -include_once(dirname(__FILE__).'/referralprogram.php'); - -$context = Context::getContext(); -if (!$context->customer->isLogged()) - Tools::redirect('index.php?controller=authentication&back=modules/referralprogram/referralprogram-program.php'); - -$context->controller->addJqueryPlugin(array('thickbox', 'idTabs')); - -include(dirname(__FILE__).'/../../header.php'); - -// get discount value (ready to display) -$discount_type = (int)(Configuration::get('REFERRAL_DISCOUNT_TYPE')); -if ($discount_type == 1) -{ - $discount = Discount::display((float)(Configuration::get('REFERRAL_PERCENTAGE')), $discount_type, new Currency($cookie->id_currency)); -} -else -{ - $discount = Discount::display((float)(Configuration::get('REFERRAL_DISCOUNT_VALUE_'.(int)($cookie->id_currency))), $discount_type, new Currency($cookie->id_currency)); -} -$activeTab = 'sponsor'; -$error = false; - -// Mailing invitation to friend sponsor -$invitation_sent = false; -$nbInvitation = 0; -if (Tools::isSubmit('submitSponsorFriends') AND Tools::getValue('friendsEmail') AND sizeof($friendsEmail = Tools::getValue('friendsEmail')) >= 1) -{ - $activeTab = 'sponsor'; - if (!Tools::getValue('conditionsValided')) - $error = 'conditions not valided'; - else - { - $friendsLastName = Tools::getValue('friendsLastName'); - $friendsFirstName = Tools::getValue('friendsFirstName'); - $mails_exists = array(); - foreach ($friendsEmail AS $key => $friendEmail) - { - $friendEmail = strval($friendEmail); - $friendLastName = strval($friendsLastName[$key]); - $friendFirstName = strval($friendsFirstName[$key]); - - if (empty($friendEmail) AND empty($friendLastName) AND empty($friendFirstName)) - continue; - elseif (empty($friendEmail) OR !Validate::isEmail($friendEmail)) - $error = 'email invalid'; - elseif (empty($friendFirstName) OR empty($friendLastName) OR !Validate::isName($friendLastName) OR !Validate::isName($friendFirstName)) - $error = 'name invalid'; - elseif (ReferralProgramModule::isEmailExists($friendEmail) OR Customer::customerExists($friendEmail)) - { - $mails_exists[] = $friendEmail; - - } - else - { - $referralprogram = new ReferralProgramModule(); - $referralprogram->id_sponsor = (int)($cookie->id_customer); - $referralprogram->firstname = $friendFirstName; - $referralprogram->lastname = $friendLastName; - $referralprogram->email = $friendEmail; - if (!$referralprogram->validateFields(false)) - $error = 'name invalid'; - else - { - if ($referralprogram->save()) - { - if (Configuration::get('PS_CIPHER_ALGORITHM')) - $cipherTool = new Rijndael(_RIJNDAEL_KEY_, _RIJNDAEL_IV_); - else - $cipherTool = new Blowfish(_COOKIE_KEY_, _COOKIE_IV_); - $vars = array( - '{email}' => strval($cookie->email), - '{lastname}' => strval($cookie->customer_lastname), - '{firstname}' => strval($cookie->customer_firstname), - '{email_friend}' => $friendEmail, - '{lastname_friend}' => $friendLastName, - '{firstname_friend}' => $friendFirstName, - '{link}' => 'authentication.php?create_account=1&sponsor='.urlencode($cipherTool->encrypt($referralprogram->id.'|'.$referralprogram->email.'|')), - '{discount}' => $discount); - Mail::Send((int)$cookie->id_lang, 'referralprogram-invitation', Mail::l('Referral Program', (int)$cookie->id_lang), $vars, $friendEmail, $friendFirstName.' '.$friendLastName, strval(Configuration::get('PS_SHOP_EMAIL')), strval(Configuration::get('PS_SHOP_NAME')), NULL, NULL, dirname(__FILE__).'/mails/'); - $invitation_sent = true; - $nbInvitation++; - $activeTab = 'pending'; - } - else - $error = 'cannot add friends'; - } - } - if ($error) - break; - } - if ($nbInvitation > 0) - unset($_POST); - //Not to stop the sending of e-mails in case of doubloon - if(sizeof($mails_exists)) - $error = 'email exists'; - } -} - -// Mailing revive -$revive_sent = false; -$nbRevive = 0; -if (Tools::isSubmit('revive')) -{ - $activeTab = 'pending'; - if (Tools::getValue('friendChecked') AND sizeof($friendsChecked = Tools::getValue('friendChecked')) >= 1) - { - foreach ($friendsChecked as $key => $friendChecked) - { - if (ReferralProgramModule::isSponsorFriend((int)($cookie->id_customer), (int)($friendChecked))) - { - if (Configuration::get('PS_CIPHER_ALGORITHM')) - $cipherTool = new Rijndael(_RIJNDAEL_KEY_, _RIJNDAEL_IV_); - else - $cipherTool = new Blowfish(_COOKIE_KEY_, _COOKIE_IV_); - $referralprogram = new ReferralProgramModule((int)($key)); - $vars = array( - '{email}' => $cookie->email, - '{lastname}' => $cookie->customer_lastname, - '{firstname}' => $cookie->customer_firstname, - '{email_friend}' => $referralprogram->email, - '{lastname_friend}' => $referralprogram->lastname, - '{firstname_friend}' => $referralprogram->firstname, - '{link}' => 'authentication.php?create_account=1&sponsor='.urlencode($cipherTool->encrypt($referralprogram->id.'|'.$referralprogram->email.'|')), - '{discount}' => $discount - ); - $referralprogram->save(); - Mail::Send((int)$cookie->id_lang, 'referralprogram-invitation', Mail::l('Referral Program', (int)$cookie->id_lang), $vars, $referralprogram->email, $referralprogram->firstname.' '.$referralprogram->lastname, strval(Configuration::get('PS_SHOP_EMAIL')), strval(Configuration::get('PS_SHOP_NAME')), NULL, NULL, dirname(__FILE__).'/mails/'); - $revive_sent = true; - $nbRevive++; - } - } - } - else - $error = 'no revive checked'; -} - -$customer = new Customer((int)($cookie->id_customer)); -$stats = $customer->getStats(); - -$orderQuantity = (int)(Configuration::get('REFERRAL_ORDER_QUANTITY')); -$canSendInvitations = false; -if ((int)($stats['nb_orders']) >= $orderQuantity) - $canSendInvitations = true; - -// Smarty display -$smarty->assign(array( - 'activeTab' => $activeTab, - 'discount' => $discount, - 'orderQuantity' => $orderQuantity, - 'canSendInvitations' => $canSendInvitations, - 'nbFriends' => (int)(Configuration::get('REFERRAL_NB_FRIENDS')), - 'error' => $error, - 'invitation_sent' => $invitation_sent, - 'nbInvitation' => $nbInvitation, - 'pendingFriends' => ReferralProgramModule::getSponsorFriend((int)($cookie->id_customer), 'pending'), - 'revive_sent' => $revive_sent, - 'nbRevive' => $nbRevive, - 'subscribeFriends' => ReferralProgramModule::getSponsorFriend((int)($cookie->id_customer), 'subscribed'), - 'mails_exists' => (isset($mails_exists) ? $mails_exists : array()) -)); - -$referralprogram = new ReferralProgram(); -echo $referralprogram->display(dirname(__FILE__).'/referralprogram.php', 'referralprogram-program.tpl'); - -include(dirname(__FILE__).'/../../footer.php'); - - diff --git a/modules/referralprogram/referralprogram.xml b/modules/referralprogram/referralprogram.xml index 55ee26257..39b90db5e 100644 --- a/modules/referralprogram/referralprogram.xml +++ b/modules/referralprogram/referralprogram.xml @@ -1,13 +1,6 @@ - toto Quisque in mauris. Duis eu diam. Nullam at metus in lectus interdum elementum. Vestibulum dapibus diam ut libero. Vivamus placerat lacus at dui. Integer dapibus est in magna.

-

Curabitur vel erat eget sapien semper feugiat. Sed sodales dictum pede. Ut adipiscing. Cras aliquam, erat eget auctor pretium, lorem pede pellentesque metus, at ultrices est est sit amet libero.

-

Aliquam erat volutpat. Maecenas aliquet, felis at eleifend suscipit, risus sem congue est, id vestibulum libero sapien in ligula. Nulla ut urna id eros lacinia gravida.

]]>
- Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean nisl diam, sollicitudin vitae, tempor nec, suscipit non, quam. Donec in nulla. Nam consequat bibendum leo. Etiam viverra congue nisl. Aliquam ac tellus vitae arcu ornare convallis.

-

Nulla ut erat. Vivamus ornare imperdiet libero. Integer risus mauris, faucibus eu, fermentum tincidunt, molestie non, arcu. Phasellus mattis, dui ac vestibulum pellentesque, enim turpis scelerisque augue, ut tristique quam metus eu metus. Donec pellentesque faucibus velit. Vivamus quis ipsum. leather edition is near from you ut libero sed mauris venenatis iaculis. Curabitur nulla erat, accumsan ac, consequat quis, aliquet sit amet, orci.

-

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean nisl diam, sollicitudin vitae, tempor nec, suscipit non, quam. Donec in nulla. Nam consequat bibendum leo. Etiam viverra congue nisl. Aliquam ac tellus vitae arcu ornare convallis.

-

Nulla ut erat. Vivamus ornare imperdiet libero. Integer risus mauris, faucibus eu, fermentum tincidunt, molestie non, arcu. Phasellus mattis, dui ac vestibulum pellentesque, enim turpis scelerisque augue, ut tristique quam metus eu metus. Donec pellentesque faucibus velit. Vivamus quis ipsum. Pellentesque ut libero sed mauris venenatis iaculis. Curabitur nulla erat, accumsan ac, consequat quis, aliquet sit amet, orci.

]]>
- test espagnol

]]>
+
diff --git a/modules/referralprogram/views/templates/front/email.tpl b/modules/referralprogram/views/templates/front/email.tpl new file mode 100755 index 000000000..8dc4d213d --- /dev/null +++ b/modules/referralprogram/views/templates/front/email.tpl @@ -0,0 +1,27 @@ +{* +* 2007-2012 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2012 PrestaShop SA +* @version Release: $Revision: 6594 $ +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{$content} diff --git a/modules/referralprogram/referralprogram-program.tpl b/modules/referralprogram/views/templates/front/program.tpl similarity index 91% rename from modules/referralprogram/referralprogram-program.tpl rename to modules/referralprogram/views/templates/front/program.tpl index 8f2d9788b..d4ecc4ffa 100644 --- a/modules/referralprogram/referralprogram-program.tpl +++ b/modules/referralprogram/views/templates/front/program.tpl @@ -96,7 +96,7 @@ {/if}, {l s='he or she will receive a %1$d voucher and you will receive your own voucher worth %2$d.' sprintf=[$discount,$discount] mod='referralprogram'}

-
+ @@ -123,10 +123,12 @@

- {l s='Read conditions.' mod='referralprogram'} + {l s='Read conditions.' mod='referralprogram'}

- {l s='Preview' mod='referralprogram'} {l s='the default e-mail' mod='referralprogram'} {l s='that will be sent to your friend(s).' mod='referralprogram'} + {l s='Preview' mod='referralprogram'} + {assign var="file" value="{$lang_iso}/referralprogram-invitation.html"} + {l s='the default e-mail' mod='referralprogram'} {l s='that will be sent to your friend(s).' mod='referralprogram'}

@@ -144,7 +146,7 @@

{l s='These friends have not yet placed an order on this Website since you sponsored them, but you can try again! To do so, mark the checkboxes of the friend(s) you want to remind, then click on the button "Remind my friend(s)"' mod='referralprogram'}

- +
diff --git a/modules/referralprogram/referralprogram-rules.tpl b/modules/referralprogram/views/templates/front/rules.tpl old mode 100644 new mode 100755 similarity index 100% rename from modules/referralprogram/referralprogram-rules.tpl rename to modules/referralprogram/views/templates/front/rules.tpl diff --git a/modules/referralprogram/authentication.tpl b/modules/referralprogram/views/templates/hook/authentication.tpl old mode 100644 new mode 100755 similarity index 100% rename from modules/referralprogram/authentication.tpl rename to modules/referralprogram/views/templates/hook/authentication.tpl diff --git a/modules/referralprogram/my-account.tpl b/modules/referralprogram/views/templates/hook/my-account.tpl old mode 100644 new mode 100755 similarity index 73% rename from modules/referralprogram/my-account.tpl rename to modules/referralprogram/views/templates/hook/my-account.tpl index 532855e23..36b16facc --- a/modules/referralprogram/my-account.tpl +++ b/modules/referralprogram/views/templates/hook/my-account.tpl @@ -25,5 +25,10 @@ *} -
  • {l s='Referral program' mod='referralprogram'} {l s='Referral program' mod='referralprogram'}
  • +
  • + + {l s='Referral program' mod='referralprogram'} + {l s='Referral program' mod='referralprogram'} + +
  • \ No newline at end of file diff --git a/modules/referralprogram/order-confirmation.tpl b/modules/referralprogram/views/templates/hook/order-confirmation.tpl old mode 100644 new mode 100755 similarity index 100% rename from modules/referralprogram/order-confirmation.tpl rename to modules/referralprogram/views/templates/hook/order-confirmation.tpl diff --git a/modules/referralprogram/shopping-cart.tpl b/modules/referralprogram/views/templates/hook/shopping-cart.tpl old mode 100644 new mode 100755 similarity index 86% rename from modules/referralprogram/shopping-cart.tpl rename to modules/referralprogram/views/templates/hook/shopping-cart.tpl index 2c2c404e6..264436b7a --- a/modules/referralprogram/shopping-cart.tpl +++ b/modules/referralprogram/views/templates/hook/shopping-cart.tpl @@ -29,7 +29,7 @@ {l s='Referral program' mod='referralprogram'} {l s='You have earned a voucher worth %s thanks to your sponsor!' sprintf=$discount_display mod='referralprogram'} {l s='Enter voucher name %s to receive the reduction on this order.' sprintf=$discount->name mod='referralprogram'} - {l s='View your referral program.' mod='referralprogram'} + {l s='View your referral program.' mod='referralprogram'}


    \ No newline at end of file