Compare commits
24 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
738aa51c1e | ||
|
301bef8069 | ||
|
5392d1d300 | ||
|
b9d4cfcf5b | ||
|
2b9b182030 | ||
|
6c0a154096 | ||
|
b15a82b1ae | ||
|
f646c42db7 | ||
|
51442d7287 | ||
|
88a2834870 | ||
|
11b9f278c0 | ||
|
820e080976 | ||
|
8f17f76225 | ||
|
773b8db153 | ||
|
5b49ba1fcd | ||
|
4f314a1310 | ||
|
ea946e212c | ||
|
2969c5b01a | ||
|
c64355eb2a | ||
|
9fa6bcaa42 | ||
|
a31bb7105a | ||
|
47f206a351 | ||
|
fa56cdd243 | ||
|
90cab265de |
@ -91,5 +91,10 @@ foreach ($final as $key => $item) {
|
|||||||
$address->id_country = ErpTools::getCountryIdForPresta($item['addr']['country_id'][0]);
|
$address->id_country = ErpTools::getCountryIdForPresta($item['addr']['country_id'][0]);
|
||||||
$address->is_erp = 1;
|
$address->is_erp = 1;
|
||||||
$address->id_erp = $item['addr']['id'];
|
$address->id_erp = $item['addr']['id'];
|
||||||
$address->save();
|
if (!empty($address->address1)) {
|
||||||
|
$address->save();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
error_log('erp_update_address - customer id #'.$customer->id.' / erp id #'.$item['company_id_erp'].' empty address');
|
||||||
|
}
|
||||||
}
|
}
|
@ -166,7 +166,13 @@ foreach ($ids_customer_update as $id_customer) {
|
|||||||
$address->id_country = ErpTools::getCountryIdForPresta($other_address['country_id'][0]);
|
$address->id_country = ErpTools::getCountryIdForPresta($other_address['country_id'][0]);
|
||||||
$address->is_erp = 1;
|
$address->is_erp = 1;
|
||||||
$address->id_erp = $other_address['id'];
|
$address->id_erp = $other_address['id'];
|
||||||
$address->save();
|
|
||||||
|
if (!empty($address->address1)) {
|
||||||
|
$address->save();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
error_log('erp_customer_update : customer id #'.$customer->id.' / erp id #'.$record['id'].' empty address');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -31,8 +31,9 @@ $ids_product = $models->execute_kw($db, $uid, $password,
|
|||||||
|
|
||||||
$d = Db::getInstance();
|
$d = Db::getInstance();
|
||||||
|
|
||||||
foreach ($ids_product as $key => $id) {
|
$date = date('Y-m-d H:i:s');
|
||||||
|
|
||||||
|
foreach ($ids_product as $key => $id) {
|
||||||
// get product's information
|
// get product's information
|
||||||
$record = $models->execute_kw($db, $uid, $password,
|
$record = $models->execute_kw($db, $uid, $password,
|
||||||
'product.template', 'read', array($id)
|
'product.template', 'read', array($id)
|
||||||
@ -80,7 +81,8 @@ foreach ($ids_product as $key => $id) {
|
|||||||
p.`reference` = "'.$record['default_code'].'",
|
p.`reference` = "'.$record['default_code'].'",
|
||||||
p.`weight` = '.(float)$record['weight'].',
|
p.`weight` = '.(float)$record['weight'].',
|
||||||
p.`out_of_stock` = 2,
|
p.`out_of_stock` = 2,
|
||||||
pl.`name` = "'.pSQL(trim(utf8_encode($name_product))).'"
|
pl.`name` = "'.pSQL(trim(utf8_encode($name_product))).'",
|
||||||
|
p.`date_upd` = "' . $date .'"
|
||||||
WHERE
|
WHERE
|
||||||
`id_erp` = '.(int)$id.'
|
`id_erp` = '.(int)$id.'
|
||||||
AND p.`id_product` = pl.id_product
|
AND p.`id_product` = pl.id_product
|
||||||
@ -97,6 +99,8 @@ foreach ($ids_product as $key => $id) {
|
|||||||
$sql = 'SELECT `id_image` FROM '._DB_PREFIX_.'image WHERE `id_product` = '.(int)$product_id;
|
$sql = 'SELECT `id_image` FROM '._DB_PREFIX_.'image WHERE `id_product` = '.(int)$product_id;
|
||||||
$id_image = $d->getValue($sql);
|
$id_image = $d->getValue($sql);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if ($id_image) {
|
if ($id_image) {
|
||||||
$image = new Image($id_image);
|
$image = new Image($id_image);
|
||||||
$imagesTypes = ImageType::getImagesTypes('products');
|
$imagesTypes = ImageType::getImagesTypes('products');
|
||||||
@ -104,7 +108,7 @@ foreach ($ids_product as $key => $id) {
|
|||||||
|
|
||||||
$image_exists = true;
|
$image_exists = true;
|
||||||
foreach ($imagesTypes as $imageType) {
|
foreach ($imagesTypes as $imageType) {
|
||||||
$image_exists = file_exists($existing_path.'-'.stripslashes($imageType['name']).'.'.$image->image_format);
|
$image_exists = file_exists('../img/p/'.$existing_path.'-'.stripslashes($imageType['name']).'.'.$image->image_format);
|
||||||
if (!$image_exists) {
|
if (!$image_exists) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
60
modules/addcustomer/addcustomer.php
Executable file
60
modules/addcustomer/addcustomer.php
Executable file
@ -0,0 +1,60 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
class addCustomer extends Module
|
||||||
|
{
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
$this->name = 'addcustomer';
|
||||||
|
$this->tab = 'front_office_feature';
|
||||||
|
$this->version = '1.0';
|
||||||
|
$this->author = 'Antadis';
|
||||||
|
$this->need_instance = 0;
|
||||||
|
$this->ps_versions_compliance = array('min' => '1.5', 'max' => _PS_VERSION_);
|
||||||
|
|
||||||
|
parent::__construct();
|
||||||
|
|
||||||
|
$this->displayName = $this->l('Add customer');
|
||||||
|
$this->description = $this->l('Ajout de client pouvant passer des commandes pro.');
|
||||||
|
|
||||||
|
$this->confirmUninstall = $this->l('Are you sure you want to uninstall this module?');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function install()
|
||||||
|
{
|
||||||
|
return parent::install()
|
||||||
|
&& $this->registerHook('DisplayHomeAddCusto')
|
||||||
|
&& $this->registerHook('moduleRoutes');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function hookDisplayHomeAddCusto($params)
|
||||||
|
{
|
||||||
|
$this->context->smarty->assign(
|
||||||
|
array(
|
||||||
|
'formLink' => $this->context->link->getModuleLink('addcustomer', 'form'),
|
||||||
|
'register' => Tools::getValue('register'),
|
||||||
|
)
|
||||||
|
);
|
||||||
|
return $this->display(__FILE__, 'views/templates/hook/addcustomer.tpl');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function hookModuleRoutes($params)
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'module-addcustomer-form' => [
|
||||||
|
'controller' => 'form',
|
||||||
|
'rule' => 'ouverture-compte.html',
|
||||||
|
'keywords' => [
|
||||||
|
'code'=> array(
|
||||||
|
'regexp'=>'[\w]+',
|
||||||
|
'param'=>'short_code'
|
||||||
|
)
|
||||||
|
],
|
||||||
|
'params' => [
|
||||||
|
'fc' => 'module',
|
||||||
|
'module' => 'addcustomer',
|
||||||
|
'controller' => 'form'
|
||||||
|
]
|
||||||
|
]
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
86
modules/addcustomer/controllers/front/form.php
Executable file
86
modules/addcustomer/controllers/front/form.php
Executable file
@ -0,0 +1,86 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
class addCustomerFormModuleFrontController extends ModuleFrontController
|
||||||
|
{
|
||||||
|
public $errors = null;
|
||||||
|
|
||||||
|
public function initContent()
|
||||||
|
{
|
||||||
|
if (Tools::isSubmit('SubmitRegister')) {
|
||||||
|
$this->processRequest();
|
||||||
|
if (empty($this->errors)) {
|
||||||
|
$this->sendMail();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->context->smarty->assign(array(
|
||||||
|
'hasError' => !empty($this->errors),
|
||||||
|
'errors' => $this->errors,
|
||||||
|
'formLink' => $this->context->link->getModuleLink('addcustomer', 'form'),
|
||||||
|
));
|
||||||
|
|
||||||
|
parent::initContent();
|
||||||
|
$this->setTemplate('form.tpl');
|
||||||
|
}
|
||||||
|
|
||||||
|
private function processRequest()
|
||||||
|
{
|
||||||
|
if (!Tools::getValue('lastName')) {
|
||||||
|
$this->errors = Tools::displayError('Un nom est requis');
|
||||||
|
} elseif (!Validate::isName(Tools::getValue('lastName'))) {
|
||||||
|
$this->errors = Tools::displayError('Veuillez renseigner un nom correct');
|
||||||
|
} elseif (!Tools::getValue('firstName')) {
|
||||||
|
$this->errors = Tools::displayError('Un nom est requis');
|
||||||
|
} elseif (!Validate::isName(Tools::getValue('firstName'))) {
|
||||||
|
$this->errors = Tools::displayError('Veuillez renseigner un prenom correct');
|
||||||
|
} elseif (!Tools::getValue('phoneNumber')) {
|
||||||
|
$this->errors = Tools::displayError('Un numéro est requis');
|
||||||
|
} elseif (!Validate::isPhoneNumber(Tools::getValue('phoneNumber'))) {
|
||||||
|
$this->errors = Tools::displayError('Veuillez renseigner un numéro correct');
|
||||||
|
} elseif (!Tools::getValue('email')) {
|
||||||
|
$this->errors = Tools::displayError('Une adresse mail est requise');
|
||||||
|
} elseif (!Validate::isEmail(Tools::getValue('email'))) {
|
||||||
|
$this->errors = Tools::displayError('Veuillez renseigner une adresse mail correct');
|
||||||
|
} elseif (!Tools::getValue('name')) {
|
||||||
|
$this->errors = Tools::displayError('Un nom d\'entrerpise est requise');
|
||||||
|
} elseif (!Tools::getValue('address')) {
|
||||||
|
$this->errors = Tools::displayError('Une adresse est requise');
|
||||||
|
} elseif (!Validate::isAddress(Tools::getValue('address'))) {
|
||||||
|
$this->errors = Tools::displayError('Veuillez renseigner une adresse correct');
|
||||||
|
}elseif (!Tools::getValue('city')) {
|
||||||
|
$this->errors = Tools::displayError('Une ville est requise');
|
||||||
|
} elseif (!Validate::isCityName(Tools::getValue('city'))) {
|
||||||
|
$this->errors = Tools::displayError('Veuillez renseigner une ville correct');
|
||||||
|
} elseif (!Tools::getValue('code')) {
|
||||||
|
$this->errors = Tools::displayError('Un code postal est requise');
|
||||||
|
} elseif (!Validate::isInt(Tools::getValue('code'))) {
|
||||||
|
$this->errors = Tools::displayError('Veuillez renseigner un code postal correct');
|
||||||
|
} elseif (!Tools::getValue('siret')) {
|
||||||
|
$this->errors = Tools::displayError('Un SIRET est requise');
|
||||||
|
} elseif (!Validate::isSiret(Tools::getValue('siret'))) {
|
||||||
|
$this->errors = Tools::displayError('Veuillez renseigner un SIRET correct');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private function sendMail()
|
||||||
|
{
|
||||||
|
$subject = 'Demande d\'accès à l\'espace professionnel';
|
||||||
|
$data = array(
|
||||||
|
'{lastName}' => Tools::getValue('lastName'),
|
||||||
|
'{firstName}' => Tools::getValue('firstName'),
|
||||||
|
'{phoneNumber}' => Tools::getValue('phoneNumber'),
|
||||||
|
'{address}' => Tools::getValue('address'),
|
||||||
|
'{city}' => Tools::getValue('city'),
|
||||||
|
'{code}' => Tools::getValue('code'),
|
||||||
|
'{email}' => Tools::getValue('email'),
|
||||||
|
'{name}' => Tools::getValue('name'),
|
||||||
|
'{siret}' => Tools::getValue('siret'),
|
||||||
|
);
|
||||||
|
|
||||||
|
Mail::Send(intval(Context::getContext()->language->id), 'addcustomer', $subject, $data, 'christophe@roykin.fr', null, null, null, null, null, 'modules/addcustomer/mails/');
|
||||||
|
Mail::Send(intval(Context::getContext()->language->id), 'addcustomer', $subject, $data, 'gerald@roykin.fr', null, null, null, null, null, 'modules/addcustomer/mails/');
|
||||||
|
$link = $this->context->link->getPageLink('index').'?register=success';
|
||||||
|
Tools::redirect($link);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
35
modules/addcustomer/controllers/front/index.php
Normal file
35
modules/addcustomer/controllers/front/index.php
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* 2007-2014 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 <contact@prestashop.com>
|
||||||
|
* @copyright 2007-2014 PrestaShop SA
|
||||||
|
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||||
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
|
*/
|
||||||
|
|
||||||
|
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||||
|
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||||
|
|
||||||
|
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||||
|
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||||
|
header("Pragma: no-cache");
|
||||||
|
|
||||||
|
header("Location: ../");
|
||||||
|
exit;
|
35
modules/addcustomer/controllers/index.php
Normal file
35
modules/addcustomer/controllers/index.php
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* 2007-2014 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 <contact@prestashop.com>
|
||||||
|
* @copyright 2007-2014 PrestaShop SA
|
||||||
|
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||||
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
|
*/
|
||||||
|
|
||||||
|
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||||
|
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||||
|
|
||||||
|
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||||
|
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||||
|
header("Pragma: no-cache");
|
||||||
|
|
||||||
|
header("Location: ../");
|
||||||
|
exit;
|
35
modules/addcustomer/index.php
Normal file
35
modules/addcustomer/index.php
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* 2007-2014 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 <contact@prestashop.com>
|
||||||
|
* @copyright 2007-2014 PrestaShop SA
|
||||||
|
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||||
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
|
*/
|
||||||
|
|
||||||
|
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||||
|
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||||
|
|
||||||
|
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||||
|
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||||
|
header("Pragma: no-cache");
|
||||||
|
|
||||||
|
header("Location: ../");
|
||||||
|
exit;
|
119
modules/addcustomer/mails/fr/addcustomer.html
Normal file
119
modules/addcustomer/mails/fr/addcustomer.html
Normal file
@ -0,0 +1,119 @@
|
|||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/strict.dtd">
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
|
||||||
|
<title>Message de {shop_name}</title>
|
||||||
|
|
||||||
|
|
||||||
|
<style> @media only screen and (max-width: 300px){
|
||||||
|
body {
|
||||||
|
width:218px !important;
|
||||||
|
margin:auto !important;
|
||||||
|
}
|
||||||
|
.table {width:195px !important;margin:auto !important;}
|
||||||
|
.logo, .titleblock, .linkbelow, .box, .footer, .space_footer{width:auto !important;display: block !important;}
|
||||||
|
span.title{font-size:20px !important;line-height: 23px !important}
|
||||||
|
span.subtitle{font-size: 14px !important;line-height: 18px !important;padding-top:10px !important;display:block !important;}
|
||||||
|
td.box p{font-size: 12px !important;font-weight: bold !important;}
|
||||||
|
.table-recap table, .table-recap thead, .table-recap tbody, .table-recap th, .table-recap td, .table-recap tr {
|
||||||
|
display: block !important;
|
||||||
|
}
|
||||||
|
.table-recap{width: 200px!important;}
|
||||||
|
.table-recap tr td, .conf_body td{text-align:center !important;}
|
||||||
|
.address{display: block !important;margin-bottom: 10px !important;}
|
||||||
|
.space_address{display: none !important;}
|
||||||
|
}
|
||||||
|
@media only screen and (min-width: 301px) and (max-width: 500px) {
|
||||||
|
body {width:308px!important;margin:auto!important;}
|
||||||
|
.table {width:285px!important;margin:auto!important;}
|
||||||
|
.logo, .titleblock, .linkbelow, .box, .footer, .space_footer{width:auto!important;display: block!important;}
|
||||||
|
.table-recap table, .table-recap thead, .table-recap tbody, .table-recap th, .table-recap td, .table-recap tr {
|
||||||
|
display: block !important;
|
||||||
|
}
|
||||||
|
.table-recap{width: 295px !important;}
|
||||||
|
.table-recap tr td, .conf_body td{text-align:center !important;}
|
||||||
|
|
||||||
|
}
|
||||||
|
@media only screen and (min-width: 501px) and (max-width: 768px) {
|
||||||
|
body {width:478px!important;margin:auto!important;}
|
||||||
|
.table {width:450px!important;margin:auto!important;}
|
||||||
|
.logo, .titleblock, .linkbelow, .box, .footer, .space_footer{width:auto!important;display: block!important;}
|
||||||
|
}
|
||||||
|
@media only screen and (max-device-width: 480px) {
|
||||||
|
body {width:308px!important;margin:auto!important;}
|
||||||
|
.table {width:285px;margin:auto!important;}
|
||||||
|
.logo, .titleblock, .linkbelow, .box, .footer, .space_footer{width:auto!important;display: block!important;}
|
||||||
|
|
||||||
|
.table-recap{width: 295px!important;}
|
||||||
|
.table-recap tr td, .conf_body td{text-align:center!important;}
|
||||||
|
.address{display: block !important;margin-bottom: 10px !important;}
|
||||||
|
.space_address{display: none !important;}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body style="-webkit-text-size-adjust:none;background-color:#fff;width:100%;font-family:Open-sans, sans-serif;color:#555454;font-size:13px;line-height:18px;margin:auto">
|
||||||
|
<table bgcolor="{mail-bg-color}" class="table table-mail" style="width:100%;margin-top:10px;-moz-box-shadow:0 0 5px #afafaf;-webkit-box-shadow:0 0 5px #afafaf;-o-box-shadow:0 0 5px #afafaf;box-shadow:0 0 5px #afafaf;filter:progid:DXImageTransform.Microsoft.Shadow(color=#afafaf,Direction=134,Strength=5)">
|
||||||
|
<tr>
|
||||||
|
<td class="space" style="width:20px;padding:7px 0"> </td>
|
||||||
|
<td align="center">
|
||||||
|
<table class="table" bgcolor="{table-bg-color}" style="width:600px" cellspacing="0" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<td align="center" class="logo">
|
||||||
|
<a title="{shop_name}" href="{shop_url}" style="color:{link-color}">
|
||||||
|
<img src="{header_img}" alt="{shop_name}">
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<table bgcolor="{table-bg-color}" style="width:600px" cellspacing="0">
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td class="titleblock" style="padding:10px 25px">
|
||||||
|
<font size="2" face="Open-sans, sans-serif" color="#555454">
|
||||||
|
<span class="title" style="color:{titre1-color};font-weight:500;font-size:28px;line-height:33px">Demande d'accès à l'espace professionnel !</span>
|
||||||
|
</font>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td class="box" style="padding:10px 25px">
|
||||||
|
<table class="table" style="border:1px solid {box-border-color};background-color:{box-bg-color};width:100%">
|
||||||
|
<tr>
|
||||||
|
<td width="5" style="padding:15px 5px"> </td>
|
||||||
|
<td style="padding:15px 0">
|
||||||
|
<font size="2" face="Open-sans, sans-serif" color="#555454">
|
||||||
|
<span style="color:#777">
|
||||||
|
<span style="color:#333"><strong>Nom du client :</strong></span> {firstName} {lastName}<br /><br />
|
||||||
|
<span style="color:#333"><strong>Nom de l'enseigne :</strong></span> {name}<br /><br />
|
||||||
|
<span style="color:#333"><strong>Adresse du siège social :</strong></span> {address}<br /><br />
|
||||||
|
<span style="color:#333"><strong>Ville du siège social :</strong></span> {city}<br /><br />
|
||||||
|
<span style="color:#333"><strong>Code postal du siège social :</strong></span> {code}<br /><br />
|
||||||
|
<span style="color:#333"><strong>SIRET de l'entreprise :</strong></span> {siret}<br /><br />
|
||||||
|
<span style="color:#333"><strong>Adresse e-mail du client : <a href="mailto:{email}" style="color:#337ff1">{email}</a></strong></span><br /><br />
|
||||||
|
<span style="color:#333"><strong>Numéro de telephone du client :</strong></span> {phoneNumber}<br /><br />
|
||||||
|
</span>
|
||||||
|
</font>
|
||||||
|
</td>
|
||||||
|
<td width="10" style="padding:15px 5px"> </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
|
||||||
|
</table>
|
||||||
|
<table class="table" bgcolor="{table-bg-color}" style="width:600px;padding-top:10px" cellspacing="0" cellpadding="0">
|
||||||
|
<tr>
|
||||||
|
<td class="footer">
|
||||||
|
<img src="{footer_img}" alt="{shop_name}">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
<td class="space" style="width:20px;padding:7px 0"> </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</body>
|
||||||
|
</html>
|
23
modules/addcustomer/mails/fr/addcustomer.txt
Normal file
23
modules/addcustomer/mails/fr/addcustomer.txt
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
[{shop_url}]
|
||||||
|
|
||||||
|
Demande d'accès à l'espace professionnel !
|
||||||
|
|
||||||
|
Nom du client : {firstName} {lastName}
|
||||||
|
|
||||||
|
Nom de l'entreprise : {name}
|
||||||
|
|
||||||
|
Adresse du siège social : {address}
|
||||||
|
|
||||||
|
Ville du siège social : {city}
|
||||||
|
|
||||||
|
Code postal du siège social : {code}
|
||||||
|
|
||||||
|
SIRET de l'entreprise : {siret}
|
||||||
|
|
||||||
|
Adresse e-mail du client : {email}
|
||||||
|
|
||||||
|
Numéro de telephone du client : {phoneNumber}
|
||||||
|
|
||||||
|
{shop_name} [{shop_url}] réalisé avec
|
||||||
|
PrestaShop(tm) [http://www.prestashop.com/]
|
||||||
|
|
1
modules/addcustomer/templates/front/form.tpl
Executable file
1
modules/addcustomer/templates/front/form.tpl
Executable file
@ -0,0 +1 @@
|
|||||||
|
<h1>{l s='test' mod='addcustomer'}</h1>
|
35
modules/addcustomer/templates/front/index.php
Normal file
35
modules/addcustomer/templates/front/index.php
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* 2007-2014 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 <contact@prestashop.com>
|
||||||
|
* @copyright 2007-2014 PrestaShop SA
|
||||||
|
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||||
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
|
*/
|
||||||
|
|
||||||
|
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||||
|
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||||
|
|
||||||
|
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||||
|
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||||
|
header("Pragma: no-cache");
|
||||||
|
|
||||||
|
header("Location: ../");
|
||||||
|
exit;
|
35
modules/addcustomer/templates/index.php
Normal file
35
modules/addcustomer/templates/index.php
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* 2007-2014 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 <contact@prestashop.com>
|
||||||
|
* @copyright 2007-2014 PrestaShop SA
|
||||||
|
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||||
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
|
*/
|
||||||
|
|
||||||
|
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||||
|
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||||
|
|
||||||
|
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||||
|
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||||
|
header("Pragma: no-cache");
|
||||||
|
|
||||||
|
header("Location: ../");
|
||||||
|
exit;
|
35
modules/addcustomer/views/index.php
Normal file
35
modules/addcustomer/views/index.php
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* 2007-2014 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 <contact@prestashop.com>
|
||||||
|
* @copyright 2007-2014 PrestaShop SA
|
||||||
|
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||||
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
|
*/
|
||||||
|
|
||||||
|
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||||
|
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||||
|
|
||||||
|
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||||
|
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||||
|
header("Pragma: no-cache");
|
||||||
|
|
||||||
|
header("Location: ../");
|
||||||
|
exit;
|
67
modules/addcustomer/views/templates/front/form.tpl
Normal file
67
modules/addcustomer/views/templates/front/form.tpl
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
<body style="background-color: black;">
|
||||||
|
<header class="page-heading">
|
||||||
|
<div class="ctn">
|
||||||
|
<h1>{l s='Inscription espace professionnel' mod='addcustomer'}</h1>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
<div id="auth" class="ctn">
|
||||||
|
<div class="row">
|
||||||
|
<div class="offset-lg3 lg6 offset-md2 md8 sm12">
|
||||||
|
{if $errors === null || $hasError === true}
|
||||||
|
<form action="{$formLink}" method="post" class="box" id="login_form">
|
||||||
|
<div class="inner">
|
||||||
|
<div class="box-content clearfix">
|
||||||
|
{if $hasError === true}
|
||||||
|
<div class="alert alert-danger displayError" style="margin-bottom: 20px;">{$errors}</div>
|
||||||
|
{/if}
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="lastName">{l s='Nom' mod='addcustomer'} <sup>*</sup></label>
|
||||||
|
<input type="text" required name="lastName" class="account_input form-control" {if (isset($smarty.post.lastName))} value="{$smarty.post.lastName}"{/if}>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="firstName">{l s='Prenom' mod='addcustomer'} <sup>*</sup></label>
|
||||||
|
<input type="text" required name="firstName" class="account_input form-control" {if (isset($smarty.post.firstName))} value="{$smarty.post.firstName}"{/if}>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="phoneNumber">{l s='Numéro de téléphone' mod='addcustomer'} <sup>*</sup></label>
|
||||||
|
<input type="tel" required name="phoneNumber" class="account_input form-control" {if (isset($smarty.post.phoneNumber))} value="{$smarty.post.phoneNumber}"{/if}>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="email">{l s='Adresse e-mail' mod='addcustomer'} <sup>*</sup></label>
|
||||||
|
<input type="email" required name="email" class="account_input form-control" {if (isset($smarty.post.email))} value="{$smarty.post.email}"{/if}>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="name">{l s='Nom de l\'enseigne' mod='addcustomer'} <sup>*</sup></label>
|
||||||
|
<input type="text" required name="name" class="account_input form-control" {if (isset($smarty.post.name))} value="{$smarty.post.name}"{/if}>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="address">{l s='Adresse du siège social' mod='addcustomer'} <sup>*</sup></label>
|
||||||
|
<input type="text" required name="address" class="account_input form-control" {if (isset($smarty.post.address))} value="{$smarty.post.address}"{/if}>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="address">{l s='Ville du siège social' mod='addcustomer'} <sup>*</sup></label>
|
||||||
|
<input type="text" required name="city" class="account_input form-control" {if (isset($smarty.post.city))} value="{$smarty.post.city}"{/if}>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="address">{l s='Code Postal du siège social' mod='addcustomer'} <sup>*</sup></label>
|
||||||
|
<input type="text" required name="code" class="account_input form-control" {if (isset($smarty.post.code))} value="{$smarty.post.code}"{/if}>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="siret">{l s='SIRET de l\'entreprise' mod='addcustomer'} <sup>*</sup></label>
|
||||||
|
<input type="text" required name="siret" class="account_input form-control" {if (isset($smarty.post.siret))} value="{$smarty.post.siret}"{/if}>
|
||||||
|
</div>
|
||||||
|
<button type="submit" id="SubmitLogin" name="SubmitRegister" class="btn btn-full-width no-icon">
|
||||||
|
<span>{l s='envoyer' mod='addcustomer'}</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
{else}
|
||||||
|
<div class="displayError">
|
||||||
|
<p>{l s='Merci un conseiller prendra contact avec vous rapidement' mod='addcustomer'}</p>
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
35
modules/addcustomer/views/templates/front/index.php
Normal file
35
modules/addcustomer/views/templates/front/index.php
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* 2007-2014 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 <contact@prestashop.com>
|
||||||
|
* @copyright 2007-2014 PrestaShop SA
|
||||||
|
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||||
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
|
*/
|
||||||
|
|
||||||
|
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||||
|
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||||
|
|
||||||
|
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||||
|
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||||
|
header("Pragma: no-cache");
|
||||||
|
|
||||||
|
header("Location: ../");
|
||||||
|
exit;
|
12
modules/addcustomer/views/templates/hook/addcustomer.tpl
Executable file
12
modules/addcustomer/views/templates/hook/addcustomer.tpl
Executable file
@ -0,0 +1,12 @@
|
|||||||
|
<div class="lg6 md6 sm12 xs12">
|
||||||
|
<div class="box">
|
||||||
|
<div class="inner">
|
||||||
|
<h2 class="title">{l s='Pas encore inscrit ?' mod='addcustomer'}</h2>
|
||||||
|
{if $register == 'success'}
|
||||||
|
<p class="alert alert-success">{l s='L\'email a bien était envoyé et nous traitons votre demande d\'accès dans les plus bref délais.' mod='addcustomer'}</p>
|
||||||
|
{else}
|
||||||
|
<a style="color: #bfa56d;" class="lost_password" href="{$formLink}">{l s='Demander un accès à l\'espace professionnel' mod='addcustomer'}</a>
|
||||||
|
{/if}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
35
modules/addcustomer/views/templates/hook/index.php
Normal file
35
modules/addcustomer/views/templates/hook/index.php
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* 2007-2014 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 <contact@prestashop.com>
|
||||||
|
* @copyright 2007-2014 PrestaShop SA
|
||||||
|
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||||
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
|
*/
|
||||||
|
|
||||||
|
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||||
|
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||||
|
|
||||||
|
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||||
|
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||||
|
header("Pragma: no-cache");
|
||||||
|
|
||||||
|
header("Location: ../");
|
||||||
|
exit;
|
35
modules/addcustomer/views/templates/index.php
Normal file
35
modules/addcustomer/views/templates/index.php
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* 2007-2014 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 <contact@prestashop.com>
|
||||||
|
* @copyright 2007-2014 PrestaShop SA
|
||||||
|
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||||
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
|
*/
|
||||||
|
|
||||||
|
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||||
|
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||||
|
|
||||||
|
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||||
|
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||||
|
header("Pragma: no-cache");
|
||||||
|
|
||||||
|
header("Location: ../");
|
||||||
|
exit;
|
@ -3,6 +3,7 @@ define('ANTADIS_CHECK_GROUPS', true);
|
|||||||
|
|
||||||
class FrontController extends FrontControllerCore
|
class FrontController extends FrontControllerCore
|
||||||
{
|
{
|
||||||
|
|
||||||
public function display()
|
public function display()
|
||||||
{
|
{
|
||||||
global $cookie;
|
global $cookie;
|
||||||
@ -36,21 +37,25 @@ class FrontController extends FrontControllerCore
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Force assign template
|
// * Force assign template
|
||||||
*/
|
// */
|
||||||
if (!$cookie->isLogged()) {
|
if (!$cookie->isLogged()
|
||||||
|
&& (!Context::getContext()->controller instanceOf addCustomerFormModuleFrontController)
|
||||||
|
) {
|
||||||
$this->template = _PS_THEME_DIR_.'authentication.tpl';
|
$this->template = _PS_THEME_DIR_.'authentication.tpl';
|
||||||
if ($this->php_self == 'password') {
|
if ($this->php_self == 'password') {
|
||||||
$this->php_self = 'index';
|
$this->php_self = 'index';
|
||||||
$this->template = _PS_THEME_DIR_.'password.tpl';
|
$this->template = _PS_THEME_DIR_.'password.tpl';
|
||||||
}
|
}
|
||||||
if (!in_array($this->php_self, ['index', 'password']) || Tools::getValue('submitAccount') || Tools::getValue('SubmitCreate')) {
|
if (!in_array($this->php_self, ['index', 'password'])
|
||||||
|
|| Tools::getValue('submitAccount')
|
||||||
|
|| Tools::getValue('SubmitCreate')) {
|
||||||
Tools::redirect('index');
|
Tools::redirect('index');
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Tools::safePostVars();
|
Tools::safePostVars();
|
||||||
|
|
||||||
// assign css_files and js_files at the very last time
|
// assign css_files and js_files at the very last time
|
||||||
@ -67,7 +72,7 @@ class FrontController extends FrontControllerCore
|
|||||||
/* Override destroy all css */
|
/* Override destroy all css */
|
||||||
$this->css_files = array();
|
$this->css_files = array();
|
||||||
|
|
||||||
/* Override Add real css */
|
// Override Add real css
|
||||||
$this->css_files[_THEME_CSS_DIR_.'strapivarious.css?v='.filemtime($this->getThemeDir().'css/strapivarious.css')] = 'all';
|
$this->css_files[_THEME_CSS_DIR_.'strapivarious.css?v='.filemtime($this->getThemeDir().'css/strapivarious.css')] = 'all';
|
||||||
$this->css_files[_THEME_CSS_DIR_.'k2000.css?v='.filemtime($this->getThemeDir().'css/k2000.css')] = 'all';
|
$this->css_files[_THEME_CSS_DIR_.'k2000.css?v='.filemtime($this->getThemeDir().'css/k2000.css')] = 'all';
|
||||||
$this->css_files[_THEME_CSS_DIR_.'global.css?v='.filemtime($this->getThemeDir().'css/global.css')] = 'all';
|
$this->css_files[_THEME_CSS_DIR_.'global.css?v='.filemtime($this->getThemeDir().'css/global.css')] = 'all';
|
||||||
@ -141,14 +146,15 @@ class FrontController extends FrontControllerCore
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function getLayout()
|
public function getLayout()
|
||||||
{
|
{
|
||||||
global $cookie;
|
global $cookie;
|
||||||
|
|
||||||
|
|
||||||
$entity = $this->php_self;
|
$entity = $this->php_self;
|
||||||
if (!$cookie->isLogged()) {
|
if (!$cookie->isLogged()
|
||||||
|
&& (!Context::getContext()->controller instanceOf addCustomerFormModuleFrontController)
|
||||||
|
) {
|
||||||
if (!in_array($this->php_self, ['index', 'password']) || Tools::getValue('submitAccount') || Tools::getValue('SubmitCreate')) {
|
if (!in_array($this->php_self, ['index', 'password']) || Tools::getValue('submitAccount') || Tools::getValue('SubmitCreate')) {
|
||||||
Tools::redirect('index');
|
Tools::redirect('index');
|
||||||
exit;
|
exit;
|
||||||
|
@ -15,11 +15,12 @@
|
|||||||
<section>
|
<section>
|
||||||
|
|
||||||
{include file="$tpl_dir./page-heading.tpl" title=$smarty.capture.title type=''}
|
{include file="$tpl_dir./page-heading.tpl" title=$smarty.capture.title type=''}
|
||||||
|
<p style="text-align: center;color: #fff;font-size: 16px;">{l s='Tel : 01 80 91 74 21'}</p>
|
||||||
|
|
||||||
<div id="auth" class="ctn">
|
<div id="auth" class="ctn">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<!-- Connexion -->
|
<!-- Connexion -->
|
||||||
<div class="offset-lg3 lg6 offset-md2 md8 sm12">
|
<div class="lg6 md6 sm12 xs12">
|
||||||
<form action="{$link->getPageLink('authentication', true)|escape:'html':'UTF-8'}" method="post" id="login_form" class="box">
|
<form action="{$link->getPageLink('authentication', true)|escape:'html':'UTF-8'}" method="post" id="login_form" class="box">
|
||||||
<div class="inner">
|
<div class="inner">
|
||||||
<h2 class="title">{l s='Already registered?'}</h2>
|
<h2 class="title">{l s='Already registered?'}</h2>
|
||||||
@ -44,6 +45,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
{hook h="DisplayHomeAddCusto"}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{if !isset($content_only) || !$content_only}
|
{if !isset($content_only) || !$content_only}
|
||||||
{if $page_name != 'category' && $page_name != 'index' && $page_name != 'search' && $page_name != 'password'}
|
{if $page_name != 'category' && $page_name != 'index' && $page_name != 'search' && $page_name != 'password' && $page_name != 'module-addcustomer-form'}
|
||||||
<footer id="footer">
|
<footer id="footer">
|
||||||
<div class="ctn">
|
<div class="ctn">
|
||||||
{hook h='displayReassurance'}
|
{hook h='displayReassurance'}
|
||||||
|
@ -50,7 +50,7 @@
|
|||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{$page_array = ['index', 'password']}
|
{$page_array = ['index', 'password', 'module-addcustomer-form']}
|
||||||
|
|
||||||
<header id="header">
|
<header id="header">
|
||||||
<div class="ctn">
|
<div class="ctn">
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.1 KiB |
Binary file not shown.
Before Width: | Height: | Size: 7.5 KiB After Width: | Height: | Size: 7.6 KiB |
Binary file not shown.
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 1.1 KiB |
Loading…
Reference in New Issue
Block a user