Compare commits

...

95 Commits
master ... dev

Author SHA1 Message Date
Michael RICOIS
731db1fe28 Merge branch 'ticket/r13031-colissimo-webservice' into dev 2017-09-27 14:49:36 +02:00
Michael RICOIS
177c3a2397 Fix error 500 2017-09-27 14:49:18 +02:00
Michael RICOIS
db99007cc5 Merge remote-tracking branch 'origin/ticket/r13883-exportnewsletterpro' into dev 2017-09-18 09:50:49 +02:00
Michael RICOIS
6a95ebf079 Fix 2017-09-15 14:39:32 +02:00
Michael RICOIS
c2aa690c7f Merge remote-tracking branch 'origin/ticket/r13883-exportnewsletterpro' into dev 2017-09-14 11:46:59 +02:00
Michael RICOIS
a2a082a8cf Encore un changement de version 2017-09-14 11:45:05 +02:00
Michael RICOIS
5ae19736bc Merge remote-tracking branch 'origin/ticket/r13883-exportnewsletterpro' into dev 2017-09-13 10:09:40 +02:00
Michael RICOIS
a0c25961ff Merge remote-tracking branch 'origin/ticket/r13756-slider' into dev 2017-09-13 10:09:31 +02:00
Michael RICOIS
85afc9e8da Lifetime 2017-09-13 10:09:09 +02:00
Michael RICOIS
07e0e7d18a Changement config des newsletters - again 2017-09-13 10:07:50 +02:00
Michael RICOIS
a5c6db66f8 Replace slider with new slider 2017-09-07 16:02:47 +02:00
Michael RICOIS
59c27258cd Merge remote-tracking branch 'origin/ticket/r13756-slider' into dev 2017-09-07 14:45:03 +02:00
Michael RICOIS
95320c6e84 Remove slider cache 2017-09-07 14:42:36 +02:00
Michael RICOIS
183cc2e57d Merge branch 'ticket/r13756-slider' into dev 2017-09-05 10:01:39 +02:00
Michael RICOIS
4e86171ada Better group selection 2017-09-05 10:00:59 +02:00
Michael RICOIS
aeaf1786fc Merge branch 'ticket/r13883-exportnewsletterpro' into dev 2017-09-04 16:44:57 +02:00
Michael RICOIS
d4e60bacee Template newsletter 2017-09-04 16:44:30 +02:00
Michael RICOIS
42b9247f65 Fix before merge 2017-08-30 10:29:43 +02:00
Michael RICOIS
0d80c44cab Prepare to deploy (hide new slider) 2017-08-30 10:20:20 +02:00
Michael RICOIS
d69f753f9c Merge remote-tracking branch 'origin/ticket/r13883-exportnewsletterpro' into dev 2017-08-30 10:14:59 +02:00
Michael RICOIS
ab3695e7a8 Rename export 2017-08-30 10:14:24 +02:00
Michael RICOIS
747b957f98 Rename submit bouton 2017-08-30 09:34:29 +02:00
Michael RICOIS
f62d1d511f Merge remote-tracking branch 'origin/ticket/r13756-slider' into dev 2017-08-28 16:33:18 +02:00
Michael RICOIS
f4e4dedd86 Specify mod in hookCall 2017-08-28 16:32:54 +02:00
Michael RICOIS
4248ceb595 Default group 2017-08-28 16:32:01 +02:00
Michael RICOIS
e9e2522a9d Revert "Specify mod for hook"
This reverts commit 3fae485c69.
2017-08-28 16:31:13 +02:00
Michael RICOIS
17d47b4257 Revert "Typo"
This reverts commit dac5f94620.
2017-08-28 16:31:10 +02:00
Michael RICOIS
eef9c88cf0 Revert "Default group"
This reverts commit 384015bc6b.
2017-08-28 16:31:07 +02:00
Michael RICOIS
384015bc6b Default group 2017-08-28 16:29:23 +02:00
Michael RICOIS
dac5f94620 Typo 2017-08-28 15:50:33 +02:00
Michael RICOIS
3fae485c69 Specify mod for hook 2017-08-28 15:26:56 +02:00
Michael RICOIS
ba61fd87ab Merge remote-tracking branch 'origin/ticket/r13756-slider' into dev 2017-08-28 14:52:21 +02:00
Michael RICOIS
349b7e7cb7 Delete old slider 2017-08-28 14:51:04 +02:00
Michael RICOIS
ea75b02efa Image name 2017-08-28 14:48:31 +02:00
Michael RICOIS
fcf69fedec Img path and description 2017-08-28 12:32:45 +02:00
Michael RICOIS
8d7ccb4d3f Change cache path and get configuration variable to not use cache 2017-08-28 12:32:07 +02:00
Michael RICOIS
b53ac563ad Slider front image 2017-08-28 11:25:04 +02:00
Michael RICOIS
ad77e3ce49 Drop table 2017-08-28 11:23:02 +02:00
Michael RICOIS
5d7980ca13 Merge remote-tracking branch 'origin/ticket/r13883-exportnewsletterpro' into dev 2017-08-28 10:31:34 +02:00
Michael RICOIS
368d82307c Display slider in front 2017-08-28 10:25:22 +02:00
Michael RICOIS
41f45d1404 AdvSlider avec prise en compte des dates et des groupes utilisateurs 2017-08-25 17:34:59 +02:00
Michael RICOIS
f7857a3f40 SQL param protect type 2017-08-25 10:54:11 +02:00
Michael RICOIS
e54b05cd03 Add module advslider 2017-08-25 10:42:18 +02:00
Michael RICOIS
8c40caedf8 Add newsletter export group pro and theme v5 2017-08-24 17:41:04 +02:00
Srv Privilege de marque
719b0aa743 Merge branch 'master' of gitlab.antadis.net:dev-antadis/privilegedemarque 2017-08-02 10:58:15 +02:00
Srv Privilege de marque
ed3db565e6 fix mailjet sync 2017-08-02 10:57:59 +02:00
Srv Privilege de marque
2df8a54ba9 update memory limit 2017-08-02 10:57:47 +02:00
Michael RICOIS
d933061f6a Merge remote-tracking branch 'origin/ticket/r13721-mobile-inscription' into dev 2017-07-27 16:24:55 +02:00
Michael RICOIS
b24091f295 Merge remote-tracking branch 'origin/ticket/r13721-mobile-inscription' 2017-07-27 16:22:06 +02:00
Michael RICOIS
ddbbaa9669 Remove debug 2017-07-27 16:20:59 +02:00
Michael RICOIS
fa6bcaf660 Fix Mobile Detect 2017-07-27 16:15:46 +02:00
Michael RICOIS
cbbd5de2f6 Detect provenance campagne email
Si mobile et user notLogged reidirige vers la page inscription
2017-07-27 15:49:14 +02:00
Michael RICOIS
bb97c4685f Nettoyage 2017-07-27 15:48:11 +02:00
Michael
1a3d4e4316 Merge branch 'ticket/r13612-logo-cadre' into 'master'
Fix affichage du div lorsque pas de logo

See merge request !2
2017-07-27 11:27:08 +02:00
Michael RICOIS
35f256077d Merge remote-tracking branch 'origin/ticket/r13721-mobile-inscription' into dev 2017-07-26 16:56:03 +02:00
Michael RICOIS
0d662aa3c3 Redirection vers page ventes-privees?create_account=1 2017-07-26 16:52:42 +02:00
Michael RICOIS
b15c7265df CS 2017-07-26 12:57:53 +02:00
Michael RICOIS
311d8c8fd2 Merge remote-tracking branch 'origin/ticket/r13612-logo-cadre' into dev 2017-07-26 11:17:39 +02:00
Michael RICOIS
c677052972 Fix affichage du div lorsque pas de logo sur la catégorie de la vente
privée
2017-07-26 11:15:34 +02:00
Srv Privilege de marque
c90afca56b traduction 2017-07-03 15:11:21 +02:00
Srv Privilege de marque
c63ff9c529 remove text 2017-07-03 15:11:06 +02:00
Rodney Figaro
effb14e2a2 Merge branch 'ticket/r13453-export-bdc' into dev 2017-06-12 17:35:09 +02:00
Rodney Figaro
c4b362149f Merge branch 'ticket/r13444-new-columns-BO-products-fix' into dev 2017-06-12 11:54:53 +02:00
Rodney Figaro
1a57051b50 Merge branch 'ticket/r13444-new-columns-BO-products-fix' into dev 2017-06-12 11:43:21 +02:00
Rodney Figaro
978fd17d31 Merge branch 'ticket/r13031-socolissimo' into dev 2017-06-12 11:39:37 +02:00
Rodney Figaro
92765e56fe Merge branch 'master' into dev 2017-06-12 11:39:15 +02:00
Rodney Figaro
b67527da24 Merge branch 'ticket/r13444-new-columns-BO-products' into dev 2017-06-12 11:06:09 +02:00
Srv Privilege de marque
ee81a9327c 13031 - remove module chronopost 2017-06-12 09:20:27 +02:00
Srv Privilege de marque
37489f6426 13031 - adapt socolissmo fancy tpl js 2017-06-09 18:07:30 +02:00
Rodney Figaro
30deec0f7f 13031 - add socolissimo 2017-06-09 11:35:43 +02:00
Rodney Figaro
7bf2c05735 Merge branch 'ticket/r13443-carrier-title-mobile' into dev 2017-06-08 18:31:04 +02:00
Rodney Figaro
42b6e2a4ca Merge branch 'ticket/r13443-carrier-title-mobile' into dev 2017-06-08 18:22:53 +02:00
Rodney Figaro
2b9e60250b Merge branch 'ticket/r13449-bug-slider' into dev 2017-06-08 17:07:23 +02:00
Rodney Figaro
16caaa2065 Merge branch 'ticket/r13449-bug-slider' into dev 2017-06-08 15:59:57 +02:00
Rodney Figaro
877b7f269e Merge branch 'ticket/r13441-remove-continue-delivery' into dev 2017-06-07 17:25:18 +02:00
Rodney Figaro
86f3a469eb Merge branch 'master' into dev 2017-06-07 16:26:54 +02:00
Rodney Figaro
998b7e0c86 Merge branch 'master' into dev 2017-06-02 17:30:08 +02:00
Rodney Figaro
55b49e087c Merge branch 'ticket/r12613-optimisation-perfs' into dev 2017-05-31 11:14:58 +02:00
Rodney Figaro
b0e4e396e0 Merge branch 'ticket/r13330-2-default-group-importcsv' into dev 2017-05-30 17:03:42 +02:00
Rodney Figaro
a013c267d7 Merge branch 'ticket/r12613-optimisation-perfs' into dev 2017-05-30 15:54:14 +02:00
Rodney Figaro
46462883bb Merge branch 'fix_banner_sales' into dev 2017-05-29 17:38:07 +02:00
Rodney Figaro
d721f5dd43 Merge branch 'ticket/r13365-bug-prix-popup' into dev 2017-05-29 17:30:00 +02:00
Rodney Figaro
47406663d9 Merge branch 'ticket/r13365-bug-prix-popup' into dev 2017-05-29 17:22:59 +02:00
Rodney Figaro
41b76f783e Merge branch 'hot_fix_admin_category' into dev 2017-05-26 12:20:59 +02:00
Rodney Figaro
45a35aef5c Merge branch 'ticket/r13344-trackin-lien-desabo-newsletter' into dev 2017-05-23 18:35:08 +02:00
Rodney Figaro
095a2fece2 Merge branch 'ticket/r13341-remove-button-in-lostpassword' into dev 2017-05-23 18:26:03 +02:00
Rodney Figaro
0bf9da7b1c Merge branch 'ticket/r13330-sale-default-groups' into dev 2017-05-23 18:12:53 +02:00
Rodney Figaro
ddde3b5dfd Merge branch 'hotfix_paypal_tls' into dev 2017-05-19 14:53:12 +02:00
Rodney Figaro
0bfc480eba Merge branch 'ticket/r12317-slider-dates' into dev 2017-05-18 16:50:56 +02:00
Rodney Figaro
bb0269dae1 Merge branch 'ticket/r12317-slider-dates' into dev 2017-05-18 16:37:10 +02:00
Rodney Figaro
39b4bb121e Merge branch 'ticket/r12317-slider-dates' into dev 2017-05-18 16:33:21 +02:00
Rodney Figaro
46abff675b Merge branch 'fix_mailjet_delete' into dev 2017-05-17 15:47:14 +02:00
Rodney Figaro
8226458cd0 Merge branch 'fix_blocked' into dev 2017-05-17 12:49:35 +02:00
Rodney Figaro
d6c4cafc5d Merge branch 'fix_blocked' into dev 2017-05-17 12:41:12 +02:00
Rodney Figaro
04cb5b7f1b Merge branch 'ticket/r13244-cron-mailjet-cleanup' into dev 2017-05-17 12:01:47 +02:00
79 changed files with 7319 additions and 323 deletions

View File

@ -0,0 +1,177 @@
<?php
if (!defined('_CAN_LOAD_FILES_'))
exit;
include_once(dirname(__FILE__) . '/classes/AdvSlide.php');
class AdvSlider extends Module
{
public function __construct()
{
$this->name = 'advslider';
$this->tab = 'front_office_features';
$this->version = '1.0';
$this->author = 'Antadis';
$this->need_instance = 0;
$this->bootstrap = true;
parent::__construct();
$this->displayName = $this->l('Slider avancé');
$this->description = $this->l('Gestion du slider avec spécificités PrivilegeDeMarque');
}
public function install()
{
$sql = array();
$sql[] =
'CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'advslider` (
`id_slide` int(10) unsigned NOT NULL auto_increment,
`position` INT(11) UNSIGNED NOT NULL default 0,
`active` INT(11) UNSIGNED NOT NULL default 1,
`light` INT(11) UNSIGNED NOT NULL default 1,
PRIMARY KEY (`id_slide`)
) ENGINE=' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET=utf8';
$sql[] =
'CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'advslider_lang` (
`id_slide` int(10) unsigned NOT NULL,
`id_lang` int(10) unsigned NOT NULL,
`title` varchar(255) NOT NULL,
`subtitle` varchar(255) NOT NULL,
`label` varchar(255) NOT NULL,
`url` varchar(255),
`description` TEXT,
PRIMARY KEY (`id_slide`,`id_lang`)
) ENGINE=' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET=utf8';
$sql[] =
'CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'advslider_shop` (
`id_slide` int(10) unsigned NOT NULL auto_increment,
`id_shop` int(10) unsigned NOT NULL,
PRIMARY KEY (`id_slide`, `id_shop`)
) ENGINE=' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET=utf8';
$sql[] = 'CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'advslider_group` (
`id_slide` int(11) NOT NULL,
`id_group` int(11) NOT NULL
) ENGINE=' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET=utf8';
$sql[] = "ALTER TABLE `ps_advslider` ADD `start_at` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00' AFTER `light`,
ADD `end_at` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00' AFTER `start_at`;";
foreach ($sql as $_sql) {
Db::getInstance()->Execute($_sql);
}
$tab = new Tab();
$tab->class_name = 'AdminAdvSlider';
$tab->id_parent = Tab::getCurrentParentId();
$tab->module = $this->name;
$languages = Language::getLanguages();
foreach ($languages as $language) {
$tab->name[$language['id_lang']] = 'Slider';
}
$img_dir = _PS_IMG_DIR_ . 'slider';
$folder = is_dir($img_dir);
if (!$folder) {
$folder = mkdir($img_dir, 0755, true);
}
return parent::install()
&& $tab->add()
&& $this->registerHook('displaySlider')
&& $this->registerHook('displayHeader')
&& $this->registerHook('actionRefreshSlider')
&& $folder;
}
public function uninstall()
{
$sql = 'DROP TABLE IF EXISTS
`' . _DB_PREFIX_ . 'advslider_lang`,
`' . _DB_PREFIX_ . 'advslider_shop`,
`' . _DB_PREFIX_ . 'advslider`,
`' . _DB_PREFIX_ . 'advslider_group`
';
Db::getInstance()->Execute($sql);
$idTab = Tab::getIdFromClassName('AdminAdvSlider');
if ($idTab) {
$tab = new Tab($idTab);
$tab->delete();
}
return parent::uninstall();
}
public function getHookController($hook_name)
{
// Include the controller file
require_once(dirname(__FILE__).'/controllers/hook/'. $hook_name.'.php');
// Build dynamically the controller name
$controller_name = $this->name.$hook_name.'Controller';
// Instantiate controller
$controller = new $controller_name($this, __FILE__, $this->_path);
// Return the controller
return $controller;
}
public function getContent()
{
$ajax_hook = Tools::getValue('ajax_hook');
if ($ajax_hook != '') {
$ajax_method = 'hook'.ucfirst($ajax_hook);
if (method_exists($this, $ajax_method)) {
die($this->{$ajax_method}(array()));
}
}
$controller = $this->getHookController('getContent');
return $controller->run();
}
public function hookDisplaySlider($params)
{
$cacheEnabled = false;
if (!$cacheEnabled || !$this->isCached('advslider.tpl', $this->getCacheId())) {
$slides = AdvSlide::getSlides();
if (!$slides) {
return false;
}
$this->smarty->assign('slides', $slides);
return $this->display(__FILE__, 'advslider.tpl');
}
return $this->display(__FILE__, 'advslider.tpl', $this->getCacheId());
}
public function hookHeader($params)
{
$jsFiles = $this->context->controller->js_files;
foreach($jsFiles as $jsFile) {
if(strpos($jsFile, 'flexslider') !== false) {
return false;
}
}
$this->context->controller->addJS($this->_path.'js/flexslider.js');
}
public function hookActionRefreshSlider()
{
$this->_clearCache('advslider');
}
}

View File

@ -0,0 +1,253 @@
<?php
class AdvSlide extends ObjectModel
{
public $id_slide;
public $position;
public $active;
public $title;
public $subtitle;
public $label;
public $url;
public $description;
public $light;
public $start_at;
public $end_at;
public static $definition = array(
'table' => 'advslider',
'primary' => 'id_slide',
'multilang' => TRUE,
'fields' => array(
'id_slide' => array('type' => self::TYPE_INT, 'validate' => 'isInt'),
'position' => array('type' => self::TYPE_INT, 'validate' => 'isInt'),
'active' => array('type' => self::TYPE_INT, 'validate' => 'isInt'),
'light' => array('type' => self::TYPE_INT, 'validate' => 'isInt'),
'start_at' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'),
'end_at' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'),
// Lang fields
'title' => array('type' => self::TYPE_STRING, 'lang' => TRUE, 'validate' => 'isGenericName', 'size' => 255),
'subtitle' => array('type' => self::TYPE_HTML, 'lang' => TRUE, 'validate' => 'isCleanHtml', 'size' => 255),
'label' => array('type' => self::TYPE_STRING, 'lang' => TRUE, 'validate' => 'isGenericName', 'size' => 255),
'url' => array('type' => self::TYPE_STRING, 'lang' => TRUE, 'validate' => 'isUrl', 'size' => 255),
'description' => array('type' => self::TYPE_STRING, 'lang' => TRUE, 'validate' => 'isCleanHtml')
),
'associations' => array(
'groups' => array('type' => self::HAS_MANY, 'field' => 'id_group', 'object' => 'Group', 'association' => 'advslider_group'),
),
);
public function __construct($id = NULL, $id_lang = NULL, $id_shop = NULL)
{
parent::__construct($id, $id_lang, $id_shop);
$this->image_dir = _PS_IMG_DIR_ . 'slider/';
if (!file_exists(_PS_TMP_IMG_DIR_)) {
mkdir(_PS_TMP_IMG_DIR_, 755);
}
}
public function add($null_values = false, $autodate = true)
{
$result = parent::add($null_values, $autodate);
Hook::exec('actionRefreshSlider');
return $result;
}
public function update($null_values = FALSE)
{
$result = parent::update($null_values);
Hook::exec('actionRefreshSlider');
return $result;
}
public function updateGroups($data)
{
$dataToInsert = array();
if (count($data) > 0) {
// Reset
Db::getInstance()->delete('advslider_group', 'id_slide='.(int)$this->id);
// Prepare update
foreach($data as $k => $v) {
$dataToInsert[] = array(
'id_slide' => $this->id,
'id_group' => $v,
);
}
}
if (count($dataToInsert) > 0) {
Db::getInstance()->insert('advslider_group', $dataToInsert);
}
}
public function delete($null_values = FALSE)
{
$result = parent::delete($null_values);
Hook::exec('actionRefreshSlider');
return $result;
}
public static function getSlides()
{
$context = Context::getContext();
$sql = 'SELECT * FROM `'._DB_PREFIX_.'advslider` adv
JOIN `'._DB_PREFIX_.'advslider_lang` advl ON (adv.`id_slide` = advl.`id_slide` AND id_lang='. (int)$context->language->id .')
WHERE adv.`active` = 1';
// Check user group
if (Configuration::get('ADVSLIDER_RESTRICT_GROUP')) {
$groups = Customer::getGroupsStatic($context->customer->id);
if ($context->customer->logged == 0) {
$groups = array(Configuration::get('ADVSLIDER_DEFAULT_GROUP'));
}
$sql.= ' AND adv.`id_slide` IN (SELECT `id_slide` FROM `'._DB_PREFIX_.'advslider_group` ag WHERE ag.id_group IN('.join(',', $groups).'))';
}
// Check date
if (Configuration::get('ADVSLIDER_RESTRICT_DATE')) {
$sql.= ' AND adv.`start_at` < NOW() AND adv.`end_at` > NOW() ';
}
$sql.= ' ORDER BY `position` ASC';
$slides = Db::getInstance()->executeS($sql);
// Remove slider without image
if (count($slides) > 0) {
foreach($slides as $key => $slide) {
if(!file_exists(_PS_IMG_DIR_ . 'slider/' . $slide['id_slide'] . '.jpg')) {
unset($slides[$key]);
}
}
}
return $slides;
}
public static function getGroupsFormatted($id_slide)
{
$groups = array();
$result = Db::getInstance()->executeS('SELECT `id_group` FROM `'._DB_PREFIX_.'advslider_group` WHERE `id_slide`=');
if (count($result) > 0) {
foreach($result as $r) {
$groups[] = $r['id_group'];
}
}
return $groups;
}
public function getGroups()
{
$groups = Db::getInstance()->executeS('SELECT `id_group` FROM `'._DB_PREFIX_.'advslider_group` WHERE `id_slide`='.(int)$this->id);
return $groups;
}
public function deleteImage($force_delete = false)
{
if (!$this->id) {
return false;
}
$imgToDelete = Tools::getValue('imgName', false);
if ($imgToDelete === false) {
return parent::deleteImage($force_delete = false);
}
if ($force_delete || !$this->hasMultishopEntries()) {
/* Deleting object images and thumbnails (cache) */
if ($this->image_dir) {
if (file_exists($this->image_dir.$this->id.'-'.$imgToDelete.'.'.$this->image_format)
&& !unlink($this->image_dir.$this->id.'-'.$imgToDelete.'.'.$this->image_format)) {
return false;
}
}
if (file_exists(_PS_TMP_IMG_DIR_.$this->def['table'].'_'.$this->id.'-'.$imgToDelete.'.'.$this->image_format)
&& !unlink(_PS_TMP_IMG_DIR_.$this->def['table'].'_'.$this->id.'-'.$imgToDelete.'.'.$this->image_format)) {
return false;
}
if (file_exists(_PS_TMP_IMG_DIR_.$this->def['table'].'_mini_'.$this->id.'-'.$imgToDelete.'.'.$this->image_format)
&& !unlink(_PS_TMP_IMG_DIR_.$this->def['table'].'_mini_'.$this->id.'-'.$imgToDelete.'.'.$this->image_format)) {
return false;
}
}
return true;
}
public function cleanPositions()
{
return Db::getInstance()->execute('UPDATE `'._DB_PREFIX_.'advslider`
SET `position`= `position` - 1
WHERE `id_slide` = '.(int)$this->id_slide.'
AND `position` > '.(int)$this->position);
}
public function updatePosition($way, $position)
{
$sql = 'SELECT `position`, `id_slide`
FROM `'._DB_PREFIX_.'advslider`
ORDER BY `position` ASC';
if (!$res = Db::getInstance()->executeS($sql))
return false;
foreach ($res as $row)
if ((int)$row['id_slide'] == (int)$this->id_slide)
$moved_row = $row;
if (!isset($moved_row) || !isset($position))
return false;
// < and > statements rather than BETWEEN operator
// since BETWEEN is treated differently according to databases
$res = Db::getInstance()->execute('
UPDATE `'._DB_PREFIX_.'advslider`
SET `position`= `position` '.($way ? '- 1' : '+ 1').'
WHERE `position`
'.($way
? '> '.(int)$moved_row['position'].' AND `position` <= '.(int)$position
: '< '.(int)$moved_row['position'].' AND `position` >= '.(int)$position)
)
&& Db::getInstance()->execute('
UPDATE `'._DB_PREFIX_.'advslider`
SET `position` = '.(int)$position.'
WHERE `id_slide`='.(int)$moved_row['id_slide']
);
$this->refreshPositions();
Hook::exec('actionRefreshSlider');
return $res;
}
public function refreshPositions()
{
$sql = 'SELECT `id_slide`
FROM `'._DB_PREFIX_.'advslider`
ORDER BY `position` ASC';
if (!$blocks = Db::getInstance()->executeS($sql))
return false;
$pos=0;
foreach ($blocks as $block) {
Db::getInstance()->execute('
UPDATE `'._DB_PREFIX_.'advslider`
SET `position` = '.(int)$pos.'
WHERE `id_slide`='.(int)$block['id_slide']);
$pos++;
}
}
}

View File

@ -0,0 +1,395 @@
<?php
include_once dirname(__FILE__).'/../../classes/AdvSlide.php';
class AdminAdvSliderController extends ModuleAdminController
{
public function __construct()
{
$this->table = 'advslider';
$this->className = 'AdvSlide';
$this->identifier = 'id_slide';
$this->lang = true;
$this->deleted = false;
$this->bootstrap = true;
$this->fieldImageSettings = array(
'name' => 'image',
'dir' => 'slider'
);
$this->position_identifier = 'id_slide';
$this->_defaultOrderBy = 'position';
parent::__construct();
$this->actions = array('edit', 'delete');
$this->fields_list = array(
'id_slide' => array(
'title' => 'ID',
'width' => 25
),
'image_desktop' => array(
'title' => $this->module->l('Image'),
'image' => $this->fieldImageSettings['dir'],
'width' => 75
),
'title' => array(
'title' => $this->module->l('Titre'),
),
'active' => array(
'title' => $this->module->l('Actif'),
'type' => 'bool',
),
'start_at' => array(
'title' => $this->module->l('Début'),
),
'end_at' => array(
'title' => $this->module->l('Fin'),
),
'url' => array(
'title' => $this->module->l('Url'),
'width' => 45,
),
'position' => array(
'title' => $this->l('Position'),
'align' => 'center',
'position' => 'position',
'filter_key' => 'a!position'
),
);
if (Shop::isFeatureActive() && Shop::getContext() != Shop::CONTEXT_ALL){
$this->_join .= 'JOIN `'._DB_PREFIX_.'advslider_shop` as ashop ON a.`id_slide` = ashop.`id_slide` AND ashop.`id_shop` IN ('.implode(', ', Shop::getContextListShopID()).') ';
$this->_group .= 'GROUP BY ashop.`id_slide`';
}
}
public function initPageHeaderToolbar()
{
parent::initPageHeaderToolbar();
if ($this->display != 'edit' && $this->display != 'add') {
$this->page_header_toolbar_btn['new_link'] = array(
'href' => self::$currentIndex.'&id_parent='.(int)Tools::getValue('id_slide').'&addadvslider&token='.$this->token,
'desc' => $this->l('Ajouter une nouvelle slide', NULL, NULL, FALSE),
'icon' => 'process-icon-new'
);
}
}
public function renderView()
{
return $this->renderList();
}
public function renderForm()
{
$this->fields_form = array(
'tinymce' => TRUE,
'legend' => array(
'title' => $this->className,
),
'submit' => array(
'name' => 'submitAdvSlider',
'title' => $this->l('Save'),
),
'input' => array(
array(
'type' => 'text',
'label' => $this->l('Titre'),
'name' => 'title',
'lang' => TRUE,
),
array(
'type' => 'text',
'label' => $this->l('Sous-titre'),
'name' => 'subtitle',
'lang' => TRUE,
),
array(
'type' => 'switch',
'label' => $this->l('Activé'),
'name' => 'active',
'required' => FALSE,
'is_bool' => TRUE,
'default' => 1,
'values' => array(
array(
'id' => 'active_on',
'value' => 1,
'label' => $this->l('Enabled')
),
array(
'id' => 'active_off',
'value' => 0,
'label' => $this->l('Disabled')
)
),
),
array(
'type' => 'datetime',
'label' => $this->l('Date de début'),
'name' => 'start_at',
'lang' => false,
),
array(
'type' => 'datetime',
'label' => $this->l('Date de fin'),
'name' => 'end_at',
'lang' => false,
),
array(
'type' => 'checkbox',
'label' => $this->l('Groupe(s) d\'utilisateur'),
'name' => 'groups',
'values' => array(
'query' => array(
array('id_group' => 3, 'name' => 'Particulier'),
array('id_group' => 4, 'name' => 'Pro'),
),
'id' => 'id_group',
'name' => 'name',
),
'expand' => array(
'default' => 'show',
'show' => array('text' => $this->l('show'), 'icon' => 'plus-sign-alt'),
'hide' => array('text' => $this->l('hide'), 'icon' => 'minus-sign-alt')
),
),
array(
'type' => 'switch',
'label' => $this->l('Texte foncé ?'),
'name' => 'light',
'required' => FALSE,
'is_bool' => TRUE,
'default' => 1,
'values' => array(
array(
'id' => 'light_on',
'value' => 1,
'label' => $this->l('Enabled')
),
array(
'id' => 'light_off',
'value' => 0,
'label' => $this->l('Disabled')
)
),
),
array(
'type' => 'text',
'label' => $this->l('Label lien'),
'name' => 'label',
'lang' => TRUE
),
array(
'type' => 'text',
'label' => $this->l('Lien'),
'name' => 'url',
'lang' => TRUE
),
array(
'type' => 'textarea',
'label' => $this->l('Description'),
'name' => 'description',
'autoload_rte' => TRUE,
'lang' => TRUE
),
array(
'type' => 'shop',
'label' => $this->l('Shop'),
'form_group_class' => 'fieldhide input_association',
'name' => 'checkBoxShopAsso_advslider'
)
)
);
$obj = $this->loadObject(true);
$selectedGroups = array();
$image = false;
$image_url = '';
$image_size = '';
$image_mobile = false;
$image_url_mobile = '';
$image_size_mobile = '';
if($obj) {
// Groupes
$selectedGroups = $obj->getGroups();
if (count($selectedGroups) > 0) {
foreach ($selectedGroups as $id) {
$this->fields_value['groups_'.$id['id_group']] = 'on';
}
}
// Images
$image = _PS_IMG_DIR_ . 'slider/' . $obj->id.'.jpg';
$image_url = ImageManager::thumbnail($image, $this->table.'_'.(int)$obj->id.'.'.$this->imageType, 350, $this->imageType, true, true);
$image_size = file_exists($image) ? filesize($image) / 1000 : false;
$image_mobile = _PS_IMG_DIR_ . 'slider/' . $obj->id.'-mobile.jpg';
$image_url_mobile = ImageManager::thumbnail($image_mobile, $this->table.'_'.(int)$obj->id.'-image_mobile.'.$this->imageType, 350, $this->imageType, true, true);
$image_size_mobile = file_exists($image_mobile) ? filesize($image_mobile) / 1000 : false;
}
$this->fields_form['input'][] = array(
'type' => 'file',
'label' => $this->l('Image'),
'desc' => $this->l('Image - type: jpg,png - size: 940 x 300 px'),
'name' => 'image',
'display_image' => true,
'lang' => true,
'required' => true,
'image' => $image_url,
'size' => $image_size,
'delete_url' => self::$currentIndex.'&'.$this->identifier.'='.$this->object->id.'&token='.$this->token.'&deleteImage=1'
);
$this->fields_form['input'][] = array(
'type' => 'file',
'label' => $this->l('Image Mobile'),
'desc' => $this->l('Image - type: jpg,png - size: 300 x 200 px'),
'name' => 'image_mobile',
'display_image' => true,
'lang' => true,
'required' => true,
'image' => $image_url_mobile,
'size' => $image_size_mobile,
'delete_url' => self::$currentIndex.'&'.$this->identifier.'='.$this->object->id.'&token='.$this->token.'&deleteImage=1&imgName=image_mobile'
);
return parent::renderForm();
}
protected function copyFromPost(&$object, $table)
{
parent::copyFromPost($object, $table);
if(Shop::isFeatureActive()) {
$object->id_shop_list = array();
foreach (Tools::getValue('checkBoxShopAsso_advslider') as $id_shop => $value) {
$object->id_shop_list[] = $id_shop;
}
}
}
public function postProcess()
{
if (Tools::getValue('deleteImage')) {
$this->processForceDeleteImage();
$this->refreshPreview();
}
parent::postProcess();
$obj = $this->loadObject(TRUE);
// Groupes
$groupsData = array();
foreach ($_POST as $pKey => $pValue) {
$groupKey = 'groups_';
if (substr($pKey, 0, strlen($groupKey)) == $groupKey && $pValue == 'on') {
$groupsData[] = substr($pKey, strlen($groupKey));
}
}
if (count($groupsData) > 0) {
$obj->updateGroups($groupsData);
}
// Images
$images = array(
'image_mobile' => 'mobile',
);
foreach($images as $imageName => $suffix) {
if(isset($_FILES[$imageName]) && !empty($_FILES[$imageName]['tmp_name'])) {
$fileTemp = $_FILES[$imageName]['tmp_name'];
$fileParts = pathinfo($_FILES[$imageName]['name']);
$extension = $fileParts['extension'];
if(file_exists(_PS_IMG_DIR_.'slider/'.$obj->id.'-'.$suffix.'.'.$extension)) {
unlink(_PS_IMG_DIR_.'slider/'.$obj->id.'-'.$suffix.'.'.$extension);
}
if(in_array($extension, array('jpg', 'png'))) {
$res = move_uploaded_file($fileTemp, _PS_IMG_DIR_.'slider/'.$obj->id.'-'.$suffix.'.'.$extension);
if(!$res) {
$this->errors[] = sprintf(Tools::displayError('An error occured during upload of file %s'), $obj->id.'.'.$extension);
}
else {
if($extension == 'png') {
ImageManager::resize(_PS_IMG_DIR_.'slider/'.$obj->id.'-'.$suffix.'.'.$extension, _PS_IMG_DIR_.'slider/'.$obj->id.'-'.$suffix.'.jpg');
}
$this->confirmations[] = sprintf($this->l('File %s has been uploaded'), $obj->id.'.'.$extension);
}
}
else {
$this->errors[] = sprintf(Tools::displayError('File %s have not good extension, only .jpg or .png'), $obj->id.'.'.$extension);
}
}
}
}
public function processForceDeleteImage()
{
$link = $this->loadObject(true);
if (Validate::isLoadedObject($link)) {
$link->deleteImage(true);
}
}
protected function postImage($id)
{
$ret = parent::postImage($id);
$this->refreshPreview();
if (isset($_FILES) && count($_FILES) && $_FILES['image']['name'] != NULL && !empty($this->object->id) ) {
return TRUE;
}
return TRUE;
}
public function refreshPreview()
{
$current_preview = _PS_TMP_IMG_DIR_.'advslider_mini_'.$this->object->id_slide.'_'.$this->context->shop->id.'.jpg';
if (file_exists($current_preview)) {
unlink($current_preview);
}
}
public function ajaxProcessUpdatePositions()
{
$way = (int)(Tools::getValue('way'));
$id = (int)(Tools::getValue('id'));
$positions = Tools::getValue('slide');
$obj = 'advslider';
if (is_array($positions)) {
foreach ($positions as $position => $value) {
$pos = explode('_', $value);
if (isset($pos[2]) && (int)$pos[2] === $id) {
$menu_obj = new AdvSlide((int)$pos[2]);
if (Validate::isLoadedObject($menu_obj)) {
if (isset($position) && $menu_obj->updatePosition($way, $position)) {
echo 'ok position '.(int)$position.' for '.$obj.' '.(int)$pos[2]."\r\n";
}
else {
echo '{"hasError" : true, "errors" : "Can not update '.$obj.' '.(int)$id.' to position '.(int)$position.' "}';
}
}
else {
echo '{"hasError" : true, "errors" : "This '.$obj.' ('.(int)$id.') cannot be loaded"}';
}
break;
}
}
}
}
}

View File

@ -0,0 +1,126 @@
<?php
class AdvSliderGetContentController
{
public function __construct($module, $file, $path)
{
$this->file = $file;
$this->module = $module;
$this->context = Context::getContext();
$this->_path = $path;
}
public function processConfiguration()
{
if (Tools::isSubmit('submitAdvsliderconfig')) {
$enable_date = Tools::getValue('enable_date');
$enable_groups = Tools::getValue('enable_groups');
$default_group = Tools::getValue('default_group');
Configuration::updateValue('ADVSLIDER_RESTRICT_DATE', $enable_date);
Configuration::updateValue('ADVSLIDER_RESTRICT_GROUP', $enable_groups);
Configuration::updateValue('ADVSLIDER_DEFAULT_GROUP', $default_group);
$this->context->smarty->assign('confirmation', 'ok');
}
}
public function renderForm()
{
$groups = Group::getGroups($this->context->language->id);
$optionGroups = array();
if (count($groups) > 0) {
foreach ($groups as $group) {
if (in_array($group['id_group'], array(1,2))) {
continue;
}
$optionGroups[] = array(
'id_group' => $group['id_group'],
'name' => $group['name'],
);
}
}
$fields_form = array(
'form' => array(
'legend' => array(
'title' => $this->module->l('AdvSlider configuration'),
'icon' => 'icon-envelope'
),
'input' => array(
array(
'type' => 'switch',
'label' => $this->module->l('Enable Date restriction:'),
'name' => 'enable_date',
'desc' => $this->module->l('Enable restriction by date.'),
'values' => array(
array('id' => 'enable_date_1', 'value' => 1, 'label' => $this->module->l('Enabled')),
array('id' => 'enable_date_0', 'value' => 0, 'label' => $this->module->l('Disabled'))
),
),
array(
'type' => 'switch',
'label' => $this->module->l('Enable Groups Restriction:'),
'name' => 'enable_groups',
'desc' => $this->module->l('Enable restriction by user groups.'),
'values' => array(
array('id' => 'enable_groups_1', 'value' => 1, 'label' => $this->module->l('Enabled')),
array('id' => 'enable_groups_0', 'value' => 0, 'label' => $this->module->l('Disabled'))
),
),
array(
'type' => 'checkbox',
'label' => $this->module->l('User group to display for restriction'),
'name' => 'groups',
'values' => array(
'query' => $optionGroups,
'id' => 'id_group',
'name' => 'name',
),
'expand' => array(
'default' => 'show',
'show' => array('text' => $this->module->l('show'), 'icon' => 'plus-sign-alt'),
'hide' => array('text' => $this->module->l('hide'), 'icon' => 'minus-sign-alt')
),
),
array(
'type' => 'select',
'label' => $this->module->l('Default group to display:'),
'name' => 'default_group',
'desc' => $this->module->l('Set a Default group to display slider with unauthenticated user.'),
'options' => array(
'query' => $optionGroups,
'id' => 'id_group',
'name' => 'name',
),
),
),
'submit' => array('title' => $this->module->l('Save')),
)
);
$helper = new HelperForm();
$helper->table = 'advslider';
$helper->default_form_language = (int)Configuration::get('PS_LANG_DEFAULT');
$helper->allow_employee_form_lang = (int)Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG');
$helper->submit_action = 'submitAdvsliderconfig';
$helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false).'&configure='.$this->module->name.'&tab_module='.$this->module->tab.'&module_name='.$this->module->name;
$helper->token = Tools::getAdminTokenLite('AdminModules');
$helper->tpl_vars = array(
'fields_value' => array(
'enable_date' => Tools::getValue('enable_date', Configuration::get('ADVSLIDER_RESTRICT_DATE')),
'enable_groups' => Tools::getValue('enable_groups', Configuration::get('ADVSLIDER_RESTRICT_GROUP')),
'default_group' => Tools::getValue('default_group', Configuration::get('ADVSLIDER_DEFAULT_GROUP')),
),
'languages' => $this->context->controller->getLanguages()
);
return $helper->generateForm(array($fields_form));
}
public function run()
{
$this->processConfiguration();
$html_confirmation_message = $this->module->display($this->file, 'getContent.tpl');
$html_form = $this->renderForm();
return $html_confirmation_message.$html_form;
}
}

View 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;

File diff suppressed because one or more lines are too long

BIN
modules/advslider/logo.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
modules/advslider/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

View File

@ -0,0 +1,69 @@
{if strpos($name, 'multilang') === false}
{include file='helpers/uploader/simple.tpl'}
{else}
{assign var=languages value=Language::getLanguages(false)}
{if !isset($defaultFormLanguage)}
{assign var=defaultFormLanguage value=$languages[0].id_lang}
{/if}
<div class="row">
{foreach from=$languages item=language}
{if $languages|count > 1}
<div class="translatable-field lang-{$language.id_lang}" {if $language.id_lang != $defaultFormLanguage}style="display:none"{/if}>
{/if}
<div class="col-lg-6">
{foreach $files as $file}
{if isset($file.image) && $file.type == 'image'}
<div>
{if !empty($file.image[$language['id_lang']])}
{if Validate::isUrl($file.image[$language['id_lang']])}<img src="{$file.image[$language['id_lang']]}" class="img-thumbnail" />{else}{$file.image[$language['id_lang']]}{/if}
{if isset($file.delete_url[$language['id_lang']])}<a href="{$file.delete_url[$language['id_lang']]}">{l s='Supprimer'}</a>{/if}
{/if}
</div>
{/if}
{/foreach}
<input id="{$name}_{$language.id_lang}" type="file" name="{$name}_{$language.id_lang}" class="hide" />
<div class="dummyfile input-group">
<span class="input-group-addon"><i class="icon-file"></i></span>
<input id="{$name}_{$language.id_lang}-name" type="text" class="disabled" name="filename" readonly />
<span class="input-group-btn">
<button id="{$name}_{$language.id_lang}-selectbutton" type="button" name="submitAddAttachments" class="btn btn-default">
<i class="icon-folder-open"></i> {l s='Choose a file'}
</button>
</span>
</div>
</div>
{if $languages|count > 1}
<div class="col-lg-2">
<button type="button" class="btn btn-default dropdown-toggle" tabindex="-1" data-toggle="dropdown">
{$language.iso_code}
<span class="caret"></span>
</button>
<ul class="dropdown-menu">
{foreach from=$languages item=lang}
<li><a href="javascript:hideOtherLanguage({$lang.id_lang});" tabindex="-1">{$lang.name}</a></li>
{/foreach}
</ul>
</div>
{/if}
{if $languages|count > 1}
</div>
{/if}
<script>
$(document).ready(function(){
$('#{$name}_{$language.id_lang}-selectbutton').click(function(e){
$('#{$name}_{$language.id_lang}').trigger('click');
});
$('#{$name}_{$language.id_lang}').change(function(e){
var val = $(this).val();
var file = val.split(/[\\/]/);
$('#{$name}_{$language.id_lang}-name').val(file[file.length-1]);
});
});
</script>
{/foreach}
</div>
{/if}

View File

@ -0,0 +1 @@
{$slides|p}

View File

@ -0,0 +1,3 @@
{if isset($confirmation)}
<div class="alert alert-success">{l s='Settings updated' mod='advslider'}</div>
{/if}

View File

@ -38,13 +38,15 @@
parent::__construct();
}
public function postProcess(){
public function postProcess()
{
parent::postProcess();
if (Tools::isSubmit('submitNewsletterExportPart')
|| Tools::isSubmit('submitNewsletterExportPartV2')
|| Tools::isSubmit('submitNewsletterExportPartV3')
|| Tools::isSubmit('submitNewsletterExportPartV4')
|| Tools::isSubmit('submitNewsletterExportPartV5')
|| Tools::isSubmit('submitNewsletterExportPartV6')
) {
$_GET['id_group'] = 3;
$this->trackingSuffix = 'PART';
@ -65,24 +67,38 @@
$this->trackingSuffix = 'PART';
break;
}
// Disable
if (Tools::isSubmit('submitNewsletterExportPartV2')) {
$this->version = 2;
}
// Enable : Export Part - 1 vente en cours /ligne
if (Tools::isSubmit('submitNewsletterExportPartV3')) {
$this->version = 3;
$this->enableV4header = true;
}
// Disable
if (Tools::isSubmit('submitNewsletterExportPartV4')) {
$this->version = 3;
$this->subVersion = true;
}
// Enable : Export Part - 2 ventes en cours /ligne
if (Tools::isSubmit('submitNewsletterExportPartV5')) {
$this->version = 5;
$this->subVersion = true;
}
// Enable : Export Pro - 2 ventes en cours /ligne
if (Tools::isSubmit('submitNewsletterExportPartV6')) {
$this->version = 5;
$_GET['id_group'] = 4;
$this->subVersion = true;
$this->trackingSuffix = 'PRO';
}
$this->exportNewsletter();
}
elseif (Tools::isSubmit('submitNewsletterExportPro')){
// Enable : Export Pro - 1 vente en cours /ligne
elseif (Tools::isSubmit('submitNewsletterExportPro')) {
$this->version = 3;
$this->enableV4header = true;
$_GET['id_group'] = 4;
// reactiver la generation du tracking dans le cron si on veut utiliser le tracking PRO
$this->trackingSuffix = 'PRO';
@ -100,8 +116,8 @@
}
}
public function renderForm(){
public function renderForm()
{
$options = array(
array(
'id_option' => 0,
@ -308,7 +324,7 @@
)
);
$formExportPart = array(
/*$formExportPart = array(
'form' => array(
'legend' => array(
'title' => $this->l('Export PART - 2 ventes par ligne'),
@ -320,9 +336,9 @@
'title' => $this->l('Export PART'),
),
)
);
);*/
$formExportPartV2 = array(
/*$formExportPartV2 = array(
'form' => array(
'legend' => array(
'title' => $this->l('Export PART Version 2 - une vente/ligne'),
@ -334,23 +350,23 @@
'title' => $this->l('Export PART V2'),
),
)
);
);*/
$formExportPartV3 = array(
'form' => array(
'legend' => array(
'title' => $this->l('Export PART Version 3 - une vente/ligne - Newsletter light'),
'title' => $this->l('Export PART - 1 vente en cours /ligne'),
),
'input' => array(
),
'submit' => array(
'name' => 'submitNewsletterExportPartV3',
'title' => $this->l('Export PART LIGHT'),
'title' => $this->l('Export'),
),
)
);
$formExportPartV4 = array(
/*$formExportPartV4 = array(
'form' => array(
'legend' => array(
'title' => $this->l('Export PART VERSION 4 - 2 VENTES/LIGNE - Newsletter LIGHT')
@ -358,48 +374,63 @@
'input' => array(
),
'submit' => array(
'title' => $this->l('Export PART V4'),
'title' => $this->l('Export'),
'name' => 'submitNewsletterExportPartV4'
),
),
);
$formExportPartV5 = array(
'form' => array(
'legend' => array(
'title' => $this->l('Export PART VERSION 5 - VENTES/LIGNE - Newsletter LIGHT')
),
'input' => array(
),
'submit' => array(
'title' => $this->l('Export PART V5'),
'name' => 'submitNewsletterExportPartV5'
),
),
);
);*/
$formExportPro = array(
'form' => array(
'legend' => array(
'title' => $this->l('Export PRO'),
'title' => $this->l('Export PRO - 1 vente en cours /ligne'),
),
'input' => array(
),
'submit' => array(
'name' => 'submitNewsletterExportPartV4',
'title' => $this->l('Export PRO'),
'name' => 'submitNewsletterExportPro',
'title' => $this->l('Export'),
),
)
);
$formExportPartV5 = array(
'form' => array(
'legend' => array(
'title' => $this->l('Export PART - 2 ventes en cours /ligne')
),
'input' => array(
),
'submit' => array(
'title' => $this->l('Export'),
'name' => 'submitNewsletterExportPartV5'
),
),
);
$formExportPartV6 = array(
'form' => array(
'legend' => array(
'title' => $this->l('Export PRO - 2 ventes en cours /ligne')
),
'input' => array(
),
'submit' => array(
'title' => $this->l('Export'),
'name' => 'submitNewsletterExportPartV6'
),
),
);
$this->fields_form = array(
$this->fields_form = array(
$formSettings,
$formExportPart,
$formExportPartV2,
//$formExportPart,
//$formExportPartV2,
$formExportPartV3,
$formExportPartV4,
//$formExportPartV4,
$formExportPartV5,
$formExportPro
$formExportPro,
$formExportPartV6,
);
$this->display = 'add';
@ -777,8 +808,8 @@
return $id_privatesalesList;
}
public function exportNewsletter(){
public function exportNewsletter()
{
$this->_params = array(
'date' => Tools::getValue('ANT_EXPORT_NEWSLETTER_DATE', Configuration::get('ANT_EXPORT_NEWSLETTER_DATE')),
'blog' => Tools::getValue('ANT_EXPORT_NEWSLETTER_BLOG', Configuration::get('ANT_EXPORT_NEWSLETTER_BLOG')),
@ -801,13 +832,11 @@
}*/
$date = $this->_params['date'];
$newPrivateSales = $this->_getPrivateSales($this->_getNewPrivateSalesQuery(), 0, NULL, self::TYPE_STARTING);
$id_privatesalesExcludeList = $this->_getIdPrivateSalesList($newPrivateSales);
$nearEndPrivateSales = $this->_getPrivateSales($this->_getNearEndPrivateSalesQuery(), 0, $id_privatesalesExcludeList, self::TYPE_CURRENT);
$id_privatesalesExcludeList = array_merge($id_privatesalesExcludeList, $this->_getIdPrivateSalesList($nearEndPrivateSales));
$currentPrivateSales = $this->_getPrivateSales($this->_getCurrentPrivateSalesQuery(), 0, $id_privatesalesExcludeList, self::TYPE_ENDING);
foreach ($newPrivateSales as $key => &$sale) {
$sale['link'] = urlencode($sale['link'].'?tr=NL'.date('dmy', strtotime($this->_params['date'])).'_'.$this->trackingSuffix);
}
@ -960,7 +989,8 @@
die();
}
public function renderView(){
public function renderView()
{
return $this->exportNewsletter();
}
}

View File

@ -1,6 +1,8 @@
<?php
include_once(_PS_MODULE_DIR_.'antadismarketing/antadismarketing.php');
ini_set('memory_limit', '2048M');
class AdminAntMarketingStatsController extends ModuleAdminController {
public $tracking_category = null;

View File

@ -521,7 +521,7 @@ class Mailjet_Sync extends Module
"fai" => $email,
"group" => $isPro ? 'Pro' : 'Particulier',
"date_inscription" => date('Y-m-d\TH:i:s\Z',strtotime($customer->date_add)),
"ref_inscription" => (int)strtotime($customer->date_add),
"ref_inscr" => (int)strtotime($customer->date_add),
"id" => $customer->id,
)
)
@ -555,6 +555,7 @@ class Mailjet_Sync extends Module
)
);
$mj = $this->getClient();
if ($mj->addDetailedContactToList($contacts, $lists)) {
return true;
} else {

View File

@ -8,7 +8,7 @@
class privatesaleshomeModuleFrontController extends ModuleFrontController {
/**
*
*
*/
public function init(){
@ -31,12 +31,12 @@ class privatesaleshomeModuleFrontController extends ModuleFrontController {
}
/**
*
*
*/
public function initContent(){
if(!$this->context->cookie->logged && !Configuration::get('PRIVATESALES_LISTING_PUBLIC')){
Tools::redirect($this->context->link->getPageLink('authentication',null,$this->context->cookie->id_lang,'ps=0&back='.$this->context->link->getModuleLink('privatesales', 'home')));
}
}
$news = null;
if(Tools::getValue('type') == "nouveautes"){
@ -50,10 +50,24 @@ class privatesaleshomeModuleFrontController extends ModuleFrontController {
$this->setTemplate('privatesales-home.tpl');
// 12613 - Optimisation
$sale_cache = new SaleCache($this->context, "home", 7200, $news); // 2 Hours
if ($sale_cache->isCached($this->template)) {
$this->setCacheHtml($sale_cache->getCache());
return;
if(Configuration::get('PS_SMARTY_CACHE') == 1) {
$lifetime = 600;
switch (Configuration::get('PS_SMARTY_FORCE_COMPILE')) {
case 0:
case 1:
$lifetime = 600;
break;
case 2:
$lifetime = 0;
break;
}
if ($lifetime > 0) {
$sale_cache = new SaleCache($this->context, "home", $lifetime, $news);
if ($sale_cache->isCached($this->template)) {
$this->setCacheHtml($sale_cache->getCache());
return;
}
}
}
// 12613 - End optimisation
@ -75,7 +89,7 @@ class privatesaleshomeModuleFrontController extends ModuleFrontController {
else
$pastsales = array();
if(Configuration::get('PRIVATESALES_FUTURESALES'))
if(Configuration::get('PRIVATESALES_FUTURESALES'))
$futuresales = SaleCore::getSales("future",Configuration::get('PRIVATESALES_FUTURELIMIT'), TRUE, FALSE, TRUE, 'date_start', 'ASC');
else
$futuresales = array();
@ -100,7 +114,7 @@ class privatesaleshomeModuleFrontController extends ModuleFrontController {
$now = $now->format('Y-m-d H:i:s');
$slider = array();
for ($i=1; $i < 6; $i++) {
for ($i=1; $i < 6; $i++) {
if (Configuration::get('PRIVATESALES_SLIDER_ACTIVE_'.$i)) {
$date_start = Configuration::get('PRIVATESALES_SLIDER_DATE_START_'.$i);
$date_end = Configuration::get('PRIVATESALES_SLIDER_DATE_END_'.$i);
@ -109,7 +123,7 @@ class privatesaleshomeModuleFrontController extends ModuleFrontController {
(empty($date_start) && $date_end >= $now) ||
(empty($date_end) && $date_start <= $now) ||
($date_start <= $now && $date_end >= $now)
)
)
{
$slider[] = array(
'title' => Configuration::get('PRIVATESALES_SLIDER_TITLE_'.$i),
@ -167,7 +181,7 @@ class privatesaleshomeModuleFrontController extends ModuleFrontController {
'banner_concour_title_2' => Configuration::get('PRIVATESALES_BANNER_TITLE_CONCOURS_2'),
'banner_concour_link_active' => Configuration::get('PRIVATESALES_BANNER_LINK_CONCOURS_ACTIVE'),
));
}
}

View File

@ -32,7 +32,13 @@ class SaleCache
$this->cache_id = md5("private_sales_".$cache_prefix."_".$d->format('Ymd'));
$this->max_filemtime = $d->getTimestamp() - $lifetime;
$this->path_cache_file = __DIR__.'/../cache/'.$this->cache_id;
$path_cache = _PS_CACHE_DIR_.'smarty/cache/privatesales';
if (!file_exists($path_cache)) {
mkdir($path_cache, 0755);
}
$this->path_cache_file = $path_cache.'/'.$this->cache_id;
$this->smarty = $context->smarty;
}
@ -64,7 +70,7 @@ class SaleCache
static function clearAll()
{
foreach(glob(__DIR__.'/../cache/*') as $path_file) {
foreach(glob(_PS_CACHE_DIR_.'smarty/cache/privatesales/*') as $path_file) {
if (preg_match('/index\.php$/', $path_file)===1) {
continue;
}
@ -78,7 +84,7 @@ class SaleCache
$slider = array();
for ($i=1; $i < 6; $i++) {
for ($i=1; $i < 6; $i++) {
if (Configuration::get('PRIVATESALES_SLIDER_ACTIVE_'.$i)) {
$date_start = Configuration::get('PRIVATESALES_SLIDER_DATE_START_'.$i);
$date_end = Configuration::get('PRIVATESALES_SLIDER_DATE_END_'.$i);
@ -87,7 +93,7 @@ class SaleCache
(empty($date_start) && $date_end >= $now) ||
(empty($date_end) && $date_start <= $now) ||
($date_start <= $now && $date_end >= $now)
)
)
{
$slider[] = 'slider/slider_'.$i.'_'.Configuration::get('PRIVATESALES_SLIDER_TITLEIMG_'.$i).'.png';
}

View File

@ -302,7 +302,7 @@ class SaleCore extends ObjectModel{
}
elseif ($type == self::STATE_ARCHIVED) {
$sql .= ' AND `archived` = 1 ';
}
}
elseif ($type == self::STATE_HOTSPOT) {
$sql .= ' AND `date_start_hotspot` <= \''.$date_now.'\'
AND `date_end_hotspot` > \''.$date_now.'\'
@ -346,7 +346,8 @@ class SaleCore extends ObjectModel{
*
*/
public static function getSales($type = "all", $date_limit = 0, $active = TRUE, $archived = FALSE, $group = TRUE, $order_by = 'position', $order = 'ASC',$id_category = FALSE, $flashsale = FALSE, $newssale = NULL, $getCollection = FALSE){
public static function getSales($type = "all", $date_limit = 0, $active = TRUE, $archived = FALSE, $group = TRUE, $order_by = 'position', $order = 'ASC',$id_category = FALSE, $flashsale = FALSE, $newssale = NULL, $getCollection = FALSE)
{
$collection = new Collection('SaleCore', Context::getContext()->language->id);
$date_now = date('Y-m-d H:i:s');
@ -390,7 +391,18 @@ class SaleCore extends ObjectModel{
$collection->where('news', '=', 0);
}
if($group){
if (isset($_GET['id_group'])) {
$collection->Sqlwhere('EXISTS (
SELECT g.id_privatesales
FROM `' . _DB_PREFIX_ . 'privatesales_group` g
WHERE
a0.`id_privatesales` = g.`id_privatesales`
AND
g.id_group = '.(int)$_GET['id_group'].')
');
}
if($group) {
$collection->Sqlwhere('EXISTS (
SELECT g.id_privatesales
FROM `' . _DB_PREFIX_ . 'privatesales_group` g
@ -1087,14 +1099,14 @@ class SaleCore extends ObjectModel{
}
}
else {
$delivery_date_range = self::DATE_RANGE_OTHER_DELAY;
$delivery_date_range = self::DATE_RANGE_OTHER_DELAY;
break;
}
}
}
}
if ($delivery_date_range === self::DATE_RANGE_UNKNOWN &&
if ($delivery_date_range === self::DATE_RANGE_UNKNOWN &&
$date_delivery !== null) {
$delivery_date_range = array(

View File

@ -0,0 +1,198 @@
/*
* 2010-2016 La Poste SA
*
* 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 modules-prestashop@laposte.fr 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 Quadra Informatique <modules@quadra-informatique.fr>
* @copyright 2010-2016 La Poste SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of La Poste SA
*/
# 3.0.5
[-] MO :fix town name
# 3.0.4
[-] MO :fix for unauthorized countries
# 3.0.3
[-] MO : change format address
# 3.0.2
[-] MO : Bug fix on cart rule
# 3.0.1
[-] MO : Fix for order created in BO
# 3.0.0
[-] MO : New Back Office page & design
[-] MO : PrestaShop 1.5 & 1.6 support Only
[~] MO : remove PrestaShop 1.4 backward compatibility
# 2.10.1
[-] MO : fix update table socolissimo_delivery
# 2.10.00
[-] MO : some retro 1.4 compat
[-] MO : delete useless field belgium
[-] MO : force international mode api
[-] MO : delete useless cancel button on siret pop
[-] MO : fix popup siret
[*] MO : New module key
[-] MO : Bad mobile detect 1.6
[-] MO : avoid conflit with advanceeucompliace
# 2.9.25
[-] MO : Right function call stripslahes
[-] MO : Bug fix for relais point name
[-] MO : Vendor Manual & back office wording update
[-] MO : bug fix on multiple space address field
# 2.9.24
[-] MO : back office Wording update
[-] MO : Address name too long
# 2.9.23
[*] Missing echo in last fix (report from ps repo)
[*] "SoColissimo Simplicité" is now "Colissimo Simplicité"
# 2.9.22
[-] MO : removing test on overcost field
[-] MO : removing overcost field
[-] MO : fix cartrule with carrier restriction
[-] MO : bug fix belgium phone
[-] MO : fix bug on cart rule restriction on carrier
[-] MO : bug fix for format belgium phonenumber
[-] MO : fix bug for non available country
[*] MO : Update of documentation readme_fr
[-] MO : fix alignment for OPC button in 1.6 themes
[-] MO : report commit 65a4120.
# 2.9.21
[-] MO : add translation in error.tpl
[-] MO : fix redirect for mobile
[-] MO : fix redirect fancybox for prestashop 1.4
[-] MO : fix redirect for 1.4 version
[-] MO : fix for rewrite not actived and multishop
[-] MO : fix hide header and footer load page
[-] MO : bug fix for image not loading api page
[-] MO : release candidat 2.9.21
[-] MO : fix fancybox bug link to api la poste
# 2.9.20
[-] MO : fix bug on install
[-] MO : bug fix on SSL for prestashop > 1.5
# 2.9.19
[-] MO : reset optionnal field in delivery address
[-] MO : adding new field in sql request
[-] MO : adding fields in devlivery table
# 2.9.18
[-] MO : Align version number with Prestashop Repository
[-] MO : adding phone mobile to address in any case
[-] MO : adding pdf files
# 2.9.17
[-] MO : add message when checkbox not checked
[*] MO : remove space in translation file
[*] MO : add texte for informations transmissions to partner
# 2.9.16
[*] MO : display of socolissimo information in order in BO
[*] MO : force SSL and enabled translation
# 2.9.15
[*] MO : Check test for siret
[*] MO : switch ceaddress4
# 2.9.14
[*] MO : bug fix on loading fancybox in admin 1.4
[*] MO : siret number is now mandatory for new user
# 2.9.13
[*] MO : bug fix gift on fancybox mode
[*] MO : bug fix on test trader company
[*] MO : adding at least one phone number
# 2.9.12
[*] MO : bug fix redirection to api mobile
[*] MO : bug fix for CC free cost
# 2.9.11
[*] MO : coding standard
# 2.9.10
[*] MO : bring back original .gitmodules
# 2.9.9
Merge commit "Bring back configuration key" from Quetzacoalt91 from Prestashop Repository
# 2.9.8
[*] MO : fix notice message a range
[*] MO : bug fix on encoded comapny name
[-] MO : fixed Notice message when save config
[*] MO : bug fix translated cgv with accentued chars
# 2.9.6
[*] MO : fix bug 1.6 redirect to order.php
[*] MO : standard coding + bug 1.6 themes
# 2.9.5
[*] missing images
# 2.9.4
[*] MO : Code refactoring
# 2.9.3
[-] MO : Bug in 5 steps checkout 1.6
# 2.9.2
[*]: version change for siret number
[-] MO : siret number is mandatory
# 2.9.1
Use Tools::ssubstr instead of substr
# 2.9.0
Move the module to a dedicated repository to avoid recurring conflicts
# 2.8.5
- Add new Carrier for Seller Cost
- This carrier is configurable like normal Carrier to allow price/weight bracket
- It will be use in place of socolissimo if seller relay point is selected
- It wont appeare in front office, and we recommanded to desactived it once configurated
- seller cost in back office deleted, replaced by activation/desactivation seller cost carrier
- Overcost for belgium now setting in HT , the amount in TTC visible for information.
- bug fix rounded amount in front Office
- bug fix delivery in belgium in post office
- Improvement relay point shipping address: the customer name, fisrtname now appears in address before name of relay point.
# 2.8
- API socolissimo 4.0
- Add seller unique cost for seller delivery
- Add delivery in Belgium
- Add so mobile device for smartphone(use API 3.0)
- New Params in Back office
- Fix various from previous versions :
- Gift message now working
- OPC now working for both 1.4 and 1.5
- Note : OPC mobile theme 1.5 not available yet , will be soon.
# 2.3
- Add Backward compatibility to use the module on 1.4 / 1.5 PrestaShop version.
(OPC and 5 steps process works)

View File

@ -0,0 +1,47 @@
# Module Colissimo Simplicité pour Prestashop 1.5/1.6
Quadra Informatique est partenaire de La Poste pour vous présenter Colissimo Simplicité : découvrez dès maintenant la nouvelle solution de livraison de La Poste, exclusivement dédiée à l'e-commerce.
## Manuel Utilisateur
[Découvrez pas à pas la configuration du module Simplicité pour Prestashop 1.5/1.6][3]
## Téléchargez et installez le module
[La dernière version stable du module pour Prestashop 1.5/1.6 est disponible ICI][4]
## Contributing
This module is an **open-source extension** to the PrestaShop e-commerce solution. Everyone is welcome and even encouraged to contribute with their own improvements.
### Requirements for contributing
Contributors **must** follow the following rules:
* **Make your Pull Request on the "master" branch**
* Do NOT update the module's version number.
* Follow [the coding standards][1].
### Contributing process in details
Contributors wishing to edit a module's files should follow the following process:
1. Create your GitHub account, if you do not have one already.
2. Fork the ganalytics project to your GitHub account.
3. Clone your fork to your local machine in the ```/modules``` directory of your PrestaShop installation.
4. Create a branch in your local clone of the module for your changes.
5. Change the files in your branch. Be sure to follow [the coding standards][1]!
6. Push your changed branch to your fork in your GitHub account.
7. Create a pull request for your changes **on the _'dev'_ branch** of the module's project. If you need help to make a pull request, read the [Github help page about creating pull requests][2].
8. Wait for one of the core developers either to include your change in the codebase, or to comment on possible improvements you should make to your code.
That's it: you have contributed to this open-source project! Congratulations!
## Disclamer
Per to the OSL 3 License, the Original Work is provided under this License on an "AS IS" BASIS and WITHOUT WARRANTY, either express or implied, including, without limitation, the warranties of non-infringement, merchantability or fitness for a particular purpose. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. This DISCLAIMER OF WARRANTY constitutes an essential part of this License. No license to the Original Work is granted by this License except under this disclaimer.
[1]: http://doc.prestashop.com/display/PS16/Coding+Standards
[2]: https://help.github.com/articles/using-pull-requests
[3]: http://shop.quadra-informatique.fr/?controller=attachment&id_attachment=17
[4]: http://shop.quadra-informatique.fr/?controller=attachment&id_attachment=36

View File

@ -0,0 +1,55 @@
<?php
/**
* 2010-2016 La Poste SA
*
* 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 modules-prestashop@laposte.fr 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 Quadra Informatique <modules@quadra-informatique.fr>
* @copyright 2010-2016 La Poste SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of La Poste SA
*/
include_once('../../config/config.inc.php');
include_once('../../init.php');
include_once('../../modules/socolissimo/socolissimo.php');
/* To have context available and translation */
$socolissimo = new Socolissimo();
/* Default answer values => key */
$result = array(
'answer' => true,
'msg' => ''
);
/* Check Token */
if (Tools::getValue('token') != sha1('socolissimo'._COOKIE_KEY_.Context::getContext()->cart->id)) {
$result['answer'] = false;
$result['msg'] = $socolissimo->l('Invalid token');
}
/* If no problem with token but no delivery available */
if ($result['answer'] && !($result = $socolissimo->getDeliveryInfos(Context::getContext()->cart->id, Context::getContext()->customer->id))) {
$result['answer'] = false;
$result['msg'] = $socolissimo->l('No delivery information selected');
}
header('Content-type: application/json');
echo Tools::jsonEncode($result);
exit(0);

View File

@ -0,0 +1,129 @@
<?php
/**
* 2010-2016 La Poste SA
*
* 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 modules-prestashop@laposte.fr 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 Quadra Informatique <modules@quadra-informatique.fr>
* @copyright 2010-2016 La Poste SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of La Poste SA
*/
require_once(dirname(__FILE__).'/../socolissimo.php');
/* Inherit of Socolissimo to have acces to the module method and objet model method */
class SCError extends Socolissimo
{
/* Const for better understanding */
const WARNING = 0;
const REQUIRED = 1;
/* Available error list */
private $errors_list = array();
public function __construct()
{
// Get the parent stuff with Backward Compatibility
parent::__construct();
$this->errors_list = array(
// Error code returned by the ECHEC URL request (Required)
SCError::REQUIRED => array(
'001' => $this->l('FO id missing'),
'002' => $this->l('Wrong FO id'),
'003' => $this->l('Client access denied'),
'004' => $this->l('Required fields missing'),
'006' => $this->l('Missing signature'),
'007' => $this->l('Wrong sign or number version'),
'008' => $this->l('Wrong zip code'),
'009' => $this->l('Wrong format of the Validation back url'),
'010' => $this->l('Wrong format of the Failed back url'),
'011' => $this->l('Invalid transaction number'),
'012' => $this->l('Wrong format of the fees'),
'015' => $this->l('App server unavailable'),
'016' => $this->l('SGBD unavailable')
),
// Error code returned bu the Validation URL request (Warning)
SCError::WARNING => array(
'501' => $this->l('Mail field too long, trunked'),
'502' => $this->l('Phone field too long, trunked'),
'503' => $this->l('Name field too long, trunked'),
'504' => $this->l('First name field too long, trunked'),
'505' => $this->l('Social reason field too long, trunked'),
'506' => $this->l('Floor field too long, trunked'),
'507' => $this->l('Hall field too long, trunked'),
'508' => $this->l('Locality field too long'),
'509' => $this->l('Number and wording access field too long, trunked'),
'510' => $this->l('Town field too long, trunked'),
'511' => $this->l('Intercom field too long, trunked'),
'512' => $this->l('Further Information field too long, trunked'),
'513' => $this->l('Door code field too long, trunked'),
'514' => $this->l('Door code field too long, trunked'),
'515' => $this->l('Customer number too long, trunked'),
'516' => $this->l('Transaction order too long, trunked'),
'517' => $this->l('ParamPlus field too long, trunked'),
'131' => $this->l('Invalid civility, field ignored'),
'132' => $this->l('Delay preparation is invalid, ignored'),
'133' => $this->l('Invalid weight field, ignored'),
// Keep from previous dev (Personal error)
'998' => $this->l('Invalid regenerated sign'),
'999' => $this->l('Error occurred during shipping step.'),
)
);
}
/**
* Return error type
*
* @param $number (integer or string)
* @param bool $type (SCError::REQUIRED or SCError::WARNING)
* @return mixed string|bool
*/
public function getError($number, $type = false)
{
$number = (string)trim($number);
if ($type === false || !isset($this->errors_list[$type])) {
$tab = $this->errors_list[SCError::REQUIRED] + $this->errors_list[SCError::WARNING];
} else {
$tab = $this->errors_list[$type];
}
return isset($tab[$number]) ? $tab[$number] : false;
}
/**
* Check the errors list.
*
* @param $errors
* @param bool $type
* @return bool
*/
public function checkErrors($errors, $type = false)
{
foreach ($errors as $num) {
if (($str = $this->getError($num, $type))) {
return $str;
}
}
return false;
}
}

View File

@ -0,0 +1,323 @@
<?php
/**
* 2010-2016 La Poste SA
*
* 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 modules-prestashop@laposte.fr 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 Quadra Informatique <modules@quadra-informatique.fr>
* @copyright 2010-2016 La Poste SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of La Poste SA
*/
require_once(dirname(__FILE__).'/SCError.php');
/* Inherit of Socolissimo to have acces to the module method and objet model method */
class SCFields extends SCError
{
/* Restriction */
const REQUIRED = 1;
const NOT_REQUIRED = 2;
const UNKNOWN = 3; /* Not specified on the documentation */
const IGNORED = 4;
const ALL = 5;
/* Delivery type */
const HOME_DELIVERY = 0;
const RELAY_POINT = 1;
const API_REQUEST = 2;
public $context;
/* List of the available restriction type */
public $restriction_list = array(
SCFields::REQUIRED,
SCFields::NOT_REQUIRED,
SCFields::UNKNOWN,
SCFields::IGNORED,
SCFields::ALL
);
/* List of the available delivery type */
public $delivery_list = array(
SCFields::HOME_DELIVERY => array(
'DOM',
'RDV'),
SCFields::RELAY_POINT => array(
'BPR',
'A2P',
'MRL',
'CIT',
'ACP',
'CDI',
'CMT',
'BDP'),
SCFields::API_REQUEST => array(
'API')
);
/* By default, use the home delivery */
public $delivery_mode = SCFields::HOME_DELIVERY;
/* Available returned fields for HOME_DELIVERY and RELAY POINT, fields ordered. */
private $fields = array(
SCFields::HOME_DELIVERY => array(
'PUDOFOID' => SCFields::REQUIRED,
'CENAME' => SCFields::REQUIRED,
'DYPREPARATIONTIME' => SCFields::REQUIRED,
'DYFORWARDINGCHARGES' => SCFields::REQUIRED,
'DYFORWARDINGCHARGESCMT' => SCFields::UNKNOWN,
'TRCLIENTNUMBER' => SCFields::UNKNOWN,
'TRORDERNUMBER' => SCFields::UNKNOWN,
'ORDERID' => SCFields::REQUIRED,
'CECIVILITY' => SCFields::REQUIRED,
'CEFIRSTNAME' => SCFields::REQUIRED,
'CECOMPANYNAME' => SCFields::NOT_REQUIRED,
'CEADRESS1' => SCFields::UNKNOWN,
'CEADRESS2' => SCFields::UNKNOWN,
'CEADRESS3' => SCFields::REQUIRED,
'CEADRESS4' => SCFields::UNKNOWN,
'CEZIPCODE' => SCFields::REQUIRED,
'CETOWN' => SCFields::REQUIRED,
'DELIVERYMODE' => SCFields::REQUIRED,
'CEDELIVERYINFORMATION' => SCFields::UNKNOWN,
'CEEMAIL' => SCFields::REQUIRED,
'CEPHONENUMBER' => SCFields::NOT_REQUIRED,
'CEDOORCODE1' => SCFields::UNKNOWN,
'CEDOORCODE2' => SCFields::UNKNOWN,
'CEENTRYPHONE' => SCFields::UNKNOWN,
'TRPARAMPLUS' => SCFields::UNKNOWN,
'TRADERCOMPANYNAME' => SCFields::UNKNOWN,
'ERRORCODE' => SCFields::UNKNOWN,
/* Error required if specific error exist (handle it has not required for now) */
'ERR_CENAME' => SCFields::NOT_REQUIRED,
'ERR_CEFIRSTNAME' => SCFields::NOT_REQUIRED,
'ERR_CECOMPANYNAME' => SCFields::NOT_REQUIRED,
'ERR_CEADRESS1' => SCFields::NOT_REQUIRED,
'ERR_CEADRESS2' => SCFields::NOT_REQUIRED,
'ERR_CEADRESS3' => SCFields::NOT_REQUIRED,
'ERR_CEADRESS4' => SCFields::NOT_REQUIRED,
'ERR_CETOWN' => SCFields::NOT_REQUIRED,
'ERR_CEDOORCODE1' => SCFields::NOT_REQUIRED,
'ERR_CEDOORCODE2' => SCFields::NOT_REQUIRED,
'ERR_CEENTRYPHONE' => SCFields::NOT_REQUIRED,
'ERR_CEDELIVERYINFORMATION' => SCFields::NOT_REQUIRED,
'ERR_CEEMAIL' => SCFields::NOT_REQUIRED,
'ERR_CEPHONENUMBER' => SCFields::NOT_REQUIRED,
'ERR_TRCLIENTNUMBER' => SCFields::NOT_REQUIRED,
'ERR_TRORDERNUMBER' => SCFields::NOT_REQUIRED,
'ERR_TRPARAMPLUS' => SCFields::NOT_REQUIRED,
'ERR_CECIVILITY' => SCFields::NOT_REQUIRED,
'ERR_DYWEIGHT' => SCFields::NOT_REQUIRED,
'ERR_DYPREPARATIONTIME' => SCFields::NOT_REQUIRED,
'TRRETURNURLKO' => SCFields::REQUIRED,
'CHARSET' => SCFields::NOT_REQUIRED,
'CEPAYS' => SCFields::NOT_REQUIRED,
'TRINTER' => SCFields::NOT_REQUIRED,
'CELANG' => SCFields::NOT_REQUIRED,
'NUMVERSION' => SCFields::IGNORED,
'SIGNATURE' => SCFields::IGNORED
),
SCFields::RELAY_POINT => array(
'PUDOFOID' => SCFields::REQUIRED,
'CENAME' => SCFields::REQUIRED,
'DYPREPARATIONTIME' => SCFields::REQUIRED,
'DYFORWARDINGCHARGES' => SCFields::REQUIRED,
'DYFORWARDINGCHARGESCMT' => SCFields::UNKNOWN,
'TRCLIENTNUMBER' => SCFields::UNKNOWN,
'TRORDERNUMBER' => SCFields::UNKNOWN,
'ORDERID' => SCFields::REQUIRED,
'CECIVILITY' => SCFields::REQUIRED,
'CEFIRSTNAME' => SCFields::REQUIRED,
'CECOMPANYNAME' => SCFields::NOT_REQUIRED,
'DELIVERYMODE' => SCFields::REQUIRED,
'PRID' => SCFields::REQUIRED,
'PRNAME' => SCFields::REQUIRED,
'PRCOMPLADRESS' => SCFields::UNKNOWN,
'PRADRESS1' => SCFields::REQUIRED,
'PRADRESS2' => SCFields::UNKNOWN,
'PRZIPCODE' => SCFields::REQUIRED,
'PRTOWN' => SCFields::REQUIRED,
'LOTACHEMINEMENT' => SCFields::UNKNOWN,
'DISTRIBUTIONSORT' => SCFields::UNKNOWN,
'VERSIONPLANTRI' => SCFields::UNKNOWN,
'CEEMAIL' => SCFields::REQUIRED,
'CEPHONENUMBER' => SCFields::REQUIRED,
'TRPARAMPLUS' => SCFields::UNKNOWN,
'TRADERCOMPANYNAME' => SCFields::UNKNOWN,
'ERRORCODE' => SCFields::UNKNOWN,
/* Error required if specific error exist (handle it has not required for now) */
'ERR_CENAME' => SCFields::NOT_REQUIRED,
'ERR_CEFIRSTNAME' => SCFields::NOT_REQUIRED,
'ERR_CECOMPANYNAME' => SCFields::NOT_REQUIRED,
'ERR_CEADRESS1' => SCFields::NOT_REQUIRED,
'ERR_CEADRESS2' => SCFields::NOT_REQUIRED,
'ERR_CEADRESS3' => SCFields::NOT_REQUIRED,
'ERR_CEADRESS4' => SCFields::NOT_REQUIRED,
'ERR_CETOWN' => SCFields::NOT_REQUIRED,
'ERR_CEDOORCODE1' => SCFields::NOT_REQUIRED,
'ERR_CEDOORCODE2' => SCFields::NOT_REQUIRED,
'ERR_CEENTRYPHONE' => SCFields::NOT_REQUIRED,
'ERR_CEDELIVERYINFORMATION' => SCFields::NOT_REQUIRED,
'ERR_CEEMAIL' => SCFields::NOT_REQUIRED,
'ERR_CEPHONENUMBER' => SCFields::NOT_REQUIRED,
'ERR_TRCLIENTNUMBER' => SCFields::NOT_REQUIRED,
'ERR_TRORDERNUMBER' => SCFields::NOT_REQUIRED,
'ERR_TRPARAMPLUS' => SCFields::NOT_REQUIRED,
'ERR_CECIVILITY' => SCFields::NOT_REQUIRED,
'ERR_DYWEIGHT' => SCFields::NOT_REQUIRED,
'ERR_DYPREPARATIONTIME' => SCFields::NOT_REQUIRED,
'TRRETURNURLKO' => SCFields::REQUIRED,
'CHARSET' => SCFields::NOT_REQUIRED,
'CEPAYS' => SCFields::NOT_REQUIRED,
'TRINTER' => SCFields::NOT_REQUIRED,
'CELANG' => SCFields::NOT_REQUIRED,
'PRPAYS' => SCFields::NOT_REQUIRED,
'CODERESEAU' => SCFields::NOT_REQUIRED,
'NUMVERSION' => SCFields::IGNORED,
'SIGNATURE' => SCFields::IGNORED,
'ERR_CHARSET' => SCFields::NOT_REQUIRED,
),
SCFields::API_REQUEST => array(
'pudoFOId' => SCFields::REQUIRED,
'ceName' => SCFields::NOT_REQUIRED,
'dyPreparationTime' => SCFields::NOT_REQUIRED,
'dyForwardingCharges' => SCFields::REQUIRED,
'dyForwardingChargesCMT' => SCFields::NOT_REQUIRED,
'trClientNumber' => SCFields::NOT_REQUIRED,
'trOrderNumber' => SCFields::NOT_REQUIRED,
'orderId' => SCFields::REQUIRED,
'numVersion' => SCFields::REQUIRED,
'ceCivility' => SCFields::NOT_REQUIRED,
'ceFirstName' => SCFields::NOT_REQUIRED,
'ceCompanyName' => SCFields::NOT_REQUIRED,
'ceAdress1' => SCFields::NOT_REQUIRED,
'ceAdress2' => SCFields::NOT_REQUIRED,
'ceAdress3' => SCFields::NOT_REQUIRED,
'ceAdress4' => SCFields::NOT_REQUIRED,
'ceZipCode' => SCFields::NOT_REQUIRED,
'ceTown' => SCFields::NOT_REQUIRED,
'ceEntryPhone' => SCFields::NOT_REQUIRED,
'ceDeliveryInformation' => SCFields::NOT_REQUIRED,
'ceEmail' => SCFields::NOT_REQUIRED,
'cePhoneNumber' => SCFields::NOT_REQUIRED,
'ceDoorCode1' => SCFields::NOT_REQUIRED,
'ceDoorCode2' => SCFields::NOT_REQUIRED,
'dyWeight' => SCFields::NOT_REQUIRED,
'trFirstOrder' => SCFields::NOT_REQUIRED,
'trParamPlus' => SCFields::NOT_REQUIRED,
'trReturnUrlKo' => SCFields::REQUIRED,
'trReturnUrlOk' => SCFields::NOT_REQUIRED,
'CHARSET' => SCFields::NOT_REQUIRED,
'cePays' => SCFields::NOT_REQUIRED,
'trInter' => SCFields::NOT_REQUIRED,
'ceLang' => SCFields::NOT_REQUIRED,
)
);
public function __construct($delivery = 'DOM')
{
parent::__construct();
$this->setDeliveryMode($delivery);
}
/**
* Check if the field exist for Socolissimp
*
* @param $name
* @return bool
*/
public function isAvailableFields($name)
{
return array_key_exists(Tools::strtoupper(trim($name)), $this->fields[$this->delivery_mode]);
}
/**
* Get field for a given restriction
*
* @param int $type
* @return mixed
*/
public function getFields($restriction = SCFields::ALL)
{
$tab = array();
if (in_array($restriction, $this->restriction_list)) {
foreach ($this->fields[$this->delivery_mode] as $key => $value) {
if ($value == $restriction || $restriction == SCFields::ALL) {
$tab[] = $key;
}
}
}
return $tab;
}
/**
* Check if the fields is required
*
* @param $name
* @return bool
*/
public function isRequireField($name)
{
return (in_array(Tools::strtoupper($name), $this->fields[$this->delivery_mode]) && $this->fields[$this->delivery_mode] == SCFields::REQUIRED);
}
/**
* Set delivery mode
*
* @param $delivery
* @return bool
*/
public function setDeliveryMode($delivery)
{
if ($delivery) {
foreach ($this->delivery_list as $delivery_mode => $list) {
if (in_array($delivery, $list)) {
$this->delivery_mode = $delivery_mode;
return true;
}
}
}
return false;
}
/**
* Check if the returned key is proper to the generated one.
*
* @param $key
* @param $params
* @return bool
*/
public function isCorrectSignKey($sign, $params)
{
$tab = array();
foreach ($this->fields[$this->delivery_mode] as $key => $value) {
if ($value == SCFields::IGNORED) {
continue;
}
$key = trim($key);
if (isset($params[$key])) {
$tab[$key] = $params[$key];
}
}
return $sign == $this->generateKey($tab);
}
}

View File

@ -0,0 +1,35 @@
<?php
/**
* 2010-2016 La Poste SA
*
* 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 modules-prestashop@laposte.fr 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 Quadra Informatique <modules@quadra-informatique.fr>
* @copyright 2010-2016 La Poste SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of La Poste 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;

View File

@ -0,0 +1,35 @@
<?php
/**
* 2010-2016 La Poste SA
*
* 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 modules-prestashop@laposte.fr 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 Quadra Informatique <modules@quadra-informatique.fr>
* @copyright 2010-2016 La Poste SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of La Poste 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;

View File

@ -0,0 +1,87 @@
<?php
/**
* 2010-2016 La Poste SA
*
* 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 modules-prestashop@laposte.fr 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 Quadra Informatique <modules@quadra-informatique.fr>
* @copyright 2010-2016 La Poste SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of La Poste SA
*/
require_once _PS_MODULE_DIR_.'socolissimo/classes/SCFields.php';
class SocolissimoRedirectModuleFrontController extends ModuleFrontController
{
public $ssl = true;
public $display_header = false;
public $display_footer = false;
/**
* @see FrontController::initContent()
*/
public function initContent()
{
//parent::initContent();
$so = new SCfields('API');
$fields = $so->getFields();
/* Build back the fields list for SoColissimo, gift infos are send using the JS */
$inputs = array();
foreach ($_GET as $key => $value) {
if (in_array($key, $fields)) {
$inputs[$key] = trim(Tools::getValue($key));
}
}
/* for belgium number specific format */
if (Tools::getValue('cePays') == 'BE') {
if (isset($inputs['cePhoneNumber']) && strpos($inputs['cePhoneNumber'], '324') === 0) {
$inputs['cePhoneNumber'] = '+324'.Tools::substr($inputs['cePhoneNumber'], 3);
}
}
$param_plus = array(
/* Get the data set before */
Tools::getValue('trParamPlus'),
Tools::getValue('gift'),
$so->replaceAccentedChars(Tools::getValue('gift_message'))
);
$inputs['trParamPlus'] = implode('|', $param_plus);
/* Add signature to get the gift and gift message in the trParamPlus */
$inputs['signature'] = $so->generateKey($inputs);
// automatic settings api protocol for ssl
$protocol = 'http://';
if (Configuration::get('PS_SSL_ENABLED')) {
$protocol = 'https://';
}
$socolissimo_url = $protocol.Configuration::get('SOCOLISSIMO_URL');
Context::getContext()->smarty->assign(array(
'inputs' => $inputs,
'socolissimo_url' => $socolissimo_url,
'logo' => Tools::getHttpHost(true).__PS_BASE_URI__.'modules/socolissimo/logo.gif',
'loader' => Tools::getHttpHost(true).__PS_BASE_URI__.'modules/socolissimo/views/img/ajax-loader.gif',
));
$this->setTemplate('redirect.tpl');
}
}

View File

@ -0,0 +1,89 @@
<?php
/**
* 2010-2016 La Poste SA
*
* 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 modules-prestashop@laposte.fr 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 Quadra Informatique <modules@quadra-informatique.fr>
* @copyright 2010-2016 La Poste SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of La Poste SA
*/
require_once _PS_MODULE_DIR_.'socolissimo/classes/SCFields.php';
class SocolissimoRedirectmobileModuleFrontController extends ModuleFrontController
{
public $ssl = true;
public $display_header = false;
public $display_footer = false;
/**
* @see FrontController::initContent()
*/
public function initContent()
{
//parent::initContent();
$so = new SCfields('API');
$fields = $so->getFields();
/* Build back the fields list for SoColissimo, gift infos are send using the JS */
$inputs = array();
foreach ($_GET as $key => $value) {
if (in_array($key, $fields)) {
$inputs[$key] = trim(Tools::getValue($key));
}
}
/* for belgium number specific format */
if (Tools::getValue('cePays') == 'BE') {
if (isset($inputs['cePhoneNumber']) && strpos($inputs['cePhoneNumber'], '324') === 0) {
$inputs['cePhoneNumber'] = '+324'.Tools::substr($inputs['cePhoneNumber'], 3);
}
}
$param_plus = array(
/* Get the data set before */
Tools::getValue('trParamPlus'),
Tools::getValue('gift'),
$so->replaceAccentedChars(Tools::getValue('gift_message'))
);
$inputs['trParamPlus'] = implode('|', $param_plus);
/* Add signature to get the gift and gift message in the trParamPlus */
$inputs['signature'] = $so->generateKey($inputs);
// automatic settings api protocol for ssl
$protocol = 'http://';
if (Configuration::get('PS_SSL_ENABLED')) {
$protocol = 'https://';
}
$socolissimo_url = $protocol.Configuration::get('SOCOLISSIMO_URL_MOBILE');
Context::getContext()->smarty->assign(array(
'inputs' => $inputs,
'socolissimo_url' => $socolissimo_url,
'logo' => Tools::getHttpHost(true).__PS_BASE_URI__.'modules/socolissimo/logo.gif',
'loader' => Tools::getHttpHost(true).__PS_BASE_URI__.'modules/socolissimo/views/img/ajax-loader.gif',
));
$this->setTemplate('redirect.tpl');
}
}

View File

@ -0,0 +1,35 @@
<?php
/**
* 2010-2016 La Poste SA
*
* 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 modules-prestashop@laposte.fr 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 Quadra Informatique <modules@quadra-informatique.fr>
* @copyright 2010-2016 La Poste SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of La Poste 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;

155
modules/socolissimo/fr.php Normal file
View File

@ -0,0 +1,155 @@
<?php
global $_MODULE;
$_MODULE = array();
$_MODULE['<{socolissimo}prestashop>ajax_607e1d854783c8229998ac2b5b6923d3'] = 'Jeton de sécurité invalide';
$_MODULE['<{socolissimo}prestashop>ajax_67933de20c945d1759ab891fb9dc1fd7'] = 'Aucune information de livraison sélectionnée';
$_MODULE['<{socolissimo}prestashop>socolissimo_b70d1d7ff08966a24aa5820d98e4f846'] = 'Colissimo Simplicité';
$_MODULE['<{socolissimo}prestashop>socolissimo_9e13e80360ceb625672531275f01ec1f'] = 'Proposez à vos clients 5 modes de livraison via La Poste.';
$_MODULE['<{socolissimo}prestashop>socolissimo_9479b46a70c31ecc8659bc4717c70574'] = 'La suppression du module entrainera également la suppression des transpoteurs assocés';
$_MODULE['<{socolissimo}prestashop>socolissimo_f8e355b97fa1be7a8d8c206aa66f0077'] = '\'Zone(s) du transporteur\'';
$_MODULE['<{socolissimo}prestashop>socolissimo_690c1c6abf905b88281a7cd324af9942'] = '\'Groupe du transporteur\'';
$_MODULE['<{socolissimo}prestashop>socolissimo_a18ef2e8b3730915798057a50ecbf2cd'] = '\'Tranche(s) du transporteur\'';
$_MODULE['<{socolissimo}prestashop>socolissimo_59f26c70c0230e4ec5e4acdfed0e270c'] = '\'Prix de tranche\'';
$_MODULE['<{socolissimo}prestashop>socolissimo_798547c41ec3e64e2322df678e939344'] = '\'Identifiant FO\'';
$_MODULE['<{socolissimo}prestashop>socolissimo_ac08649aa09ff3b879525627bf086dd1'] = '\'Clé de cryptage\'';
$_MODULE['<{socolissimo}prestashop>socolissimo_a3a53f075adf77334cc34d0f7497ff44'] = '\'Url de l\'administration de Colissimo\'';
$_MODULE['<{socolissimo}prestashop>socolissimo_4d470fde8487e755a50e9235e3dc13ab'] = 'doivent être renseignés pour fonctionner correctement';
$_MODULE['<{socolissimo}prestashop>socolissimo_be9f2d13422fc71d3d92fd4b22f309e9'] = 'Colissimo Simplicité';
$_MODULE['<{socolissimo}prestashop>socolissimo_69ccb7c386b70ae60c80c170246960c7'] = 'A propos de Colissimo';
$_MODULE['<{socolissimo}prestashop>socolissimo_645f11cd8af35de9d1df8fd7f87500cb'] = 'Informations marchand';
$_MODULE['<{socolissimo}prestashop>socolissimo_1f8261d17452a959e013666c5df45e07'] = 'Numéro de téléphone';
$_MODULE['<{socolissimo}prestashop>socolissimo_a48b1a090fb0af2d51e34beda530794e'] = 'Exemple 0144183004';
$_MODULE['<{socolissimo}prestashop>socolissimo_642d3ba5db8b57e006584b544e490ec7'] = 'Code postal';
$_MODULE['<{socolissimo}prestashop>socolissimo_4ed2b7a454f496bc1d48a35da6e06e90'] = 'Exemple : 92300';
$_MODULE['<{socolissimo}prestashop>socolissimo_188f19afec76e0a3a1336a14ae8b455a'] = 'Nombre moyen de colis';
$_MODULE['<{socolissimo}prestashop>socolissimo_15dbfe8adc218659065ebd2b086644d4'] = '< 250 colis / mois';
$_MODULE['<{socolissimo}prestashop>socolissimo_9255df39e454f4362433c368e2dfe193'] = '> 250 colis / mois';
$_MODULE['<{socolissimo}prestashop>socolissimo_60adc330494a66981dec101c81e27f03'] = 'Siret';
$_MODULE['<{socolissimo}prestashop>socolissimo_8e982a1fd4c7f6ce16a708f25dd1136d'] = 'Le Numéro de siret est obligatoire';
$_MODULE['<{socolissimo}prestashop>socolissimo_662719466e0bdb1c92355db6c3225915'] = 'Termes & conditions';
$_MODULE['<{socolissimo}prestashop>socolissimo_aa630f2df0ce9e81e1248823e3acabfd'] = 'En cas de refus, vous pouvez envoyer un e-mail à l\'adresse suivante';
$_MODULE['<{socolissimo}prestashop>socolissimo_2e5fbb923df0b3173a465f3ff298de06'] = 'J\'accepte que les informations concernant le nombre de colis sont envoyés à votre partenaire La Poste - Colissimo';
$_MODULE['<{socolissimo}prestashop>socolissimo_7d6c7e630ca1389c5bb28c6581e1a6c6'] = 'Votre Colissimo Box';
$_MODULE['<{socolissimo}prestashop>socolissimo_517eecff5d2df414b6adfea07856c74e'] = 'Clé de cryptage';
$_MODULE['<{socolissimo}prestashop>socolissimo_29cdcd151d0ac4395e888fc14d1bd94c'] = 'Disponible dans votre';
$_MODULE['<{socolissimo}prestashop>socolissimo_2b461c19415247ae00112ffc9df5ac85'] = 'en utilisant le menu \"Applications > Livraison > Page choix des méthodes de livraison\"';
$_MODULE['<{socolissimo}prestashop>socolissimo_0d5494f40578cd5077f2e7b1f896cf7c'] = 'Identifiant Front Office';
$_MODULE['<{socolissimo}prestashop>socolissimo_78d979636ca71507cfcc6368fa6c9ae3'] = 'Délai de préparation de commande';
$_MODULE['<{socolissimo}prestashop>socolissimo_c76660d589be9a49e8846e51b71744ae'] = 'Jours(s)';
$_MODULE['<{socolissimo}prestashop>socolissimo_9f07cf43f317500a9f71356b8428b8a4'] = 'Jour(s) ouvrable(s) du lundi au vendredi';
$_MODULE['<{socolissimo}prestashop>socolissimo_4f13fae43c4065521c702737ff902fd0'] = 'Doit être le même paramètre que dans votre';
$_MODULE['<{socolissimo}prestashop>socolissimo_2e9c32312d86fca74c413d38f6bbb881'] = 'Saisissez ces deux adresses dans votre';
$_MODULE['<{socolissimo}prestashop>socolissimo_4c1f161771727bcc18eb8e8fafc0b326'] = 'Dans le menu \"Applications > Livraison > Page de choix des modes de livraison\"';
$_MODULE['<{socolissimo}prestashop>socolissimo_b3dcbfc83f926d02be3f284e68655620'] = 'Dans le menu \"Applications > Livraison > Page de choix des modes de livraison (version mobile)\"';
$_MODULE['<{socolissimo}prestashop>socolissimo_ef7a399bb7a271c00583d2dcbf1e0865'] = 'Lorsque le client a sélectionné son mode de livraison (Validation)';
$_MODULE['<{socolissimo}prestashop>socolissimo_0573248959f6da5792dd5f3c706f966e'] = 'Lorsque le client n\'a pas pu selectionner son mode de livraison (Echec)';
$_MODULE['<{socolissimo}prestashop>socolissimo_c1f03f22a877607fe003a4281646143f'] = 'Paramètres Systèmes Colissimo Simplicité';
$_MODULE['<{socolissimo}prestashop>socolissimo_5e8487dd7c11bb1c553c7ecee3d82d1a'] = 'URL de la page Colissimo Simplicité';
$_MODULE['<{socolissimo}prestashop>socolissimo_9abdbf15f57390e082b3dedc95a2d55f'] = 'Adresse FO Mobile';
$_MODULE['<{socolissimo}prestashop>socolissimo_caa6da3490008582fce39f86a7cc00b9'] = 'URL de la page Colissimo Simplicité Mobile. Les clients naviguant avec des smartphones ou Ipad seront redirigés sur cette url. Attention cette url n\'autorise pas la livraison en Belgique pour le moment.';
$_MODULE['<{socolissimo}prestashop>socolissimo_85068ddf0b9bcbb6913008356fe328a0'] = 'Supervision';
$_MODULE['<{socolissimo}prestashop>socolissimo_acd0f52aa3b63581312e2d7caa6c6206'] = 'Autoriser ou non la vérification de la disponibilité des services Colissimo.';
$_MODULE['<{socolissimo}prestashop>socolissimo_00d23a76e43b46dae9ec7aa9dcbebb32'] = 'Activé';
$_MODULE['<{socolissimo}prestashop>socolissimo_b9f5c797ebbf55adccdd8539a65a0241'] = 'Désactivé';
$_MODULE['<{socolissimo}prestashop>socolissimo_32996bdf4214d6cb8bf7fa02273813c8'] = 'Adresse de vérification';
$_MODULE['<{socolissimo}prestashop>socolissimo_af688489282270bcd9e3399db85e30df'] = 'L\'adresse de surveillance permet de s\'assurer de la disponibilité du service Colissimo. Il n\'est pas conseillé de la désactiver.';
$_MODULE['<{socolissimo}prestashop>socolissimo_233d5477ac1b756c5c7ad0a9aa6e265c'] = 'Paramètres Systèmes PrestaShop';
$_MODULE['<{socolissimo}prestashop>socolissimo_dd82197366d33b9dea0d2d8f3603d00b'] = 'Mode d\'affichage';
$_MODULE['<{socolissimo}prestashop>socolissimo_e19b4c6ef84e943fbabb32b49c0e1679'] = 'Sélectionner le mode d\'affichage du formulaire Simplicité';
$_MODULE['<{socolissimo}prestashop>socolissimo_d35b51b639528d580362ca7042de6a0e'] = 'Classique';
$_MODULE['<{socolissimo}prestashop>socolissimo_45313bad96da16bf04f88c1fb39419b7'] = 'Fancybox';
$_MODULE['<{socolissimo}prestashop>socolissimo_a025e05161bb17cbab898f0e77b09a2b'] = 'Iframe';
$_MODULE['<{socolissimo}prestashop>socolissimo_09556d9781797a43aec176fd0c9bef05'] = 'Transporteur Domicile';
$_MODULE['<{socolissimo}prestashop>socolissimo_ccc9ba7996807c85071ef010ae768e6f'] = 'Transporteur utilisé pour déterminé le tarif de la livraison à domicile';
$_MODULE['<{socolissimo}prestashop>socolissimo_578096cb378fea4d78dc6e59fee84c31'] = 'Tarif différent pour la livraison en Point de retrait';
$_MODULE['<{socolissimo}prestashop>socolissimo_7001bdc2a0dca0abf8cb633029c68ef6'] = 'Ce coût s\'applique en lieu et place du coût \"normal\" pour la livraison en commerce de proximité. Un transporteur \"commerce de proximité\" a été crée afin de vous permettre de paramétrer son coût par tranche de prix/poids. Ses tarifs seront utilisés à la place de ceux du transporteur classique lors d\'une livraison en point commerce. Une fois configuré, merci de désactiver le transporteur \"commerce de proximité\".';
$_MODULE['<{socolissimo}prestashop>socolissimo_de2f435741ad4ee91553202b8bcc0507'] = 'Transporteur Point de retrait';
$_MODULE['<{socolissimo}prestashop>socolissimo_c12fa33252d42e12e6e6674b95a901c4'] = 'Transporteur utilisé pour déterminé le tarif de la livraison en point de retrait';
$_MODULE['<{socolissimo}prestashop>socolissimo_c9cc8cce247e49bae79f15173ce97354'] = 'Enregistrer';
$_MODULE['<{socolissimo}prestashop>socolissimo_82c440defe28e2099cba1af1f0761807'] = 'Identifiant FO non spécifié';
$_MODULE['<{socolissimo}prestashop>socolissimo_826361881cfc18b8b75405d398f633b5'] = 'Clé de cryptage non spécifiée';
$_MODULE['<{socolissimo}prestashop>socolissimo_0bf6a620e5f22d8b46e3903a993f7741'] = 'Temps de préparation non spécifié';
$_MODULE['<{socolissimo}prestashop>socolissimo_228485c5faff886fa4520323dc5b2c76'] = 'Temps de préparation invalide';
$_MODULE['<{socolissimo}prestashop>socolissimo_16449aba4eeb91e06418c42d90fd93f5'] = 'Url de front non renseignée';
$_MODULE['<{socolissimo}prestashop>socolissimo_d388441a9740f2356b06e6b434777e0a'] = 'Url de front mobile non renseignée';
$_MODULE['<{socolissimo}prestashop>socolissimo_c84002b08f444ad4564751209a6625f0'] = 'Url de supervision non renseignée';
$_MODULE['<{socolissimo}prestashop>socolissimo_9ae6fe001d646e4631d877a3dd5c1e59'] = 'Le transporteur Socolissimo doit être différent du transporteur socolissimo CC';
$_MODULE['<{socolissimo}prestashop>socolissimo_6b29e581f608ce4370babebeee439bac'] = 'Numéro de téléphone incorrect';
$_MODULE['<{socolissimo}prestashop>socolissimo_e7ef50e6093c77be4fcfd36f9432e56f'] = 'Code postal incorrect';
$_MODULE['<{socolissimo}prestashop>socolissimo_24ab66c8d99aa31c1dcb00f0e5e564df'] = 'Le nombre de colis est incorrect';
$_MODULE['<{socolissimo}prestashop>socolissimo_8279a78fcce2b4ddfb79dfe689592ed2'] = 'Siret incorrect';
$_MODULE['<{socolissimo}prestashop>socolissimo_8554bbc520a9d24ffda195065bbcc9ee'] = 'Vous devez accepter les termes et conditions';
$_MODULE['<{socolissimo}prestashop>socolissimo_5da618e8e4b89c66fe86e32cdafde142'] = 'A partir de';
$_MODULE['<{socolissimo}prestashop>socolissimo_96d4c80bd0b7ccbce555b7d49422c8d9'] = '€';
$_MODULE['<{socolissimo}prestashop>socolissimo_3199d0e4fdc235d991b423c73acdcff7'] = 'TTC';
$_MODULE['<{socolissimo}prestashop>socolissimo_898d22b4259367825dbbbc174f049197'] = 'Choisir un mode de livraison';
$_MODULE['<{socolissimo}prestashop>socolissimo_6e55ec92b403f0ab31c29f62c837834a'] = 'Modifier le mode de livraison';
$_MODULE['<{socolissimo}prestashop>socolissimo_7ea4eac85d1d1967562869cf1e14b1d0'] = 'Pour choisir Colissimo, cochez une méthode de livraison';
$_MODULE['<{socolissimo}prestashop>socolissimo_201bdb87f8e278b943d07ae924d5de6e'] = 'Mode de livraison';
$_MODULE['<{socolissimo}prestashop>socolissimo_ce26601dac0dea138b7295f02b7620a7'] = 'Client';
$_MODULE['<{socolissimo}prestashop>socolissimo_1c76cbfe21c6f44c1d1e59d54f3e4420'] = 'Entreprise';
$_MODULE['<{socolissimo}prestashop>socolissimo_8b5dd64ab8d0b8158906796b53a200e2'] = 'Adresse e-mail';
$_MODULE['<{socolissimo}prestashop>socolissimo_bcc254b55c4a1babdf1dcb82c207506b'] = 'Tél';
$_MODULE['<{socolissimo}prestashop>socolissimo_e19726b466603bc3e444dd26fbcde074'] = 'Adresse du client';
$_MODULE['<{socolissimo}prestashop>socolissimo_6311ae17c1ee52b36e68aaf4ad066387'] = 'Autre';
$_MODULE['<{socolissimo}prestashop>socolissimo_d676596f71fd0f73f735da4bb4225151'] = 'Code de la porte';
$_MODULE['<{socolissimo}prestashop>socolissimo_ea7d9b60cc8654d2c6e8813529a2f3e8'] = 'Information de livraison';
$_MODULE['<{socolissimo}prestashop>socolissimo_e937c6393ce858786bd31a279b50572d'] = 'ID du point de retrait';
$_MODULE['<{socolissimo}prestashop>socolissimo_f109a88feec5ad3aeb82580c7a20ec31'] = 'Point de retrait';
$_MODULE['<{socolissimo}prestashop>socolissimo_021944549c2795a6e4db23b92f198a5e'] = 'Adresse du point de retrait';
$_MODULE['<{socolissimo}prestashop>socolissimo_ce8ae9da5b7cd6c3df2929543a9af92d'] = 'E-mail';
$_MODULE['<{socolissimo}prestashop>validation_57832417838cf085221e39f83c147a5d'] = 'La clé est requise par Colissimo :';
$_MODULE['<{socolissimo}prestashop>validation_befec70964837a08794ca1b092471d83'] = 'Code d\'erreur :';
$_MODULE['<{socolissimo}prestashop>validation_75147bf00179a2fe2afa7a1c8c839f55'] = 'Pas de livraison prévue par la boutique dans le pays indiqué dans l\'adresse choisie.';
$_MODULE['<{socolissimo}prestashop>validation_ec4e66deaec002f69d337b4a7fb8f6ae'] = 'Impossible de mettre le panier à jour. Veuillez de nouveau effectuer votre sélection';
$_MODULE['<{socolissimo}prestashop>scerror_09456f1fe3dbf4b7bbc3281e6cfcce8f'] = 'L\'ID FO est manquant';
$_MODULE['<{socolissimo}prestashop>scerror_d157bc2bca42ee803c4d5682833447e8'] = 'Mauvais ID FO';
$_MODULE['<{socolissimo}prestashop>scerror_078d62fe16fd18fb1290b7eddd5c692e'] = 'L\'accès client a été refusé';
$_MODULE['<{socolissimo}prestashop>scerror_9618dc6fbd50a810162f28a1e7b67729'] = 'Des champs requis sont manquants';
$_MODULE['<{socolissimo}prestashop>scerror_fa419073252af9d022afe65dccbb34a2'] = 'Signature manquante';
$_MODULE['<{socolissimo}prestashop>scerror_f6dcc797fd0cc9653ff0526085364b97'] = 'Mauvais caractère (signe) ou numéro de version';
$_MODULE['<{socolissimo}prestashop>scerror_d49266fa5f76d20cfc6dad2d716cd16a'] = 'Mauvais code postal';
$_MODULE['<{socolissimo}prestashop>scerror_3037505be33ffe564f6b6f278ee6b536'] = 'Mauvais format d\'URL de retour en cas de succès';
$_MODULE['<{socolissimo}prestashop>scerror_713ba29efae98468c7f9b0d541f3370e'] = 'Mauvais format d\'URL de retour en cas d\'échec';
$_MODULE['<{socolissimo}prestashop>scerror_7d6b1ffe78c8653512bdc1a8649984ce'] = 'Numéro de transaction invalide';
$_MODULE['<{socolissimo}prestashop>scerror_538d742b2390bdad765c60189627b401'] = 'Mauvais format pour les frais';
$_MODULE['<{socolissimo}prestashop>scerror_4ec29e1c297cb4d75e223ac54d9c691c'] = 'Serveur applicatif non disponible';
$_MODULE['<{socolissimo}prestashop>scerror_7d5c0ce28ebf1da037f2b99d373a0203'] = 'Base de données non disponible';
$_MODULE['<{socolissimo}prestashop>scerror_23f79be9088c762ea0d07bd42a8ec041'] = 'Champ E-mail trop long, ce champ a été tronqué';
$_MODULE['<{socolissimo}prestashop>scerror_bce95f9ec4ce6d42936e49825abe0839'] = 'Champ Téléphone trop long, ce champ a été tronqué';
$_MODULE['<{socolissimo}prestashop>scerror_5d97ad530e1a82bbd84063ead2b316ef'] = 'Champ Nom trop long, ce champ a été tronqué';
$_MODULE['<{socolissimo}prestashop>scerror_a9445019d3028ea49f40cc3dd1ee2e28'] = 'Champ Prénom trop long, ce champ a été tronqué';
$_MODULE['<{socolissimo}prestashop>scerror_1297e86f1200d07abab150c737d790e7'] = 'Champ Raison Sociale trop long, ce champ a été tronqué';
$_MODULE['<{socolissimo}prestashop>scerror_2bc611d9711c39c122814ad29b38e8ac'] = 'Champ Etage trop long, ce champ a été tronqué';
$_MODULE['<{socolissimo}prestashop>scerror_602679b331c4bd70d5694ffff2983d03'] = 'Champ Hall trop long, ce champ a été tronqué';
$_MODULE['<{socolissimo}prestashop>scerror_a13367e207d18d6c69a3a5011ca891d2'] = 'Champ Localité trop long, ce champ a été tronqué';
$_MODULE['<{socolissimo}prestashop>scerror_bff61d5e6ec4a9971dd99ba861ae3a31'] = 'Champ Numéro et Voie trop long, ce champ a été tronqué';
$_MODULE['<{socolissimo}prestashop>scerror_c3a34c592652c707ec12678de049b132'] = 'Champ Ville trop long, ce champ a été tronqué';
$_MODULE['<{socolissimo}prestashop>scerror_96a135b97708f797933c08fdedf4dd30'] = 'Champ Intercom trop long, ce champ a été tronqué';
$_MODULE['<{socolissimo}prestashop>scerror_b1d27c402a970a7d586ffacd1bb93105'] = 'Champ Autres Informations trop long, ce champ a été tronqué';
$_MODULE['<{socolissimo}prestashop>scerror_5bcb093de475128e5be26de510b2c993'] = 'Champ Code Porte trop long, ce champ a été tronqué';
$_MODULE['<{socolissimo}prestashop>scerror_4380c2fd3a1cb3774b16bca5dd644416'] = 'Champ ID client trop long, ce champ a été tronqué';
$_MODULE['<{socolissimo}prestashop>scerror_058a8646fef2ea3ba2151ec7e59edffa'] = 'Champ Num/Transaction de commande trop long, ce champ a été tronqué';
$_MODULE['<{socolissimo}prestashop>scerror_afa8e0d032a3f22ca4aebe1ef0127c7b'] = 'Champ ParamPlus trop long, ce champ a été tronqué';
$_MODULE['<{socolissimo}prestashop>scerror_ba5991f31d1d97136f09279e31fa8a9e'] = 'Civilité invalide, ce champ a été ignoré';
$_MODULE['<{socolissimo}prestashop>scerror_9bc9c0654d7347d956f757922119e835'] = 'Délai de préparation invalide, ce champ a été ignoré';
$_MODULE['<{socolissimo}prestashop>scerror_e66276f222aee14c74f5456bacf4a4a8'] = 'Poids invalide, ce champ a été ignoré';
$_MODULE['<{socolissimo}prestashop>scerror_3d9dd14d0701cb0b17ea4554d2446ad8'] = 'Caractère (signe) regénéré invalide';
$_MODULE['<{socolissimo}prestashop>scerror_90a5cb3d07bb39bbd4b76f7f9a0d7947'] = 'Une erreur est survenue lors de l\'étape de livraison.';
$_MODULE['<{socolissimo}prestashop>configure_9813ae096138d33ae8306fae9461e7ad'] = 'A propos de Colissimo Simplicité';
$_MODULE['<{socolissimo}prestashop>configure_86ba1f2b7225f83b81ade914f48e74b6'] = 'Souscrire à l\'offre Colissimo Simplicité';
$_MODULE['<{socolissimo}prestashop>configure_185574dcd678842a67bc700242537731'] = 'Par téléphone, appelez le';
$_MODULE['<{socolissimo}prestashop>configure_21eddb618492e30a73b140de1a78513b'] = 'En utilisant notre';
$_MODULE['<{socolissimo}prestashop>configure_0ca930f098bf77023cb5ad01fc4c2a1f'] = 'Formulaire de Contact';
$_MODULE['<{socolissimo}prestashop>configure_a4b5bf0ee1f66e9d947001b510733c65'] = 'Besoin d\'aide ?';
$_MODULE['<{socolissimo}prestashop>configure_0b109c779a5057b45d8b06d3c05d6910'] = 'N\'hésitez pas à consulter le';
$_MODULE['<{socolissimo}prestashop>configure_99e50117d92381279d37ee8e2e56e914'] = 'Manuel Commerçant';
$_MODULE['<{socolissimo}prestashop>configure_fd54c99e2b37f92c479e2538d58a6130'] = 'pour vous aider à configurer le module.';
$_MODULE['<{socolissimo}prestashop>configure_729333c9ebeaca82580ca31bacc23946'] = 'Vous pouvez également appeler le support au';
$_MODULE['<{socolissimo}prestashop>configure_5dfaf40b2d24f8dddc32cf7154472807'] = 'du Lundi au Vendredi, de 8h à 18h.';
$_MODULE['<{socolissimo}prestashop>configure_3a7b1fc8062a2030261cf6ac028511cb'] = 'Prononcez « Incident », puis « Solutions Web ».';
$_MODULE['<{socolissimo}prestashop>configure_warning_b28a56259e5b5fee9ac2077b0fc629af'] = 'Vous devez renseigner la partie \"Informations marchand\" pour activer le module en front office.';
$_MODULE['<{socolissimo}prestashop>error_58d256f5c88c3a887c1c3b8c9ee76f4d'] = 'Liste des erreurs Colissimo :';
$_MODULE['<{socolissimo}prestashop>error_0557fa923dcee4d0f86b1409f5c2167f'] = 'Retour';
$_MODULE['<{socolissimo}prestashop>redirect_611a8475d4cbe64a9a2f5633a82fe314'] = 'Vous allez être redirigé vers Socolissimo dans quelques instants.Si ce n\'est pas le cas, veuillez cliquez sur le bouton.';

View File

@ -0,0 +1,35 @@
<?php
/**
* 2010-2016 La Poste SA
*
* 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 modules-prestashop@laposte.fr 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 Quadra Informatique <modules@quadra-informatique.fr>
* @copyright 2010-2016 La Poste SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of La Poste 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;

Binary file not shown.

After

Width:  |  Height:  |  Size: 595 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

View File

@ -0,0 +1,72 @@
<?php
/**
* 2010-2016 La Poste SA
*
* 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 modules-prestashop@laposte.fr 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 Quadra Informatique <modules@quadra-informatique.fr>
* @copyright 2010-2016 La Poste SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of La Poste SA
*/
require_once('../../config/config.inc.php');
require_once(_PS_ROOT_DIR_.'/init.php');
require_once(dirname(__FILE__).'/classes/SCFields.php');
$so = new SCfields('API');
$fields = $so->getFields();
/* Build back the fields list for SoColissimo, gift infos are send using the JS */
$inputs = array();
foreach ($_GET as $key => $value) {
if (in_array($key, $fields)) {
$inputs[$key] = trim(Tools::getValue($key));
}
}
/* for belgium number specific format */
if (Tools::getValue('cePays') == 'BE') {
if (isset($inputs['cePhoneNumber']) && strpos($inputs['cePhoneNumber'], '324') === 0) {
$inputs['cePhoneNumber'] = '+324'.Tools::substr($inputs['cePhoneNumber'], 3);
}
}
$param_plus = array(
/* Get the data set before */
Tools::getValue('trParamPlus'),
Tools::getValue('gift'),
$so->replaceAccentedChars(Tools::getValue('gift_message'))
);
$inputs['trParamPlus'] = implode('|', $param_plus);
/* Add signature to get the gift and gift message in the trParamPlus */
$inputs['signature'] = $so->generateKey($inputs);
$protocol = 'http://';
if (Configuration::get('PS_SSL_ENABLED')) {
$protocol = 'https://';
}
$socolissimo_url = $protocol.Configuration::get('SOCOLISSIMO_URL');
Context::getContext()->smarty->assign(array(
'inputs' => $inputs,
'socolissimo_url' => $socolissimo_url,
'logo' => 'logo.gif',
'loader' => 'ajax-loader.gif'
));
Context::getContext()->smarty->display(_PS_MODULE_DIR_.'socolissimo/views/templates/front/redirect.tpl');

View File

@ -0,0 +1,74 @@
<?php
/**
* 2010-2016 La Poste SA
*
* 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 modules-prestashop@laposte.fr 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 Quadra Informatique <modules@quadra-informatique.fr>
* @copyright 2010-2016 La Poste SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of La Poste SA
*/
require_once('../../config/config.inc.php');
require_once(_PS_ROOT_DIR_.'/init.php');
require_once(dirname(__FILE__).'/classes/SCFields.php');
$so = new SCfields('API');
$fields = $so->getFields();
/* Build back the fields list for SoColissimo, gift infos are send using the JS */
$inputs = array();
foreach ($_GET as $key => $value) {
if (in_array($key, $fields)) {
$inputs[$key] = trim(Tools::getValue($key));
}
}
/* for belgium number specific format */
if (Tools::getValue('cePays') == 'BE') {
if (isset($inputs['cePhoneNumber']) && strpos($inputs['cePhoneNumber'], '324') === 0) {
$inputs['cePhoneNumber'] = '+324'.Tools::substr($inputs['cePhoneNumber'], 3);
}
}
$param_plus = array(
/* Get the data set before */
Tools::getValue('trParamPlus'),
Tools::getValue('gift'),
$so->replaceAccentedChars(Tools::getValue('gift_message'))
);
$inputs['trParamPlus'] = implode('|', $param_plus);
/* Add signature to get the gift and gift message in the trParamPlus */
$inputs['signature'] = $so->generateKey($inputs);
$protocol = 'http://';
if (Configuration::get('PS_SSL_ENABLED')) {
$protocol = 'https://';
}
$socolissimo_url = $protocol.Configuration::get('SOCOLISSIMO_URL_MOBILE');
Context::getContext()->smarty->assign(array(
'inputs' => $inputs,
'socolissimo_url' => $socolissimo_url,
'logo' => 'logo.gif',
'loader' => 'ajax-loader.gif'
));
Context::getContext()->smarty->display(_PS_MODULE_DIR_.'socolissimo/views/templates/front/redirect.tpl');

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,35 @@
<?php
/**
* 2010-2016 La Poste SA
*
* 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 modules-prestashop@laposte.fr 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 Quadra Informatique <modules@quadra-informatique.fr>
* @copyright 2010-2016 La Poste SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of La Poste 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;

View File

@ -0,0 +1,50 @@
<?php
/**
* 2010-2016 La Poste SA
*
* 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 modules-prestashop@laposte.fr 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 Quadra Informatique <modules@quadra-informatique.fr>
* @copyright 2010-2016 La Poste SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of La Poste SA
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_2_10_0($object, $install = false)
{
// add column dyforwardingcharges checking exitence first (2.10.0 update)
$query = 'SELECT * FROM INFORMATION_SCHEMA.COLUMNS
WHERE COLUMN_NAME= "dyforwardingcharges"
AND TABLE_NAME= "'._DB_PREFIX_.'socolissimo_delivery_info"
AND TABLE_SCHEMA = "'._DB_NAME_.'"';
$result = Db::getInstance()->ExecuteS($query);
// adding column lotacheminement
if (!$result) {
$query = 'ALTER TABLE '._DB_PREFIX_.'socolissimo_delivery_info add `dyforwardingcharges` decimal(20.6) NOT NULL';
Db::getInstance()->Execute($query);
}
Configuration::deleteByName('SOCOLISSIMO_SUP_BELG');
Configuration::deleteByName('SOCOLISSIMO_EXP_BEL');
Configuration::updateValue('SOCOLISSIMO_VERSION', '2.10.0');
return true;
}

View File

@ -0,0 +1,49 @@
<?php
/**
* 2010-2016 La Poste SA
*
* 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 modules-prestashop@laposte.fr 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 Quadra Informatique <modules@quadra-informatique.fr>
* @copyright 2010-2016 La Poste SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of La Poste SA
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_2_10_00($object, $install = false)
{
// add column dyforwardingcharges checking exitence first (2.10.00 update)
$query = 'SELECT * FROM INFORMATION_SCHEMA.COLUMNS
WHERE COLUMN_NAME= "dyforwardingcharges"
AND TABLE_NAME= "'._DB_PREFIX_.'socolissimo_delivery_info"
AND TABLE_SCHEMA = "'._DB_NAME_.'"';
$result = Db::getInstance()->ExecuteS($query);
// adding column lotacheminement
if (!$result) {
$query = 'ALTER TABLE '._DB_PREFIX_.'socolissimo_delivery_info add `dyforwardingcharges` decimal(20.6) NOT NULL';
Db::getInstance()->Execute($query);
}
Configuration::deleteByName('SOCOLISSIMO_SUP_BELG');
Configuration::deleteByName('SOCOLISSIMO_EXP_BEL');
Configuration::updateValue('SOCOLISSIMO_VERSION', '2.10.00');
return true;
}

View File

@ -0,0 +1,50 @@
<?php
/**
* 2010-2016 La Poste SA
*
* 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 modules-prestashop@laposte.fr 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 Quadra Informatique <modules@quadra-informatique.fr>
* @copyright 2010-2016 La Poste SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of La Poste SA
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_2_10_1($object, $install = false)
{
// change column dyforwardingcharges checking exitence first (2.10.1 update)
$query = 'SELECT * FROM INFORMATION_SCHEMA.COLUMNS
WHERE COLUMN_NAME= "dyforwardingcharges"
AND TABLE_NAME= "'._DB_PREFIX_.'socolissimo_delivery_info"
AND TABLE_SCHEMA = "'._DB_NAME_.'"';
$result = Db::getInstance()->ExecuteS($query);
if ($result) {
$query = 'ALTER TABLE '._DB_PREFIX_.'socolissimo_delivery_info modify `dyforwardingcharges` decimal(20,6) NOT NULL';
Db::getInstance()->Execute($query);
} else {
$query = 'ALTER TABLE '._DB_PREFIX_.'socolissimo_delivery_info add `dyforwardingcharges` decimal(20,6) NOT NULL';
Db::getInstance()->Execute($query);
}
Configuration::updateValue('SOCOLISSIMO_VERSION', '2.10.1');
return true;
}

View File

@ -0,0 +1,58 @@
<?php
/**
* 2010-2016 La Poste SA
*
* 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 modules-prestashop@laposte.fr 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 Quadra Informatique <modules@quadra-informatique.fr>
* @copyright 2010-2016 La Poste SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of La Poste SA
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_2_8_0($object, $install = false)
{
// update value so url mobile
Configuration::updateValue('SOCOLISSIMO_URL_MOBILE', 'http://ws.colissimo.fr/');
// add column cecountry in table socolissimo_delivery_info, checking exitence first (2.8 update)
$query = 'SELECT * FROM INFORMATION_SCHEMA.COLUMNS
WHERE COLUMN_NAME= "cecountry"
AND TABLE_NAME= "'._DB_PREFIX_.'socolissimo_delivery_info"
AND TABLE_SCHEMA = "'._DB_NAME_.'"';
$result = Db::getInstance()->ExecuteS($query);
// adding column
if (!$result) {
$query = 'ALTER TABLE '._DB_PREFIX_.'socolissimo_delivery_info add `cecountry` varchar(10) NOT NULL AFTER `prtown`';
if (Db::getInstance()->Execute($query)) {
// updating value
$query = 'UPDATE '._DB_PREFIX_.'socolissimo_delivery_info SET `cecountry` = "FR" where `cecountry` =""';
}
if (Db::getInstance()->Execute($query)) {
Configuration::updateValue('SOCOLISSIMO_VERSION', '2.8.0');
}
} else {
Configuration::updateValue('SOCOLISSIMO_VERSION', '2.8.0');
}
return true;
}

View File

@ -0,0 +1,36 @@
<?php
/**
* 2010-2016 La Poste SA
*
* 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 modules-prestashop@laposte.fr 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 Quadra Informatique <modules@quadra-informatique.fr>
* @copyright 2010-2016 La Poste SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of La Poste SA
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_2_8_4($object, $install = false)
{
// update value so url mobile
Configuration::updateValue('SOCOLISSIMO_URL_MOBILE', 'http://ws-mobile.colissimo.fr/');
Configuration::updateValue('SOCOLISSIMO_VERSION', '2.8.4');
return true;
}

View File

@ -0,0 +1,73 @@
<?php
/**
* 2010-2016 La Poste SA
*
* 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 modules-prestashop@laposte.fr 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 Quadra Informatique <modules@quadra-informatique.fr>
* @copyright 2010-2016 La Poste SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of La Poste SA
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_2_8_5($object, $install = false)
{
// update value so url mobile
Configuration::updateValue('SOCOLISSIMO_COST_SELLER', false);
// add column codereseau, cename, cefirstname in table socolissimo_delivery_info, checking exitence first (2.8.5 update)
$query = 'SELECT * FROM INFORMATION_SCHEMA.COLUMNS
WHERE COLUMN_NAME= "codereseau"
AND TABLE_NAME= "'._DB_PREFIX_.'socolissimo_delivery_info"
AND TABLE_SCHEMA = "'._DB_NAME_.'"';
$result = Db::getInstance()->ExecuteS($query);
// adding column codereseau
if (!$result) {
$query = 'ALTER TABLE '._DB_PREFIX_.'socolissimo_delivery_info add `codereseau` varchar(3)';
Db::getInstance()->Execute($query);
}
$query = 'SELECT * FROM INFORMATION_SCHEMA.COLUMNS
WHERE COLUMN_NAME= "cename"
AND TABLE_NAME= "'._DB_PREFIX_.'socolissimo_delivery_info"
AND TABLE_SCHEMA = "'._DB_NAME_.'"';
$result = Db::getInstance()->ExecuteS($query);
// adding column cename
if (!$result) {
$query = 'ALTER TABLE '._DB_PREFIX_.'socolissimo_delivery_info add `cename` varchar(64)';
Db::getInstance()->Execute($query);
}
$query = 'SELECT * FROM INFORMATION_SCHEMA.COLUMNS
WHERE COLUMN_NAME= "cefirstname"
AND TABLE_NAME= "'._DB_PREFIX_.'socolissimo_delivery_info"
AND TABLE_SCHEMA = "'._DB_NAME_.'"';
$result = Db::getInstance()->ExecuteS($query);
// adding column cefirstname
if (!$result) {
$query = 'ALTER TABLE '._DB_PREFIX_.'socolissimo_delivery_info add `cefirstname` varchar(64)';
Db::getInstance()->Execute($query);
}
Configuration::updateValue('SOCOLISSIMO_VERSION', '2.8.5');
return true;
}

View File

@ -0,0 +1,71 @@
<?php
/**
* 2010-2016 La Poste SA
*
* 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 modules-prestashop@laposte.fr 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 Quadra Informatique <modules@quadra-informatique.fr>
* @copyright 2010-2016 La Poste SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of La Poste SA
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_2_9_20($object, $install = false)
{
// add column lotacheminement, versionplantri, distributionsort in table socolissimo_delivery_info, checking exitence first (2.9.19 update)
$query = 'SELECT * FROM INFORMATION_SCHEMA.COLUMNS
WHERE COLUMN_NAME= "lotacheminement"
AND TABLE_NAME= "'._DB_PREFIX_.'socolissimo_delivery_info"
AND TABLE_SCHEMA = "'._DB_NAME_.'"';
$result = Db::getInstance()->ExecuteS($query);
// adding column lotacheminement
if (!$result) {
$query = 'ALTER TABLE '._DB_PREFIX_.'socolissimo_delivery_info add `lotacheminement` varchar(64) NOT NULL';
Db::getInstance()->Execute($query);
}
$query = 'SELECT * FROM INFORMATION_SCHEMA.COLUMNS
WHERE COLUMN_NAME= "distributionsort"
AND TABLE_NAME= "'._DB_PREFIX_.'socolissimo_delivery_info"
AND TABLE_SCHEMA = "'._DB_NAME_.'"';
$result = Db::getInstance()->ExecuteS($query);
// adding column distributionsort
if (!$result) {
$query = 'ALTER TABLE '._DB_PREFIX_.'socolissimo_delivery_info add `distributionsort` varchar(64) NOT NULL';
Db::getInstance()->Execute($query);
}
$query = 'SELECT * FROM INFORMATION_SCHEMA.COLUMNS
WHERE COLUMN_NAME= "versionplantri"
AND TABLE_NAME= "'._DB_PREFIX_.'socolissimo_delivery_info"
AND TABLE_SCHEMA = "'._DB_NAME_.'"';
$result = Db::getInstance()->ExecuteS($query);
// adding column versionplantri
if (!$result) {
$query = 'ALTER TABLE '._DB_PREFIX_.'socolissimo_delivery_info add `versionplantri` varchar(10) NOT NULL';
Db::getInstance()->Execute($query);
}
Configuration::updateValue('SOCOLISSIMO_VERSION', '2.9.20');
return true;
}

View File

@ -0,0 +1,37 @@
<?php
/**
* 2010-2016 La Poste SA
*
* 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 modules-prestashop@laposte.fr 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 Quadra Informatique <modules@quadra-informatique.fr>
* @copyright 2010-2016 La Poste SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of La Poste SA
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_2_9_21($object, $install = false)
{
Configuration::updateValue('SOCOLISSIMO_URL', 'ws.colissimo.fr/pudo-fo-frame/storeCall.do');
Configuration::updateValue('SOCOLISSIMO_URL_MOBILE', 'ws-mobile.colissimo.fr/');
Configuration::updateValue('SOCOLISSIMO_SUP_URL', 'ws.colissimo.fr/supervision-pudo-frame/supervision.jsp');
Configuration::updateValue('SOCOLISSIMO_VERSION', '2.9.21');
return true;
}

View File

@ -0,0 +1,36 @@
<?php
/**
* 2010-2016 La Poste SA
*
* 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 modules-prestashop@laposte.fr 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 Quadra Informatique <modules@quadra-informatique.fr>
* @copyright 2010-2016 La Poste SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of La Poste SA
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_2_9_22($object, $install = false)
{
$query = 'ALTER TABLE '._DB_PREFIX_.'socolissimo_delivery_info CHANGE `cephonenumber` `cephonenumber` VARCHAR(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL';
Db::getInstance()->Execute($query);
Configuration::updateValue('SOCOLISSIMO_VERSION', '2.9.22');
return true;
}

View File

@ -0,0 +1,34 @@
<?php
/**
* 2010-2016 La Poste SA
*
* 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 modules-prestashop@laposte.fr 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 Quadra Informatique <modules@quadra-informatique.fr>
* @copyright 2010-2016 La Poste SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of La Poste SA
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_2_9_24($object, $install = false)
{
Configuration::updateValue('SOCOLISSIMO_VERSION', '2.9.24');
return true;
}

View File

@ -0,0 +1,34 @@
<?php
/**
* 2010-2016 La Poste SA
*
* 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 modules-prestashop@laposte.fr 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 Quadra Informatique <modules@quadra-informatique.fr>
* @copyright 2010-2016 La Poste SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of La Poste SA
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_2_9_25($object, $install = false)
{
Configuration::updateValue('SOCOLISSIMO_VERSION', '2.9.25');
return true;
}

View File

@ -0,0 +1,338 @@
<?php
/**
* 2010-2016 La Poste SA
*
* 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 modules-prestashop@laposte.fr 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 Quadra Informatique <modules@quadra-informatique.fr>
* @copyright 2010-2016 La Poste SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of La Poste SA
*/
include('../../config/config.inc.php');
include('../../init.php');
require_once(_PS_MODULE_DIR_.'socolissimo/classes/SCFields.php');
/* Init the Context (inherit Socolissimo and handle error) */
if (!Tools::getValue('DELIVERYMODE')) {
$so = new SCFields(Tools::getValue('deliveryMode')); /* api 4.0 mobile */
} else {
$so = new SCFields(Tools::getValue('DELIVERYMODE')); /* api 4.0 */
}
/* Init the Display */
$display = new FrontController();
$display->setTemplate(dirname(__FILE__).'/views/templates/front/error.tpl');
$errors_list = array();
$redirect = __PS_BASE_URI__.'index.php?controller=order&';
$so->context->smarty->assign('so_url_back', $redirect);
$return = array();
/* If error code not defined or empty / null */
$errors_codes = ($tab = Tools::getValue('ERRORCODE')) ? explode(' ', trim($tab)) : array();
/* If no required error code, start to get the POST data */
if (!$so->checkErrors($errors_codes, SCError::REQUIRED)) {
foreach ($_POST as $key => $val) {
if ($so->isAvailableFields($key)) {
if (!Tools::getValue('CHARSET')) {
/* only way to know if api is 3.0 to get encode for accentued chars in key calculation */
$return[Tools::strtoupper($key)] = utf8_encode(Tools::stripslashes($val));
} else {
$return[Tools::strtoupper($key)] = Tools::stripslashes($val);
}
}
}
/* GET parameter, the only one */
$return['TRRETURNURLKO'] = Tools::getValue('trReturnUrlKo'); /* api 4.0 mobile */
if (!$return['TRRETURNURLKO']) {
$return['TRRETURNURLKO'] = Tools::getValue('TRRETURNURLKO'); /* api 4.0 */
} else {
/* Treating parameters for api 4.0 mobile */
if (empty($return['TRINTER'])) {
$return['TRINTER'] = 0; /* 0 by default */
}
if (empty($return['CELANG'])) {
$return['CELANG'] = 'fr_FR'; /* fr_FR by default */
}
if (!empty($return['PRPAYS'])) {
unset($return['PRPAYS']);
}
if (!empty($return['CODERESEAU'])) {
unset($return['CODERESEAU']);
}
}
foreach ($so->getFields(SCFields::REQUIRED) as $field) {
if (!isset($return[$field])) {
$errors_list[] = $so->l('This key is required for Socolissimo:').$field;
}
}
} else {
foreach ($errors_codes as $code) {
$errors_list[] = $so->l('Error code:').' '.$so->getError($code);
}
}
// check if retrun country is allowed by shop
if (array_key_exists('PRPAYS',$return)) {
$iso_return = $return['PRPAYS'];
} else {
$iso_return = $return['CEPAYS'];
}
if (!isAvailableReturnCountry($iso_return)) {
$errors_list[] = $so->l('Country in address is not allowed in shop.');
}
if (empty($errors_list)) {
if ($so->isCorrectSignKey($return['SIGNATURE'], $return) && $so->context->cart->id && saveOrderShippingDetails($so->context->cart->id, (int)$return['TRCLIENTNUMBER'], $return, $so)) {
$trparamplus = explode('|', $return['TRPARAMPLUS']);
if (count($trparamplus) > 1) {
$so->context->cart->id_carrier = (int)$trparamplus[0];
if ($trparamplus[1] == 'checked' || $trparamplus[1] == 1 || $trparamplus[1] == 'true') {
/* value can be "undefined" or "not checked" */
$so->context->cart->gift = 1;
} else {
$so->context->cart->gift = 0;
}
} elseif (count($trparamplus) == 1) {
$so->context->cart->id_carrier = (int)$trparamplus[0];
}
if ((int)$so->context->cart->gift && Validate::isMessage($trparamplus[2])) {
$so->context->cart->gift_message = strip_tags($trparamplus[2]);
}
if (!$so->context->cart->update()) {
$errors_list[] = $so->l('Cart cannot be updated. Please try again your selection');
} else {
Tools::redirect($redirect.'step=3&cgv=1&id_carrier='.$so->context->cart->id_carrier);
}
} else {
$errors_list[] = $so->getError('999');
}
}
$so->context->smarty->assign('error_list', $errors_list);
$display->run();
function isAvailableReturnCountry($iso_code)
{
if ($iso_code) {
$carrier = new Carrier(Configuration::get('SOCOLISSIMO_CARRIER_ID'));
$zones = $carrier->getZones();
$country = Country::getByIso($iso_code);
if ((int)$country && (int)$carrier->id) {
$is_available = false;
$return_country = new Country((int)$country);
$zone_country = Country::getIdZone((int)$country);
if ($zone_country && $return_country->active) {
foreach ($zones as $zone) {
if ($zone['id_zone'] == $zone_country) {
$is_available = true;
}
}
return $is_available;
}
}
}
return false;
}
function saveOrderShippingDetails($id_cart, $id_customer, $so_params, $so_object)
{
// we want at least one phone number
$cart = new Cart($id_cart);
$delivery_address = new Address($cart->id_address_delivery);
$billing_address = new Address($cart->id_address_invoice);
$phone_number = $so_params['CEPHONENUMBER'];
if (!$so_params['CEPHONENUMBER']) {
if ($delivery_address->phone_mobile) {
$phone_number = $delivery_address->phone_mobile;
} elseif ($delivery_address->phone) {
$phone_number = $delivery_address->phone;
} elseif ($billing_address->phone_mobile) {
$phone_number = $billing_address->phone_mobile;
} elseif ($billing_address->phone) {
$phone_number = $billing_address->phone;
} else {
$phone_number = '';
}
}
// if api use is 3.0 we need to decode for accentued chars
if (!isset($so_params['CHARSET'])) {
foreach ($so_params as $key => $value) {
$so_params[$key] = utf8_decode($value);
}
}
$delivery_mode = array(
'DOM' => 'Livraison à domicile',
'BPR' => 'Livraison en Bureau de Poste',
'A2P' => 'Livraison Commerce de proximité',
'MRL' => 'Livraison Commerce de proximité',
'CMT' => 'Livraison commerçants Belgique',
'CIT' => 'Livraison en Cityssimo',
'ACP' => 'Agence ColiPoste',
'CDI' => 'Centre de distribution',
'BDP' => 'Bureau de poste Belge',
'RDV' => 'Livraison sur Rendez-vous');
// default country france
if (isset($so_params['PRPAYS'])) {
$country_code = $so_params['PRPAYS'];
} elseif (isset($so_params['CEPAYS'])) {
$country_code = $so_params['CEPAYS'];
} else {
$country_code = 'FR';
}
$db = Db::getInstance();
$db->executeS('SELECT * FROM '._DB_PREFIX_.'socolissimo_delivery_info WHERE id_cart = '.(int)$id_cart.' AND id_customer ='.(int)$id_customer);
$num_rows = (int)$db->NumRows();
if ($num_rows == 0) {
$sql = 'INSERT INTO '._DB_PREFIX_.'socolissimo_delivery_info
( `id_cart`, `id_customer`, `delivery_mode`, `prid`, `prname`, `prfirstname`, `prcompladress`,
`pradress1`, `pradress2`, `pradress3`, `pradress4`, `przipcode`, `prtown`,`cecountry`, `cephonenumber`, `ceemail` ,
`cecompanyname`, `cedeliveryinformation`, `cedoorcode1`, `cedoorcode2`,`codereseau`, `cename`, `cefirstname`,`lotacheminement`,`distributionsort`,
`versionplantri`,`dyforwardingcharges`)
VALUES ('.(int)$id_cart.','.(int)$id_customer.',';
if ($so_object->delivery_mode == SCFields::RELAY_POINT) {
$sql .= '\''.pSQL($so_params['DELIVERYMODE']).'\',
'.(isset($so_params['PRID']) ? '\''.pSQL($so_params['PRID']).'\'' : '\'\'').',
'.(isset($so_params['CENAME']) ? '\''.pSQL($so_params['CENAME']).'\'' : '\'\'').',
'.(isset($so_params['CEFIRSTNAME']) ? '\''.Tools::ucfirst(pSQL($so_params['CEFIRSTNAME'])).'\'' : '\'\'').',
'.(isset($so_params['PRCOMPLADRESS']) ? '\''.pSQL($so_params['PRCOMPLADRESS']).'\'' : '\'\'').',
'.(isset($so_params['PRNAME']) ? '\''.pSQL($so_params['PRNAME']).'\'' : '\'\'').',
'.(isset($so_params['PRADRESS1']) ? '\''.pSQL($so_params['PRADRESS1']).'\'' : '\'\'').',
'.(isset($so_params['PRADRESS3']) ? '\''.pSQL($so_params['PRADRESS3']).'\'' : '\'\'').',
'.(isset($so_params['PRADRESS4']) ? '\''.pSQL($so_params['PRADRESS4']).'\'' : '\'\'').',
'.(isset($so_params['PRZIPCODE']) ? '\''.pSQL($so_params['PRZIPCODE']).'\'' : '\'\'').',
'.(isset($so_params['PRTOWN']) ? '\''.pSQL($so_params['PRTOWN']).'\'' : '\'\'').',
'.(isset($country_code) ? '\''.pSQL($country_code).'\'' : '\'\'').',
'.(isset($phone_number) ? '\''.pSQL($phone_number).'\'' : '\'\'').',
'.(isset($so_params['CEEMAIL']) ? '\''.pSQL($so_params['CEEMAIL']).'\'' : '\'\'').',
'.(isset($so_params['CECOMPANYNAME']) ? '\''.pSQL($so_params['CECOMPANYNAME']).'\'' : '\'\'').',
'.(isset($so_params['CEDELIVERYINFORMATION']) ? '\''.pSQL($so_params['CEDELIVERYINFORMATION']).'\'' : '\'\'').',
'.(isset($so_params['CEDOORCODE1']) ? '\''.pSQL($so_params['CEDOORCODE1']).'\'' : '\'\'').',
'.(isset($so_params['CEDOORCODE2']) ? '\''.pSQL($so_params['CEDOORCODE2']).'\'' : '\'\'').',
'.(isset($so_params['CODERESEAU']) ? '\''.pSQL($so_params['CODERESEAU']).'\'' : '\'\'').',
'.(isset($so_params['CENAME']) ? '\''.Tools::ucfirst(pSQL($so_params['CENAME'])).'\'' : '\'\'').',
'.(isset($so_params['CEFIRSTNAME']) ? '\''.Tools::ucfirst(pSQL($so_params['CEFIRSTNAME'])).'\'' : '\'\'').',
'.(isset($so_params['LOTACHEMINEMENT']) ? '\''.pSQL($so_params['LOTACHEMINEMENT']).'\'' : '\'\'').',
'.(isset($so_params['DISTRIBUTIONSORT']) ? '\''.pSQL($so_params['DISTRIBUTIONSORT']).'\'' : '\'\'').',
'.(isset($so_params['VERSIONPLANTRI']) ? '\''.pSQL($so_params['VERSIONPLANTRI']).'\'' : '\'\'').',
'.(isset($so_params['DYFORWARDINGCHARGES']) ? '\''.pSQL($so_params['DYFORWARDINGCHARGES']).'\'' : '\'\'').')';
} else {
$sql .= '\''.pSQL($so_params['DELIVERYMODE']).'\',\'\',
'.(isset($so_params['CENAME']) ? '\''.Tools::ucfirst(pSQL($so_params['CENAME'])).'\'' : '\'\'').',
'.(isset($so_params['CEFIRSTNAME']) ? '\''.Tools::ucfirst(pSQL($so_params['CEFIRSTNAME'])).'\'' : '\'\'').',
'.(isset($so_params['CECOMPLADRESS']) ? '\''.pSQL($so_params['CECOMPLADRESS']).'\'' : '\'\'').',
'.(isset($so_params['CEADRESS1']) ? '\''.pSQL($so_params['CEADRESS1']).'\'' : '\'\'').',
'.(isset($so_params['CEADRESS4']) ? '\''.pSQL($so_params['CEADRESS4']).'\'' : '\'\'').',
'.(isset($so_params['CEADRESS3']) ? '\''.pSQL($so_params['CEADRESS3']).'\'' : '\'\'').',
'.(isset($so_params['CEADRESS2']) ? '\''.pSQL($so_params['CEADRESS2']).'\'' : '\'\'').',
'.(isset($so_params['CEZIPCODE']) ? '\''.pSQL($so_params['CEZIPCODE']).'\'' : '\'\'').',
'.(isset($so_params['CETOWN']) ? '\''.pSQL($so_params['CETOWN']).'\'' : '\'\'').',
'.(isset($country_code) ? '\''.pSQL($country_code).'\'' : '\'\'').',
'.(isset($phone_number) ? '\''.pSQL($phone_number).'\'' : '\'\'').',
'.(isset($so_params['CEEMAIL']) ? '\''.pSQL($so_params['CEEMAIL']).'\'' : '\'\'').',
'.(isset($so_params['CECOMPANYNAME']) ? '\''.pSQL($so_params['CECOMPANYNAME']).'\'' : '\'\'').',
'.(isset($so_params['CEDELIVERYINFORMATION']) ? '\''.pSQL($so_params['CEDELIVERYINFORMATION']).'\'' : '\'\'').',
'.(isset($so_params['CEDOORCODE1']) ? '\''.pSQL($so_params['CEDOORCODE1']).'\'' : '\'\'').',
'.(isset($so_params['CEDOORCODE2']) ? '\''.pSQL($so_params['CEDOORCODE2']).'\'' : '\'\'').',
'.(isset($so_params['CODERESEAU']) ? '\''.pSQL($so_params['CODERESEAU']).'\'' : '\'\'').',
'.(isset($so_params['CENAME']) ? '\''.Tools::ucfirst(pSQL($so_params['CENAME'])).'\'' : '\'\'').',
'.(isset($so_params['CEFIRSTNAME']) ? '\''.Tools::ucfirst(pSQL($so_params['CEFIRSTNAME'])).'\'' : '\'\'').',
'.(isset($so_params['LOTACHEMINEMENT']) ? '\''.pSQL($so_params['LOTACHEMINEMENT']).'\'' : '\'\'').',
'.(isset($so_params['DISTRIBUTIONSORT']) ? '\''.pSQL($so_params['DISTRIBUTIONSORT']).'\'' : '\'\'').',
'.(isset($so_params['VERSIONPLANTRI']) ? '\''.pSQL($so_params['VERSIONPLANTRI']).'\'' : '\'\'').',
'.(isset($so_params['DYFORWARDINGCHARGES']) ? '\''.pSQL($so_params['DYFORWARDINGCHARGES']).'\'' : '\'\'').')';
}
if (Db::getInstance()->execute($sql)) {
return true;
}
} else {
$table = _DB_PREFIX_.'socolissimo_delivery_info';
$values = array();
$values['delivery_mode'] = pSQL($so_params['DELIVERYMODE']);
$values['cephonenumber'] = pSQL($phone_number);
// reseting optionnal field
$values['lotacheminement'] = '';
$values['distributionsort'] = '';
$values['versionplantri'] = '';
if ($so_object->delivery_mode == SCFields::RELAY_POINT) {
isset($so_params['PRID']) ? $values['prid'] = pSQL($so_params['PRID']) : '';
isset($so_params['PRNAME']) ? $values['prname'] = Tools::ucfirst(pSQL($so_params['PRNAME'])) : '';
isset($delivery_mode[$so_params['DELIVERYMODE']]) ? $values['prfirstname'] = pSQL($delivery_mode[$so_params['DELIVERYMODE']]) : $values['prfirstname'] = 'Colissimo';
isset($so_params['PRCOMPLADRESS']) ? $values['prcompladress'] = pSQL($so_params['PRCOMPLADRESS']) : '';
isset($so_params['PRADRESS1']) ? $values['pradress1'] = pSQL($so_params['PRADRESS1']) : '';
isset($so_params['PRADRESS2']) ? $values['pradress2'] = pSQL($so_params['PRADRESS2']) : '';
isset($so_params['PRADRESS3']) ? $values['pradress3'] = pSQL($so_params['PRADRESS3']) : '';
isset($so_params['PRADRESS4']) ? $values['pradress4'] = pSQL($so_params['PRADRESS4']) : '';
isset($so_params['PRZIPCODE']) ? $values['przipcode'] = pSQL($so_params['PRZIPCODE']) : '';
isset($so_params['PRTOWN']) ? $values['prtown'] = pSQL($so_params['PRTOWN']) : '';
isset($country_code) ? $values['cecountry'] = pSQL($country_code) : '';
isset($so_params['CEEMAIL']) ? $values['ceemail'] = pSQL($so_params['CEEMAIL']) : '';
isset($so_params['CEDELIVERYINFORMATION']) ? $values['cedeliveryinformation'] = pSQL($so_params['CEDELIVERYINFORMATION']) : '';
isset($so_params['CEDOORCODE1']) ? $values['cedoorcode1'] = pSQL($so_params['CEDOORCODE1']) : '';
isset($so_params['CEDOORCODE2']) ? $values['cedoorcode2'] = pSQL($so_params['CEDOORCODE2']) : '';
isset($so_params['CECOMPANYNAME']) ? $values['cecompanyname'] = pSQL($so_params['CECOMPANYNAME']) : '';
isset($so_params['CODERESEAU']) ? $values['codereseau'] = pSQL($so_params['CODERESEAU']) : '';
isset($so_params['CENAME']) ? $values['cename'] = pSQL($so_params['CENAME']) : '';
isset($so_params['CEFIRSTNAME']) ? $values['cefirstname'] = pSQL($so_params['CEFIRSTNAME']) : '';
isset($so_params['LOTACHEMINEMENT']) ? $values['lotacheminement'] = pSQL($so_params['LOTACHEMINEMENT']) : '';
isset($so_params['DISTRIBUTIONSORT']) ? $values['distributionsort'] = pSQL($so_params['DISTRIBUTIONSORT']) : '';
isset($so_params['VERSIONPLANTRI']) ? $values['versionplantri'] = pSQL($so_params['VERSIONPLANTRI']) : '';
isset($so_params['DYFORWARDINGCHARGES']) ? $values['dyforwardingcharges'] = pSQL($so_params['DYFORWARDINGCHARGES']) : '';
} else {
isset($so_params['PRID']) ? $values['prid'] = pSQL($so_params['PRID']) : $values['prid'] = '';
isset($so_params['CENAME']) ? $values['prname'] = Tools::ucfirst(pSQL($so_params['CENAME'])) : '';
isset($so_params['CEFIRSTNAME']) ? $values['prfirstname'] = Tools::ucfirst(pSQL($so_params['CEFIRSTNAME'])) : '';
isset($so_params['CECOMPLADRESS']) ? $values['prcompladress'] = pSQL($so_params['CECOMPLADRESS']) : '';
isset($so_params['CEADRESS1']) ? $values['pradress1'] = pSQL($so_params['CEADRESS1']) : '';
isset($so_params['CEADRESS4']) ? $values['pradress2'] = pSQL($so_params['CEADRESS4']) : '';
isset($so_params['CEADRESS3']) ? $values['pradress3'] = pSQL($so_params['CEADRESS3']) : '';
isset($so_params['CEADRESS2']) ? $values['pradress4'] = pSQL($so_params['CEADRESS2']) : '';
isset($so_params['CEZIPCODE']) ? $values['przipcode'] = pSQL($so_params['CEZIPCODE']) : '';
isset($so_params['CETOWN']) ? $values['prtown'] = pSQL($so_params['CETOWN']) : '';
isset($country_code) ? $values['cecountry'] = pSQL($country_code) : '';
isset($so_params['CEEMAIL']) ? $values['ceemail'] = pSQL($so_params['CEEMAIL']) : '';
isset($so_params['CEDELIVERYINFORMATION']) ? $values['cedeliveryinformation'] = pSQL($so_params['CEDELIVERYINFORMATION']) : '';
isset($so_params['CEDOORCODE1']) ? $values['cedoorcode1'] = pSQL($so_params['CEDOORCODE1']) : '';
isset($so_params['CEDOORCODE2']) ? $values['cedoorcode2'] = pSQL($so_params['CEDOORCODE2']) : '';
isset($so_params['CECOMPANYNAME']) ? $values['cecompanyname'] = pSQL($so_params['CECOMPANYNAME']) : '';
isset($so_params['CODERESEAU']) ? $values['codereseau'] = pSQL($so_params['CODERESEAU']) : '';
isset($so_params['CENAME']) ? $values['cename'] = pSQL($so_params['CENAME']) : '';
isset($so_params['CEFIRSTNAME']) ? $values['cefirstname'] = pSQL($so_params['CEFIRSTNAME']) : '';
isset($so_params['LOTACHEMINEMENT']) ? $values['lotacheminement'] = pSQL($so_params['LOTACHEMINEMENT']) : '';
isset($so_params['DISTRIBUTIONSORT']) ? $values['distributionsort'] = pSQL($so_params['DISTRIBUTIONSORT']) : '';
isset($so_params['VERSIONPLANTRI']) ? $values['versionplantri'] = pSQL($so_params['VERSIONPLANTRI']) : '';
isset($so_params['DYFORWARDINGCHARGES']) ? $values['dyforwardingcharges'] = pSQL($so_params['DYFORWARDINGCHARGES']) : '';
}
$where = ' `id_cart` =\''.(int)$id_cart.'\' AND `id_customer` =\''.(int)$id_customer.'\'';
if (Db::getInstance()->autoExecute($table, $values, 'UPDATE', $where)) {
return true;
}
}
}

View File

@ -0,0 +1,125 @@
/**
* 2010-2016 La Poste SA
*
* 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 modules-prestashop@laposte.fr 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 Quadra Informatique <modules@quadra-informatique.fr>
* @copyright 2010-2016 La Poste SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of La Poste SA
*/
.colissimo-header a {
color: #ff9600;
}
.colissimo-header h4{
margin: 10px 0;
font-size: 1.8em;
}
.colissimo-header h5 {
font-size: 1.4em;
margin: 10px 0;
}
.colissimo-header h6 {
font-size: 1.3em;
margin: 10px 0;
}
.colissimo-header .alert {
font-size: 1.3em;
color:red;
}
.colissimo-header .support p {
margin: 10px 0 0 0;
}
.colissimo-header div h4:first-child,
.colissimo-header div h5:first-child {
margin: 0 0 10px 0 ;
}
#content.bootstrap .colissimo-about h3 {
margin-top:20px;
}
.colissimo-header #colissimo-logo,
.colissimo-about img {
max-width: 100%;
height: auto;
}
/* PrestaShop 1.5 */
#top_container .col-md-1,
#top_container .col-md-2,
#top_container .col-md-3,
#top_container .col-md-6 {
float:left;
padding-left: 5px;
padding-right: 5px;
}
#top_container .col-md-1 {
max-width: 8%;
}
#top_container .col-md-2 {
max-width: 15%;
}
#top_container .col-md-3 {
max-width: 25%;
}
#top_container .col-md-6 {
max-width: 50%;
}
#top_container .text-center {
text-align: center;
}
#top_container ul {
padding-left: 2em;
list-style-type: disc;
}
#top_container li {
text-align: -webkit-match-parent;
}
#top_container #module_form {
clear:both;
padding-top: 20px;
}
#top_container #module_form a {
color: #ff9600;
}
#top_container #module_form .margin-form label {
float:none;
}
#top_container h3 {
border-top: 2px #8F8F8F solid;
padding-top: 5px;
left:-260px;
position:relative;
}

View File

@ -0,0 +1,35 @@
<?php
/**
* 2010-2016 La Poste SA
*
* 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 modules-prestashop@laposte.fr 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 Quadra Informatique <modules@quadra-informatique.fr>
* @copyright 2010-2016 La Poste SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of La Poste 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;

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 151 KiB

View File

@ -0,0 +1,35 @@
<?php
/**
* 2010-2016 La Poste SA
*
* 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 modules-prestashop@laposte.fr 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 Quadra Informatique <modules@quadra-informatique.fr>
* @copyright 2010-2016 La Poste SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of La Poste 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;

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

View File

@ -0,0 +1,35 @@
<?php
/**
* 2010-2016 La Poste SA
*
* 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 modules-prestashop@laposte.fr 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 Quadra Informatique <modules@quadra-informatique.fr>
* @copyright 2010-2016 La Poste SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of La Poste 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;

View File

@ -0,0 +1,214 @@
{*
* 2010-2016 La Poste SA
*
* 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 modules-prestashop@laposte.fr 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 Quadra Informatique <modules@quadra-informatique.fr>
* @copyright 2010-2016 La Poste SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of La Poste SA
*}
<div class="colissimo-about">
<h2>Loffre Colissimo</h2>
<h3>Savoir-faire</h3>
<p><b>Expert des
services de livraison et du dernier kilomètre</b>, Colissimo met
tout en œuvre pour assurer la livraison rapide de vos
colis de moins de 30kg au domicile de vos clients, mais
aussi dans les bureaux de poste, en commerces de proximité ou en
consignes.
</p><p>
Colissimo traite en moyenne <b>1 million de colis par jour</b>,
et jusquà 2 millions en période de forte activité sur nos <b>15
plateformes colis</b>.
</p><p>
Satisfaire vos clients est notre priorité. Ainsi, grâce aux offres
et services Colissimo, nous nous attachons à proposer la meilleure
expérience client, tant pour vous que pour vos clients avec :
</p>
<ul>
<li>
Une offre complète de services de <b>livraison à domicile ou
en point retrait en 48h</b> en France métropolitaine et en J+3 à
J+7 en Europe
</li><li>
Un maillage dense de plus de <b>18 000 points de retrait</b><font color="#ff0000"><b>
</b></font>en France métropolitaine
</li><li>
Un accompagnement au quotidien et une réponse à tous vos
besoins, <b>grâce à des équipes expérimentées</b>
</li><li>
<b>Un savoir-faire à linternational vers plus de 200 pays</b>
grâce à un réseau performant, des alliances mondiales et des
partenaires de référence.
</li><li>
Un outil industriel moderne et performant, capable de <b>traiter
plus dun million de colis par jour</b> et ainsi de gérer vos
pics dactivité saisonniers
</li><li>
Une <b>Qualité de Service stable</b> tout au long de lannée,
quel que soit le lieu de livraison et la saison
</li><li>
Une livraison <b>neutre en CO2</b>, plus respectueuse de
lenvironnement</p>
</li>
</ul>
<h3>Loffre en détail</h3>
<img src="{$module_dir|escape:'htmlall':'UTF-8'}views/img/enterprise-offer-map.jpg" name="Ofrre Colissimo Entreprise" />
<h3>Lexpertise à linternational</h3>
<p>
<b>Bénéficiez de notre expertise, avec une organisation dédiée à
l'export, pour tous vos envois de colis jusqu'à 30 kg.</b>
</p>
<ul>
<li>
Colissimo est le spécialiste de la livraison rapide à
l'international avec <b>plus de 10 millions de colis envoyés dans
le monde chaque année.</b></p>
</li><li>
Une offre vers l'International et l'Outre-Mer simple et
complète vous permettant d'accéder à <b>plus de 200 pays ainsi
qu'à 12 destinations en Outre-Mer.</b>
</li><li>
<b>Des délais de livraison garantis</b> vers 28 destinations
<i>(Allemagne, Australie, Autriche, Belgique, Chine, Corée du
Sud, Danemark, Espagne, Estonie, Etats-Unis, Hongrie,
Hong-Kong, Irlande, Italie, Japon, Lettonie, Lituanie, Luxembourg,
Pays-Bas, Pologne, Portugal, République Tchèque, Royaume-Uni,
Singapour, Slovaquie, Slovénie, Suède, Suisse)</i>
</li><li>
<b>7</b><font color="#ff0000"><b> </b></font><b>plateformes
Colissimo dédiées à l'export.</b>
</li><li>
<b>Un réseau d'alliances mondial performant</b> avec
des partenaires spécialisés dans la livraison du dernier kilomètre
(DPD, BPost, Deutsche Post, Swiss Post...)
</li><li>
<b>Une offre dédiée à lEurope</b><font color="#ff0000"><b>
</b></font>offrant le choix des modes de livraison
</li><li>
<b>Une offre retour depuis 18 pays : </b><br/>
<i>Allemagne, Belgique, Autriche, Espagne, Finlande, Irlande, Italie,
Luxembourg, Pays-Bas, Pologne, République Tchèque, Royaume-Uni,
Slovaquie, Slovénie. </i><br/>
<i>A venir : Australie, Grèce, Portugal, Suisse</i><br/>
</li><li>
<b>Une
expérience de livraison enrichie pour vos clients</b><font color="#ff0000"><b>
</b></font>avec le service Predict© vers 13 destinations :<br/>
<i>Allemagne, Autriche, Espagne, Estonie, Hongrie, Luxembourg,
Pays-Bas, Pologne, Portugal, République Tchèque, Royaume-Uni,
Slovaquie, Slovénie</i>
</li>
</ul>
<p><b>Notre
offre internationale est disponible dans votre contrat Colissimo
Entreprise sans surcoût. Alors, lancez-vous dès maintenant sur de
nouveaux pays !</b></p>
<h3>Une politique de retour innovante</h3>
<p>Le retour est devenu
un véritable levier de fidélisation et de satisfaction clients.
Afin de répondre à cette exigence du marché et mieux satisfaire
vos clients, Colissimo a développé une offre retour complète pour
la France et lInternational.
</p>
<p><b>En France</b>,
vous offrez un retour simplifié à vos clients et le choix du lieu
de dépôt parmi les points de dépôt disponibles : à La
Poste, en relais Pickup ou depuis une boite aux lettres personnelle.
</p>
<p><b>A
linternational</b>, vous gagnez la confiance de vos clients et
captez des parts de marché supplémentaires grâce à un retour de
produit en toute simplicité dans lun des 55 000 points de
dépôt (principalement des bureaux de poste locaux). Cette offre est
disponible depuis 18 pays européens : <i>Allemagne, Autriche,
Belgique, Espagne, Finlande, Irlande, Italie, Luxembourg, Pays-Bas,
Pologne, République Tchèque, Royaume-Uni, Slovaquie, Slovénie.</i></p>
<p><i>A venir :
Australie, Grèce, Portugal, Suisse. </i>
</p>
<p><b>EXCLUSIVITE
COLISSIMO : Le Retour en boîte aux lettres</b></p>
<p>Avec loffre
exclusive Colissimo Retour <i>en boite aux lettres</i>, <b>votre
client na plus besoin de se déplacer</b> ou dêtre présent
lors du passage du facteur. Il vous demande un retour et dépose son
colis dans sa boîte aux lettres personnelle avant 8h le lendemain.
La Poste soccupe du reste !
</p>
<h3>Votre outil de suivi <a href="http://www.colissimo.entreprise.laposte.fr/fr/ensavoirplus-coliview-fr?mn2=9" target="_blank">ColiView</a></h3>
<p>Avec <a href="http://www.colissimo.entreprise.laposte.fr/fr/ensavoirplus-coliview-fr?mn2=9" target="_blank"><b>ColiView</b></a>
vous disposez dun <b>outil en ligne pour suivre et piloter toutes
vos expéditions</b> : <br/>
<b>+ RAPIDE</b> : des recherches
simplifiées et un suivi détaillé en quelques clics<br/>
<b>+
ERGONOMIQUE</b> : une navigation intuitive, pour une utilisation
quotidienne de loutil<br/>
<b>+ COMPLET</b> : un seul outil
pour gérer et piloter lensemble de votre activité Colissimo<br/>
<b>+
SOUPLE</b> : une gestion en ligne de vos contacts avec le
Service Clients et une automatisation de certaines réclamations</p>
<h3>La solution Mobile</h3>
<p>Colissimo a mis
en place une solution Mobile clé en main afin que vous puissiez
proposer notre offre de livraison sur tous les supports dachat de
vos e-acheteurs et assurer ainsi la continuité de vos ventes.</p>
<p>Sur votre
back-office Colissimo, vous pourrez activer la solution par simple
validation des conditions générales dutilisation et paramétrer
laffichage de votre page de choix des modes de livraison sur votre
site ou application mobile, dans la rubrique « Applications
Livraisons Page de choix des modes de livraison Version Mobile »
</p>
<h3>Souscription aux offres Colissimo Entreprise</h3>
<p>Vous avez
une activité régulière denvoi de colis, et vous souhaitez
accéder aux offres de livraison Colissimo à domicile ou en
points retrait, ainsi quà nos solutions de retour dont
le Retour en boite aux lettres : vous pouvez souscrire à lOffre
Colissimo Entreprises sous contrat.</p>
<p><b>Comment
souscrire à nos services ?</b> Cest très simple, vous avez
deux possibilités :</p>
<ul>
<li>
Faire une
demande en ligne via notre <a href="https://www.colissimo.entreprise.laposte.fr/fr/contact" target="_blank"><b>formulaire contact</b></a><br/>
Un conseiller commercial vous contactera pour vous
accompagner dans le choix des solutions daffranchissement, de
livraison et de suivi qui correspondent à votre besoin.
</li><li>
Contacter
directement notre service commercial au <b>3634</b>
</li>
</ul>
<p>Notre solution de
livraison proposée par le module Simplicité est accessible à
partir de <b>1500€ de CA par an </b><u><b>sans frais de gestion</b></u>.
En-dessous de ce seuil, loffre reste accessible mais des frais de
gestion vous seront appliqués.</p>
</div>

View File

@ -0,0 +1,214 @@
{*
* 2010-2016 La Poste SA
*
* 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 modules-prestashop@laposte.fr 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 Quadra Informatique <modules@quadra-informatique.fr>
* @copyright 2010-2016 La Poste SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of La Poste SA
*}
<div class="colissimo-about">
<h2>Loffre Colissimo</h2>
<h3>Savoir-faire</h3>
<p><b>Expert des
services de livraison et du dernier kilomètre</b>, Colissimo met
tout en œuvre pour assurer la livraison rapide de vos
colis de moins de 30kg au domicile de vos clients, mais
aussi dans les bureaux de poste, en commerces de proximité ou en
consignes.
</p><p>
Colissimo traite en moyenne <b>1 million de colis par jour</b>,
et jusquà 2 millions en période de forte activité sur nos <b>15
plateformes colis</b>.
</p><p>
Satisfaire vos clients est notre priorité. Ainsi, grâce aux offres
et services Colissimo, nous nous attachons à proposer la meilleure
expérience client, tant pour vous que pour vos clients avec :
</p>
<ul>
<li>
Une offre complète de services de <b>livraison à domicile ou
en point retrait en 48h</b> en France métropolitaine et en J+3 à
J+7 en Europe
</li><li>
Un maillage dense de plus de <b>18 000 points de retrait</b><font color="#ff0000"><b>
</b></font>en France métropolitaine
</li><li>
Un accompagnement au quotidien et une réponse à tous vos
besoins, <b>grâce à des équipes expérimentées</b>
</li><li>
<b>Un savoir-faire à linternational vers plus de 200 pays</b>
grâce à un réseau performant, des alliances mondiales et des
partenaires de référence.
</li><li>
Un outil industriel moderne et performant, capable de <b>traiter
plus dun million de colis par jour</b> et ainsi de gérer vos
pics dactivité saisonniers
</li><li>
Une <b>Qualité de Service stable</b> tout au long de lannée,
quel que soit le lieu de livraison et la saison
</li><li>
Une livraison <b>neutre en CO2</b>, plus respectueuse de
lenvironnement</p>
</li>
</ul>
<h3>Loffre en détail</h3>
<img src="{$module_dir|escape:'html':'UTF-8'}views/img/enterprise-offer-map.jpg" name="Ofrre Colissimo Entreprise" />
<h3>Lexpertise à linternational</h3>
<p>
<b>Bénéficiez de notre expertise, avec une organisation dédiée à
l'export, pour tous vos envois de colis jusqu'à 30 kg.</b>
</p>
<ul>
<li>
Colissimo est le spécialiste de la livraison rapide à
l'international avec <b>plus de 10 millions de colis envoyés dans
le monde chaque année.</b></p>
</li><li>
Une offre vers l'International et l'Outre-Mer simple et
complète vous permettant d'accéder à <b>plus de 200 pays ainsi
qu'à 12 destinations en Outre-Mer.</b>
</li><li>
<b>Des délais de livraison garantis</b> vers 28 destinations
<i>(Allemagne, Australie, Autriche, Belgique, Chine, Corée du
Sud, Danemark, Espagne, Estonie, Etats-Unis, Hongrie,
Hong-Kong, Irlande, Italie, Japon, Lettonie, Lituanie, Luxembourg,
Pays-Bas, Pologne, Portugal, République Tchèque, Royaume-Uni,
Singapour, Slovaquie, Slovénie, Suède, Suisse)</i>
</li><li>
<b>7</b><font color="#ff0000"><b> </b></font><b>plateformes
Colissimo dédiées à l'export.</b>
</li><li>
<b>Un réseau d'alliances mondial performant</b> avec
des partenaires spécialisés dans la livraison du dernier kilomètre
(DPD, BPost, Deutsche Post, Swiss Post...)
</li><li>
<b>Une offre dédiée à lEurope</b><font color="#ff0000"><b>
</b></font>offrant le choix des modes de livraison
</li><li>
<b>Une offre retour depuis 18 pays : </b><br/>
<i>Allemagne, Belgique, Autriche, Espagne, Finlande, Irlande, Italie,
Luxembourg, Pays-Bas, Pologne, République Tchèque, Royaume-Uni,
Slovaquie, Slovénie. </i><br/>
<i>A venir : Australie, Grèce, Portugal, Suisse</i><br/>
</li><li>
<b>Une
expérience de livraison enrichie pour vos clients</b><font color="#ff0000"><b>
</b></font>avec le service Predict© vers 13 destinations :<br/>
<i>Allemagne, Autriche, Espagne, Estonie, Hongrie, Luxembourg,
Pays-Bas, Pologne, Portugal, République Tchèque, Royaume-Uni,
Slovaquie, Slovénie</i>
</li>
</ul>
<p><b>Notre
offre internationale est disponible dans votre contrat Colissimo
Entreprise sans surcoût. Alors, lancez-vous dès maintenant sur de
nouveaux pays !</b></p>
<h3>Une politique de retour innovante</h3>
<p>Le retour est devenu
un véritable levier de fidélisation et de satisfaction clients.
Afin de répondre à cette exigence du marché et mieux satisfaire
vos clients, Colissimo a développé une offre retour complète pour
la France et lInternational.
</p>
<p><b>En France</b>,
vous offrez un retour simplifié à vos clients et le choix du lieu
de dépôt parmi les points de dépôt disponibles : à La
Poste, en relais Pickup ou depuis une boite aux lettres personnelle.
</p>
<p><b>A
linternational</b>, vous gagnez la confiance de vos clients et
captez des parts de marché supplémentaires grâce à un retour de
produit en toute simplicité dans lun des 55 000 points de
dépôt (principalement des bureaux de poste locaux). Cette offre est
disponible depuis 18 pays européens : <i>Allemagne, Autriche,
Belgique, Espagne, Finlande, Irlande, Italie, Luxembourg, Pays-Bas,
Pologne, République Tchèque, Royaume-Uni, Slovaquie, Slovénie.</i></p>
<p><i>A venir :
Australie, Grèce, Portugal, Suisse. </i>
</p>
<p><b>EXCLUSIVITE
COLISSIMO : Le Retour en boîte aux lettres</b></p>
<p>Avec loffre
exclusive Colissimo Retour <i>en boite aux lettres</i>, <b>votre
client na plus besoin de se déplacer</b> ou dêtre présent
lors du passage du facteur. Il vous demande un retour et dépose son
colis dans sa boîte aux lettres personnelle avant 8h le lendemain.
La Poste soccupe du reste !
</p>
<h3>Votre outil de suivi <a href="http://www.colissimo.entreprise.laposte.fr/fr/ensavoirplus-coliview-fr?mn2=9" target="_blank">ColiView</a></h3>
<p>Avec <a href="http://www.colissimo.entreprise.laposte.fr/fr/ensavoirplus-coliview-fr?mn2=9" target="_blank"><b>ColiView</b></a>
vous disposez dun <b>outil en ligne pour suivre et piloter toutes
vos expéditions</b> : <br/>
<b>+ RAPIDE</b> : des recherches
simplifiées et un suivi détaillé en quelques clics<br/>
<b>+
ERGONOMIQUE</b> : une navigation intuitive, pour une utilisation
quotidienne de loutil<br/>
<b>+ COMPLET</b> : un seul outil
pour gérer et piloter lensemble de votre activité Colissimo<br/>
<b>+
SOUPLE</b> : une gestion en ligne de vos contacts avec le
Service Clients et une automatisation de certaines réclamations</p>
<h3>La solution Mobile</h3>
<p>Colissimo a mis
en place une solution Mobile clé en main afin que vous puissiez
proposer notre offre de livraison sur tous les supports dachat de
vos e-acheteurs et assurer ainsi la continuité de vos ventes.</p>
<p>Sur votre
back-office Colissimo, vous pourrez activer la solution par simple
validation des conditions générales dutilisation et paramétrer
laffichage de votre page de choix des modes de livraison sur votre
site ou application mobile, dans la rubrique « Applications
Livraisons Page de choix des modes de livraison Version Mobile »
</p>
<h3>Souscription aux offres Colissimo Entreprise</h3>
<p>Vous avez
une activité régulière denvoi de colis, et vous souhaitez
accéder aux offres de livraison Colissimo à domicile ou en
points retrait, ainsi quà nos solutions de retour dont
le Retour en boite aux lettres : vous pouvez souscrire à lOffre
Colissimo Entreprises sous contrat.</p>
<p><b>Comment
souscrire à nos services ?</b> Cest très simple, vous avez
deux possibilités :</p>
<ul>
<li>
Faire une
demande en ligne via notre <a href="https://www.colissimo.entreprise.laposte.fr/fr/contact" target="_blank"><b>formulaire contact</b></a><br/>
Un conseiller commercial vous contactera pour vous
accompagner dans le choix des solutions daffranchissement, de
livraison et de suivi qui correspondent à votre besoin.
</li><li>
Contacter
directement notre service commercial au <b>3634</b>
</li>
</ul>
<p>Notre solution de
livraison proposée par le module Simplicité est accessible à
partir de <b>1500€ de CA par an </b><u><b>sans frais de gestion</b></u>.
En-dessous de ce seuil, loffre reste accessible mais des frais de
gestion vous seront appliqués.</p>
</div>

View File

@ -0,0 +1,67 @@
{*
* 2010-2016 La Poste SA
*
* 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 modules-prestashop@laposte.fr 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 Quadra Informatique <modules@quadra-informatique.fr>
* @copyright 2010-2016 La Poste SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of La Poste SA
*}
<div class="panel">
<div class="row colissimo-header">
<div class="col-md-1 text-center logo">
<img src="{$module_dir|escape:'htmlall':'UTF-8'}views/img/colissimo.png" id="colissimo-logo" />
</div>
<div class="col-md-6 about">
<h4>{l s='About Socolissimo Simplicité' mod='socolissimo'} {$colissimo_version|escape:'htmlall':'UTF-8'}</h4>
Une solution gratuite sans développement, facile à implémenter depuis votre back-office Prestashop.
<ul>
<li>Une page de livraison « iframe » qui reste dans la continuité du site garantissant ainsi une continuité dans le processus dachat.</li>
<li>Un large choix de modes de livraison pour satisfaire vos e-acheteurs.</li>
<li>Un chiffre daffaires additionnel grâce à loffre Colissimo vers l'Europe</li>
<li>Un accès offert à un espace client dédié sur la « Colissimo Box » et à un outil de suivi de vos expéditions : ColiView.</li>
<li>Une version mobile du module pour assurer une complémentarité et un relai dachat tout au long de la journée. Vous captez ainsi des ventes supplémentaires grâce à votre présence multicanale.</li>
</ul>
<em class="text-muted small">
NB : Ce module sadresse aux marchands disposant dun numéro SIRET.
</em>
</div>
<div class="col-md-2 text-center subscribe">
<h5 class="text-branded">{l s='Subcribe to the Colissimo Simplicity offer' mod='socolissimo'}</h5>
{l s='By phone, Call' mod='socolissimo'}
<h4 class="text-branded">3634</h4>
{l s='By using our' mod='socolissimo'}<br/>
<h6><a href="https://www.colissimo.entreprise.laposte.fr/fr/contact" target="_blank">{l s='Contact formula' mod='socolissimo'}</a></h6>
</div>
<div class="col-md-3 text-center support">
<h4>{l s='Need support ?' mod='socolissimo'}</h4>
{l s='Don\'t hesitate to read the' mod='socolissimo'}
<h5><a href="{$module_dir|escape:'htmlall':'UTF-8'}/readme_fr.pdf" target="_blank"><b>{l s='Vendor manual' mod='socolissimo'}</b></a></h5>
{l s='to help you to configure the module' mod='socolissimo'}<br/>
<p>{l s='You can also call the Hotline at' mod='socolissimo'}<br/>
<strong class="text-branded">0825 086 005</strong><br/>
<em class="text-muted small">
{l s='Monday to Friday, from 8am to 6pm.' mod='socolissimo'}. <br/>
{l s='Say "Incident", and "Web Solutions" in the voice menu' mod='socolissimo'}
</em>
</p>
</div>
</div>
</div>

View File

@ -0,0 +1,33 @@
{*
* 2010-2016 La Poste SA
*
* 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 modules-prestashop@laposte.fr 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 Quadra Informatique <modules@quadra-informatique.fr>
* @copyright 2010-2016 La Poste SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of La Poste SA
*}
<div class="panel">
<div class="row colissimo-header">
<div class="col-md-12 text-center about">
<p>
<span class="alert">{l s='You must fill merchand information otherwise module won\'t work on front' mod='socolissimo'}</span>
</p>
</div>
</div>
</div>

View File

@ -0,0 +1,35 @@
<?php
/**
* 2010-2016 La Poste SA
*
* 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 modules-prestashop@laposte.fr 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 Quadra Informatique <modules@quadra-informatique.fr>
* @copyright 2010-2016 La Poste SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of La Poste 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;

View File

@ -0,0 +1,37 @@
{*
* 2010-2016 La Poste SA
*
* 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 modules-prestashop@laposte.fr 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 Quadra Informatique <modules@quadra-informatique.fr>
* @copyright 2010-2016 La Poste SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of La Poste SA
*}
{if isset($error_list)}
<div class="alert error">
{l s='Socolissimo errors list:' mod='socolissimo'}
<ul style="margin-top: 10px;">
{foreach from=$error_list item=current_error}
<li>{$current_error|escape:'htmlall':'UTF-8'}</li>
{/foreach}
</ul>
</div>
{/if}
{if isset($so_url_back)}
<a href="{$so_url_back|escape:'htmlall':'UTF-8'}step=2&cgv=1" class="button_small" title="{l s='Back' mod='socolissimo'}">{l s='Back' mod='socolissimo'}</a>
{/if}

View File

@ -0,0 +1,35 @@
<?php
/**
* 2010-2016 La Poste SA
*
* 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 modules-prestashop@laposte.fr 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 Quadra Informatique <modules@quadra-informatique.fr>
* @copyright 2010-2016 La Poste SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of La Poste 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;

View File

@ -0,0 +1,44 @@
{*
* 2010-2016 La Poste SA
*
* 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 modules-prestashop@laposte.fr 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 Quadra Informatique <modules@quadra-informatique.fr>
* @copyright 2010-2016 La Poste SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of La Poste SA
*}
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=iso-8859-1" />
</head>
<body onload="document.getElementById('socoForm').submit();">
<div style="width:320px;margin:0 auto;text-align:center;">
<form id="socoForm" name="form" action="{$socolissimo_url|escape:'htmlall':'UTF-8'}" method="POST">
{foreach from=$inputs key=key item=val}
<input type="hidden" name="{$key|escape:'htmlall':'UTF-8'}" value="{$val|escape:'htmlall':'UTF-8'}"/>
{/foreach}
<img src="{$logo|escape:'htmlall':'UTF-8'}" />
<p>{l s='You will be redirect to socolissimo in few moment. If it is not the case, please click button.' mod='socolissimo'}</p>
<p><img src="{$loader|escape:'htmlall':'UTF-8'}" /></p>
<input type="submit" value="Envoyer" />
</form>
</div>
</body>
</html>

View File

@ -0,0 +1,48 @@
{*
* 2010-2016 La Poste SA
*
* 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 modules-prestashop@laposte.fr 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 Quadra Informatique <modules@quadra-informatique.fr>
* @copyright 2010-2016 La Poste SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of La Poste SA
*}
<script type="text/javascript">
{literal}
$(document).ready(function() {
{/literal}
{foreach from=$ids item=id}
{literal}
$('.delivery_option').each(function( ) {
if ($(this).children('.delivery_option_radio').val() == '{/literal}{$id|escape:'htmlall':'UTF-8'}{literal},') {
$(this).remove();
}
if ($(this).find('input.delivery_option_radio').val() == '{/literal}{$id|escape:'htmlall':'UTF-8'}{literal},') {
$(this).remove();
}
});
{/literal}
{literal}
$('#id_carrier{/literal}{$id|escape:'htmlall':'UTF-8'}{literal}').parent().parent().remove();
{/literal}
{/foreach}
{literal}
});
{/literal}
</script>

View File

@ -0,0 +1,198 @@
{*
* 2010-2016 La Poste SA
*
* 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 modules-prestashop@laposte.fr 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 Quadra Informatique <modules@quadra-informatique.fr>
* @copyright 2010-2016 La Poste SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of La Poste SA
*}
<a href="#" style="display:none" class="fancybox fancybox.iframe" id="soLink"></a>
{if isset($opc) && $opc}
<script type="text/javascript">
var opc = true;
</script>
{else}
<script type="text/javascript">
var opc = false;
</script>
{/if}
{if isset($already_select_delivery) && $already_select_delivery}
<script type="text/javascript">
var already_select_delivery = true;
</script>
{else}
<script type="text/javascript">
var already_select_delivery = false;
</script>
{/if}
<script type="text/javascript">
var link_socolissimo = "{$link_socolissimo|escape:'UTF-8'}";
var soInputs = new Object();
var soCarrierId = "{$id_carrier|escape:'htmlall':'UTF-8'}";
var soSellerId = "{$id_carrier_seller|escape:'htmlall':'UTF-8'}";
var soToken = "{$token|escape:'htmlall':'UTF-8'}";
var initialCost_label = "{$initialCost_label|escape:'htmlall':'UTF-8'}";
var initialCost = "{$initialCost|escape:'htmlall':'UTF-8'}";
var taxMention = "{$taxMention|escape:'htmlall':'UTF-8'}";
var baseDir = '{$content_dir|escape:'htmlall':'UTF-8'}';
var rewriteActive = '{$rewrite_active|escape:'htmlall':'UTF-8'}';
{foreach from=$inputs item=input key=name name=myLoop}
soInputs.{$name|escape:'htmlall':'UTF-8'} = "{$input|strip_tags|addslashes}";
{/foreach}
{literal}
$('#soLink').fancybox({
'width': 590,
'height': 810,
'autoScale': true,
'centerOnScroll': true,
'autoDimensions': false,
'transitionIn': 'none',
'transitionOut': 'none',
'hideOnOverlayClick': false,
'hideOnContentClick': false,
'showCloseButton': true,
'showIframeLoading': true,
'enableEscapeButton': true,
'type': 'iframe',
onStart: function () {
$('#soLink').attr('href', link_socolissimo + serialiseInput(soInputs));
},
onClosed: function () {
$.ajax({
type: 'GET',
url: baseDir + '/modules/socolissimo/ajax.php',
async: false,
cache: false,
dataType: "json",
data: "token=" + soToken,
success: function (jsonData) {
if (jsonData && jsonData.answer && typeof jsonData.answer != undefined && !opc) {
if (jsonData.answer)
$('#form').submit();
else if (jsonData.msg.length)
alert(jsonData.msg);
}
},
error: function (XMLHttpRequest, textStatus, errorThrown) {
alert('TECHNICAL ERROR\nDetails:\nError thrown: ' + XMLHttpRequest + '\n' + 'Text status: ' + textStatus);
}
});
}
});
$(document).ready(function ()
{
var interval;
$('#soLink').attr('href', baseDir + 'modules/socolissimo/redirect.php' + serialiseInput(soInputs));
$('input.delivery_option_radio').each(function ()
{
if ($(this).val() == soCarrierId + ',') {
$(this).next().children().children().find('div.delivery_option_price').html(initialCost_label + '<br/>' + initialCost + taxMention);
// 1.6 themes
if ($(this).next().children('div.delivery_option_price').length == 0)
$(this).parents('tr').children('td.delivery_option_price').find('div.delivery_option_price').html(initialCost_label + '<br/>' + initialCost + taxMention);
}
});
if (soCarrierId)
so_click();
$('.delivery_option').each(function ( ) {
if ($(this).children('.delivery_option_radio').val() == '{/literal}{$id_carrier_seller|escape:'htmlall':'UTF-8'}{literal},') {
$(this).remove();
}
});
$('#id_carrier{/literal}{$id_carrier_seller|escape:'htmlall':'UTF-8'}{literal}').parent().parent().remove();
});
function so_click()
{
if (opc) {
if (!already_select_delivery || !$('#edit_socolissimo').length)
modifyCarrierLine();
}
else if (soCarrierId == 0) {
$('[name=processCarrier]').unbind('click').live('click', function () {
return true;
});
} else {
$('[name=processCarrier]').unbind('click').live('click', function () {
if (($('.delivery_option_radio:checked').val() == soSellerId + ',') ||
($('.delivery_option_radio:checked').val() == soCarrierId + ','))
{
if (acceptCGV()) {
$('#soLink').attr('href', link_socolissimo + serialiseInput(soInputs));
$("#soLink").trigger("click");
}
return false;
}
return true;
});
}
}
function modifyCarrierLine()
{
var carrier = $('input.delivery_option_radio:checked');
var container = '#id_carrier' + soCarrierId;
if ((carrier.val() == soCarrierId) || (carrier.val() == soCarrierId + ',')) {
carrier.next().children().children().find('div.delivery_option_delay').append('<div><a class="exclusive_large" id="button_socolissimo" href="#" onclick="redirect();return;" >{/literal}{$select_label|escape:'htmlall':'UTF-8'}{literal}</a></div>');
// 1.6 theme
carrier.parent().parent().parent().parent().find('td.delivery_option_price').before('<td><div><a class="exclusive_large" id="button_socolissimo" href="#" onclick="redirect();return;" style="text-align:center;" >{/literal}{$select_label|escape:'htmlall':'UTF-8'}{literal}</a></div></td>');
} else {
$('#button_socolissimo').remove();
}
if (already_select_delivery)
{
$(container).css('display', 'block');
$(container).css('margin', 'auto');
$(container).css('margin-top', '5px');
} else
$(container).css('display', 'none');
}
function redirect()
{
$('#soLink').attr('href', link_socolissimo + serialiseInput(soInputs));
$("#soLink").trigger("click");
return false;
}
function serialiseInput(inputs)
{
if (!rewriteActive)
var str = '&first_call=1&';
else
var str = '?first_call=1&';
for (var cle in inputs)
str += cle + '=' + inputs[cle] + '&';
return (str + 'gift=' + $('#gift').attr('checked') + '&gift_message=' + $('#gift_message').attr('value'));
}
{/literal}
</script>

View File

@ -0,0 +1,115 @@
{*
* 2010-2016 La Poste SA
*
* 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 modules-prestashop@laposte.fr 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 Quadra Informatique <modules@quadra-informatique.fr>
* @copyright 2010-2016 La Poste SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of La Poste SA
*}
<iframe id="soFr" xml:lang="fr" width="100%" height="800" style="border:none;display:none;"src=""></iframe>
<input id="hidden_cgv" type="hidden" value="{l s='Please accept the terms of service before the next step.' mod='socolissimo'}" />
<script type="text/javascript">
var opc = false;
</script>
{if isset($already_select_delivery) && $already_select_delivery}
<script type="text/javascript">
var already_select_delivery = true;
</script>
{else}
<script type="text/javascript">
var already_select_delivery = false;
</script>
{/if}
<script type="text/javascript">
var link_socolissimo = "{$link_socolissimo|escape:'UTF-8'}";
var soInputs = new Object();
var soCarrierId = "{$id_carrier|escape:'htmlall':'UTF-8'}";
var soToken = "{$token|escape:'htmlall':'UTF-8'}";
var initialCost_label = "{$initialCost_label|escape:'htmlall':'UTF-8'}";
var initialCost = "{$initialCost|escape:'htmlall':'UTF-8'}";
var taxMention = "{$taxMention|escape:'htmlall':'UTF-8'}";
var baseDir = '{$content_dir|escape:'htmlall':'UTF-8'}';
var rewriteActive = '{$rewrite_active|escape:'htmlall':'UTF-8'}';
{foreach from=$inputs item=input key=name name=myLoop}
soInputs.{$name|escape:'htmlall':'UTF-8'} = "{$input|strip_tags|addslashes}";
{/foreach}
{literal}
$(document).ready(function ()
{
$('.delivery_option').each(function ( ) {
if ($(this).children('.delivery_option_radio').val() == '{/literal}{$id_carrier_seller|escape:'htmlall':'UTF-8'}{literal},') {
$(this).remove();
}
});
$('#id_carrier{/literal}{$id_carrier_seller|escape:'htmlall':'UTF-8'}{literal}').parent().parent().remove();
$('input.delivery_option_radio').each(function ()
{
if ($(this).val() == soCarrierId + ',') {
$(this).next().children().children().find('div.delivery_option_price').html(initialCost_label + '<br/>' + initialCost + taxMention);
// 1.6 themes
if ($(this).next().children('div.delivery_option_price').length == 0)
$(this).parents('tr').children('td.delivery_option_price').find('div.delivery_option_price').html(initialCost_label + '<br/>' + initialCost + taxMention);
}
});
$("#form").submit(function () {
if (($('#id_carrier' + soCarrierId).is(':checked')) || ($('.delivery_option_radio:checked').val() == soCarrierId + ','))
{
if (acceptCGV(($('#hidden_cgv').val()))) {
$('div.delivery_options_address h3').css('display', 'none');
$('div.delivery_options').css('display', 'none');
// common zone
$('h3.condition_title').css('display', 'none');
$('p.checkbox').css('display', 'none');
$('h3.carrier_title').css('display', 'none');
$('h3.gift_title').css('display', 'none');
$('#gift_div').css('display', 'none');
$('p.cart_navigation').css('display', 'none');
$('#soFr').css('display', 'block');
$('#soFr').attr('src', link_socolissimo + serialiseInput(soInputs));
}
return false;
}
return true;
});
});
function serialiseInput(inputs) {
if (!rewriteActive)
var str = '&first_call=1&';
else
var str = '?first_call=1&';
for (var cle in inputs)
str += cle + '=' + inputs[cle] + '&';
return (str + 'gift=' + $('#gift').attr('checked') + '&gift_message=' + $('#gift_message').attr('value'));
}
{/literal}
</script>

View File

@ -0,0 +1,79 @@
{*
* 2010-2016 La Poste SA
*
* 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 modules-prestashop@laposte.fr 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 Quadra Informatique <modules@quadra-informatique.fr>
* @copyright 2010-2016 La Poste SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of La Poste SA
*}
<script type="text/javascript">
var link_socolissimo = "{$link_socolissimo|escape:'UTF-8'}";
var soInputs = new Object();
var initialCost_label = "{$initialCost_label|escape:'htmlall':'UTF-8'}";
var initialCost = "{$initialCost|escape:'htmlall':'UTF-8'}";
var soCarrierId = "{$id_carrier|escape:'htmlall':'UTF-8'}";
var taxMention = "{$taxMention|escape:'htmlall':'UTF-8'}";
var baseDir = '{$content_dir|escape:'htmlall':'UTF-8'}';
var rewriteActive = '{$rewrite_active|escape:'htmlall':'UTF-8'}';
{foreach from=$inputs item=input key=name name=myLoop}
soInputs.{$name|escape:'htmlall':'UTF-8'} = "{$input|strip_tags|addslashes}";
{/foreach}
{literal}
$(document).ready(function () {
$('.delivery_option').each(function ( ) {
if ($(this).children('.delivery_option_radio').val() == '{/literal}{$id_carrier_seller|escape:'htmlall':'UTF-8'}{literal},') {
$(this).remove();
}
});
$('#id_carrier{/literal}{$id_carrier_seller|escape:'htmlall':'UTF-8'}{literal}').parent().parent().remove();
$($('#carrierTable input#id_carrier' + soCarrierId).parent().parent()).find('.carrier_price .price').html(initialCost_label + '<br/>' + initialCost);
$($('#carrierTable input#id_carrier' + soCarrierId).parent().parent()).find('.carrier_price').css('white-space', 'nowrap');
$('input.delivery_option_radio').each(function () {
if ($(this).val() == soCarrierId + ',') {
$(this).next().children().children().find('div.delivery_option_price').html(initialCost_label + '<br/>' + initialCost + taxMention);
// 1.6 themes
if ($(this).next().children('div.delivery_option_price').length == 0)
$(this).parents('tr').children('td.delivery_option_price').find('div.delivery_option_price').html(initialCost_label + '<br/>' + initialCost + taxMention);
}
});
$("#form").submit(function () {
if ($("input[name*='delivery_option[']:checked").val().replace(",", "") == soCarrierId)
$('#form').attr('action', link_socolissimo + serialiseInput(soInputs));
});
});
function serialiseInput(inputs) {
if (!rewriteActive)
var str = '&first_call=1&';
else
var str = '?first_call=1&';
for (var cle in inputs)
str += cle + '=' + inputs[cle] + '&';
return (str + 'gift=' + $('#gift').attr('checked') + '&gift_message=' + $('#gift_message').attr('value'));
}
{/literal}
</script>

View File

@ -0,0 +1,74 @@
{*
* 2010-2016 La Poste SA
*
* 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 modules-prestashop@laposte.fr 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 Quadra Informatique <modules@quadra-informatique.fr>
* @copyright 2010-2016 La Poste SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of La Poste SA
*}
<script type="text/javascript">
var link_socolissimo = "{$link_socolissimo_mobile|escape:'UTF-8'}";
var soInputs = new Object();
var initialCost_label = "{$initialCost_label|escape:'htmlall':'UTF-8'}";
var initialCost = "{$initialCost|escape:'htmlall':'UTF-8'}";
var soCarrierId = "{$id_carrier|escape:'htmlall':'UTF-8'}";
var taxMention = "{$taxMention|escape:'htmlall':'UTF-8'}";
var baseDir = '{$content_dir|escape:'htmlall':'UTF-8'}';
var rewriteActive = '{$rewrite_active|escape:'htmlall':'UTF-8'}';
{foreach from=$inputs item=input key=name name=myLoop}
soInputs.{$name|escape:'htmlall':'UTF-8'} = "{$input|strip_tags|addslashes}";
{/foreach}
{literal}
$(document).ready(function () {
$('input.delivery_option_radio').each(function () {
if ($(this).val() == soCarrierId + ',') {
$(this).next().children().children().find('div.delivery_option_price').html(initialCost_label + '<br/>' + initialCost + taxMention);
// 1.6 themes
if ($(this).next().children('div.delivery_option_price').length == 0)
$(this).parents('tr').children('td.delivery_option_price').find('div.delivery_option_price').html(initialCost_label + '<br/>' + initialCost + taxMention);
}
});
$("#form").submit(function () {
if ($("input[name*='delivery_option[']:checked").val().replace(",", "") == soCarrierId)
$('#form').attr('action', link_socolissimo + serialiseInput(soInputs));
});
});
function serialiseInput(inputs) {
if (!rewriteActive)
var str = '&first_call=1&';
else
var str = '?first_call=1&';
for (var cle in inputs)
str += cle + '=' + inputs[cle] + '&';
return (str + 'gift=' + $('#gift').attr('checked') + '&gift_message=' + $('#gift_message').attr('value'));
}
{/literal}
</script>
{foreach from=$inputs item=input key=name name=myLoop}
<input type="hidden" name="{$name|escape:'htmlall':'UTF-8'}" value="{$input|strip_tags|escape:'htmlall'}"/>
{/foreach}

View File

@ -0,0 +1,119 @@
{*
* 2010-2016 La Poste SA
*
* 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 modules-prestashop@laposte.fr 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 Quadra Informatique <modules@quadra-informatique.fr>
* @copyright 2010-2016 La Poste SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of La Poste SA
*}
{if isset($already_select_delivery) && $already_select_delivery}
<script type="text/javascript">
var already_select_delivery = true;
</script>
{else}
<script type="text/javascript">
var already_select_delivery = false;
</script>
{/if}
<form id="socoForm" name="form" action="" method="POST">
{foreach from=$inputs key=key item=val}
<input type="hidden" name="{$key|escape:'htmlall':'UTF-8'}" value="{$val|escape:'htmlall':'UTF-8'}"/>
{/foreach}
</form>
<script type="text/javascript">
var link_socolissimo = "{$link_socolissimo_mobile|escape:'UTF-8'}";
var soInputs = new Object();
var soCarrierId = "{$id_carrier|escape:'htmlall':'UTF-8'}";
var soSellerId = "{$id_carrier_seller|escape:'htmlall':'UTF-8'}";
var soToken = "{$token|escape:'htmlall':'UTF-8'}";
var initialCost_label = "{$initialCost_label|escape:'htmlall':'UTF-8'}";
var initialCost = "{$initialCost|escape:'htmlall':'UTF-8'}";
var taxMention = "{$taxMention|escape:'htmlall':'UTF-8'}";
var baseDir = '{$content_dir|escape:'htmlall':'UTF-8'}';
var rewriteActive = '{$rewrite_active|escape:'htmlall':'UTF-8'}';
{foreach from=$inputs item=input key=name name=myLoop}
soInputs.{$name|escape:'htmlall':'UTF-8'} = "{$input|strip_tags|addslashes}";
{/foreach}
{literal}
$(document).ready(function ()
{
var interval;
$('input.delivery_option_radio').each(function ()
{
if ($(this).val() == soCarrierId + ',') {
$(this).next().children().children().find('div.delivery_option_price').html(initialCost_label + '<br/>' + initialCost + taxMention);
// 1.6 themes
if ($(this).next().children('div.delivery_option_price').length == 0)
$(this).parents('tr').children('td.delivery_option_price').find('div.delivery_option_price').html(initialCost_label + '<br/>' + initialCost + taxMention);
}
});
if (soCarrierId)
so_click();
});
function so_click()
{
if (!already_select_delivery || !$('#edit_socolissimo').length)
modifyCarrierLine();
}
function modifyCarrierLine()
{
var carrier = $('input.delivery_option_radio:checked');
if ((carrier.val() == soCarrierId) || (carrier.val() == soCarrierId + ',')) {
carrier.parent().parent().parent().parent().find('.order_carrier_logo').after('<div><a class="exclusive_large" id="button_socolissimo" href="#" onclick="redirect();return;" style="text-align:center;" >{/literal}{$select_label|escape:'htmlall':'UTF-8'}{literal}</a></div>');
} else {
$('#button_socolissimo').remove();
}
}
function redirect()
{
$('#socoForm').attr('action', link_socolissimo + serialiseInput(soInputs));
$('#socoForm').submit();
return false;
}
function serialiseInput(inputs)
{
if (!rewriteActive)
var str = '&first_call=1&';
else
var str = '?first_call=1&';
for (var cle in inputs)
str += cle + '=' + inputs[cle] + '&';
return (str + 'gift=' + $('#gift').attr('checked') + '&gift_message=' + $('#gift_message').attr('value'));
}
{/literal}
</script>

View File

@ -0,0 +1,35 @@
<?php
/**
* 2010-2016 La Poste SA
*
* 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 modules-prestashop@laposte.fr 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 Quadra Informatique <modules@quadra-informatique.fr>
* @copyright 2010-2016 La Poste SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of La Poste 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;

View File

@ -35,20 +35,18 @@ class FrontController extends FrontControllerCore
parent::setMedia();
$this->addCSS(_THEME_CSS_DIR_.'global2.css', 'all');
}
/*public function init(){
if (class_exists('Mobile_Detect')) {
$mobile = new Mobile_Detect();
if($mobile->isMobile() && !$mobile->isTablet() && $_SERVER['REMOTE_ADDR'] != "88.120.248.124" && $_SERVER['REMOTE_ADDR'] != "88.120.249.228"){
Tools::redirect('http://m.privilegedemarque.com');
}
}
parent::init();
}*/
public function init(){
public function init()
{
// Detection provenance campagne email depuis mobile et non connecté
if ($this->context->getMobileDevice() && !Customer::isLogged()){
$popup = Tools::getValue('popup');
$source = Tools::getValue('source');
if ($popup == 1 && !empty($source)) {
Tools::redirect($this->context->link->getPageLink('authentication', true).'?create_account=1');
}
}
if (isset($this->context->cookie->account_created))
$this->context->smarty->assign('customer', $this->context->customer);
if (isset($this->context->cookie->just_logged_in)) {
@ -88,10 +86,9 @@ class FrontController extends FrontControllerCore
);
$this->context->smarty->assign('popup_free_shipping', false);
$this->context->smarty->assign('homebg_active', Configuration::get('PRIVATESALES_HOME_BG'));
if(in_array($page_name, $array_page_name_popup_shipping)
&& false) //DESACTIVE
{
$cookie_name_popup_shipping = 'p-fsh';
if(in_array($page_name, $array_page_name_popup_shipping) && false) //DESACTIVE
{
$cookie_name_popup_shipping = 'p-fsh';
if(!isset($_COOKIE[$cookie_name_popup_shipping])
&& !Validate::isLoadedObject($this->context->customer))
{
@ -124,8 +121,8 @@ class FrontController extends FrontControllerCore
if(count($errors) == 0)
{
$res = Db::getInstance()->execute('UPDATE '._DB_PREFIX_.'customer
SET
$res = Db::getInstance()->execute('UPDATE '._DB_PREFIX_.'customer
SET
passwd = "'.pSQL(Tools::encrypt($password)).'",
pro_update = 1
WHERE id_customer = '.$this->context->customer->id);
@ -148,7 +145,7 @@ class FrontController extends FrontControllerCore
$error_popup = false;
if( $this->context->customer->firstname == 'Membre' && $this->context->customer->lastname == 'Privilégié' && $page_name == "order"){
$launch_popup = true;
}
}
if(Tools::isSubmit('SubmitChangeName')){
$launch_popup = true;
$error_popup = true;

View File

@ -2481,7 +2481,7 @@ label{
.container-menu ul.sf-menu.menu-content > li:nth-child(2) > a {
color: #ef5149;
}
.container-menu ul.sf-menu.menu-content > li:nth-child(2) > a:before {
/*.container-menu ul.sf-menu.menu-content > li:nth-child(2) > a:before {
bottom: 8px;
content: "en vrac";
font-family: "Journal";
@ -2490,7 +2490,7 @@ label{
position: absolute;
right: 8px;
text-transform: none;
}
}*/
.container-menu ul.sf-menu.menu-content > li:first-child a{
font-weight: bold;
padding-bottom: 18px;

View File

@ -302,171 +302,140 @@
<div class="popup_overlay" style="display: none;"></div>
<script type="text/javascript">
var nom = "{l s='Votre nom est manquant'}";
var prenom = "{l s='Votre prénom est manquant'}";
var mdp = "{l s='Votre mot de passe est manquant'}";
var mdp2 = "{l s='Votre mot de passe est trop court'}";
var mail = "{l s='Votre adresse email est manquante'}";
var newsletter = "{l s='Acceptez les conditions générales d\'utilisations'}";
</script>
<script type="text/javascript">
{if !isset($cookie->isAccountExists) || $cookie->isAccountExists == "0"}
//var timer = setTimeout( showPopupWelcome, 1000);
{/if}
{literal}
var open = false;
function showPopupWelcome(){
if(!open){
$('.popup_overlay').fadeIn(100);
$('.popup_welcome').fadeIn(250);
open = true;
}
}
$(document).ready(function() {
if(mobilecheck()==false){
$(function(){
$('a.loggin_button').on('touchstart', function(e){
e.stopPropagation();
e.preventDefault();
alert("Clicked");
});
});
$("div.product-container").attr('onclick', '');
$("div.sale_desc").attr('onclick', '');
$("div.sale_container").attr('onclick', '');
$(".sale, .sale a.button-grey, div.product-container, div.product-container a, div.product-container a.button-grey, .breadcrumb a, a.back_, a.back_sale,#category #header_logo a,#category #block_top_menu ul li:first-child,#product #header_logo a,#product #block_top_menu ul li:first-child, a.loggin_button, .slide-home a").on('click touchstart', function(e) {
e.stopPropagation();
var href = '/';
if(typeof $(this).attr('href') != 'undefined') {
href = $(this).attr('href');
}
else {
if($(this).find('a.button-grey').size() > 0) {
href = $(this).find('a.button-grey').attr('href');
}
}
$('.privatesales_popup_connection').find('input[name=back]').val(href);
$('.popup_overlay').fadeIn(100);
$('.privatesales_popup_connection').fadeIn(250);
return false;
});
/*$('li.modalbox').unbind('click').click(function(){
$('.popup_overlay').fadeIn(100);
$('.privatesales_popup_connection').fadeIn(250);
});*/
{/literal}{if !isset($smarty.get.popup) && !isset($smarty.get.source)}{literal}
$('.popup_overlay').on('click touchstart', function(){
$(this).fadeOut(100);
$('.privatesales_popup_connection').fadeOut(100);
$('.popup_welcome').fadeOut(100);
open = false;
});
$('.close_popup').click(function(){
$('.popup_overlay').fadeOut(100);
$('.popup_welcome').fadeOut(100);
open = false;
return false;
});
{/literal}{/if}{literal}
{/literal}{if isset($smarty.get.popup)}{literal}
$(".loggin_button").trigger("click");
$(".to_step_create").trigger("click");
{/literal}{if $smarty.get.source}{literal}
$("#referralprogram").val("{/literal}{$smarty.get.source|replace:' ':'+'}{literal}");
var href_link_conditions = $("#link_conditions").attr('href');
$("#link_conditions").attr('href', href_link_conditions + '?content_only=1');
{/literal}{/if}{literal}
{/literal}{/if}{literal}
var nom = "{l s='Votre nom est manquant'}";
var prenom = "{l s='Votre prénom est manquant'}";
var mdp = "{l s='Votre mot de passe est manquant'}";
var mdp2 = "{l s='Votre mot de passe est trop court'}";
var mail = "{l s='Votre adresse email est manquante'}";
var newsletter = "{l s='Acceptez les conditions générales d\'utilisations'}";
{literal}
var open = false;
function showPopupWelcome(){
if(!open){
$('.popup_overlay').fadeIn(100);
$('.popup_welcome').fadeIn(250);
open = true;
}
}
$(document).ready(function() {
if(mobilecheck()==false){
$('a.loggin_button').on('touchstart', function(e){
e.stopPropagation();
e.preventDefault();
});
$("div.product-container").attr('onclick', '');
$("div.sale_desc").attr('onclick', '');
$("div.sale_container").attr('onclick', '');
$(".sale, .sale a.button-grey, div.product-container, div.product-container a, div.product-container a.button-grey, .breadcrumb a, a.back_, a.back_sale,#category #header_logo a,#category #block_top_menu ul li:first-child,#product #header_logo a,#product #block_top_menu ul li:first-child, a.loggin_button, .slide-home a").on('click touchstart', function(e) {
e.stopPropagation();
var href = '/';
if(typeof $(this).attr('href') != 'undefined') {
href = $(this).attr('href');
}
else {
$(".sale a.button-grey, div.product-container a, div.product-container a.button-grey, .breadcrumb a, a.back_, a.back_sale,#category #header_logo a,#category #block_top_menu ul li:first-child,#product #header_logo a,#product #block_top_menu ul li:first-child, a.loggin_button, .slide-home a").on('click touchstart', function(e) {
e.stopPropagation();
var href = '/';
if(typeof $(this).attr('href') != 'undefined') {
href = $(this).attr('href');
}
else {
if($(this).find('a.button-grey').size() > 0) {
href = $(this).find('a.button-grey').attr('href');
}
}
$(location).attr('href',"{/literal}{$base_dir}ventes-privees{literal}");
return false;
});
}
});
$(".nextStep").bind( "click", function() {
var error = false;
if(!$('#customer_firstname').val()){
$('.error.firstname').html(prenom);
$('.error.firstname').show();
error = true;
}
if(!$('#customer_lastname').val()){
$('.error.lastname').html(nom);
$('.error.lastname').show();
error = true;
}
if(!$('#email').val()){
$('.error.email').html(mail);
$('.error.email').show();
error = true;
}
if(!$('#passwd').val()){
$('.error.password').html(mdp);
$('.error.password').show();
error = true;
}else{
var pass = $('#passwd').val();
if(pass.length < 6){
$('.error.password').html(mdp2);
$('.error.password').show();
error = true;
if($(this).find('a.button-grey').size() > 0) {
href = $(this).find('a.button-grey').attr('href');
}
}
if(!error){
$('.create_account .error').hide();
$(".step_1").hide();
$(".step_login").hide();
$(".step_2").show();
}
$('.privatesales_popup_connection').find('input[name=back]').val(href);
$('.popup_overlay').fadeIn(100);
$('.privatesales_popup_connection').fadeIn(250);
return false;
});
{/literal}{if !isset($smarty.get.popup) && !isset($smarty.get.source)}{literal}
$('.popup_overlay').on('click touchstart', function(){
$(this).fadeOut(100);
$('.privatesales_popup_connection').fadeOut(100);
$('.popup_welcome').fadeOut(100);
open = false;
});
$('.close_popup').click(function(){
$('.popup_overlay').fadeOut(100);
$('.popup_welcome').fadeOut(100);
open = false;
return false;
});
{/literal}{/if}{literal}
$("#submitAccount2").bind( "click", function() {
var error = false;
if(!$('#newsletter').is(':checked')){
$('.error.newsletter').html(newsletter);
$('.error.newsletter').show();
error = true;
}
if(!error){
$("#submitAccount").trigger("click");
}
{/literal}{if isset($smarty.get.popup)}{literal}
$(".loggin_button").trigger("click");
$(".to_step_create").trigger("click");
{/literal}{if $smarty.get.source}{literal}
$("#referralprogram").val("{/literal}{$smarty.get.source|replace:' ':'+'}{literal}");
var href_link_conditions = $("#link_conditions").attr('href');
$("#link_conditions").attr('href', href_link_conditions + '?content_only=1');
{/literal}{/if}{literal}
{/literal}{/if}{literal}
}
else {
$(".sale a.button-grey, div.product-container a, div.product-container a.button-grey, .breadcrumb a, a.back_, a.back_sale, #category #header_logo a,#category #block_top_menu ul li:first-child,#product #header_logo a,#product #block_top_menu ul li:first-child, a.loggin_button, .slide-home a").on('click touchstart', function(e) {
e.stopPropagation();
$(location).attr('href',"{/literal}{$base_dir}ventes-privees?create_account=1{literal}");
return false;
});
$(".to_step_login").bind( "click", function(e) {
e.preventDefault();
$(".login_form").show();
$(".create_form").hide();
});
$(".to_step_create").bind( "click", function(e) {
e.preventDefault();
$(".login_form").hide();
$(".create_form").show();
});
{/literal}
</script>
}
});
$(".nextStep").bind( "click", function() {
var error = false;
if(!$('#customer_firstname').val()){
$('.error.firstname').html(prenom);
$('.error.firstname').show();
error = true;
}
if(!$('#customer_lastname').val()){
$('.error.lastname').html(nom);
$('.error.lastname').show();
error = true;
}
if(!$('#email').val()){
$('.error.email').html(mail);
$('.error.email').show();
error = true;
}
if(!$('#passwd').val()){
$('.error.password').html(mdp);
$('.error.password').show();
error = true;
}else{
var pass = $('#passwd').val();
if(pass.length < 6){
$('.error.password').html(mdp2);
$('.error.password').show();
error = true;
}
}
if(!error){
$('.create_account .error').hide();
$(".step_1").hide();
$(".step_login").hide();
$(".step_2").show();
}
});
$("#submitAccount2").bind( "click", function() {
var error = false;
if(!$('#newsletter').is(':checked')){
$('.error.newsletter').html(newsletter);
$('.error.newsletter').show();
error = true;
}
if(!error){
$("#submitAccount").trigger("click");
}
});
$(".to_step_login").bind( "click", function(e) {
e.preventDefault();
$(".login_form").show();
$(".create_form").hide();
});
$(".to_step_create").bind( "click", function(e) {
e.preventDefault();
$(".login_form").hide();
$(".create_form").show();
});
{/literal}
</script>
{/if}
{if (isset($popup_free_shipping) && $popup_free_shipping === true)}
<style type='text/css'>
@ -637,13 +606,11 @@
<script type="text/javascript">
window.mobilecheck = function() { var check = false; (function(a,b){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0,4)))check = true})(navigator.userAgent||navigator.vendor||window.opera); return check; }
if(mobilecheck()==false){
console.log("mobile");
(function() {
var idz = document.createElement('script'); idz.type = 'text/javascript'; idz.async = true;
idz.src = document.location.protocol + "//livechat.iadvize.com/iadvize.js?sid=14713";
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(idz, s);
})();
}
</script>
{/literal}

View File

@ -81,38 +81,20 @@
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
<![endif]-->
{*{literal}
<script>(function() {
var _fbq = window._fbq || (window._fbq = []);
if (!_fbq.loaded) {
var fbds = document.createElement('script');
fbds.async = true;
fbds.src = '//connect.facebook.net/en_US/fbds.js';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(fbds, s);
_fbq.loaded = true;
}
_fbq.push(['addPixelId', '400077940140529']);
})();
window._fbq = window._fbq || [];
window._fbq.push(['track', 'PixelInitialized', {}]);
</script>
{/literal}*}
<!-- Facebook Pixel Code -->
{literal}
<script>
!function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n;
n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window,
document,'script','//connect.facebook.net/en_US/fbevents.js');
fbq('init', '1632642126990378');
fbq('track', 'PageView');
!function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n;
n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window,
document,'script','//connect.facebook.net/en_US/fbevents.js');
fbq('init', '1632642126990378');
fbq('track', 'PageView');
</script>
{/literal}
<!-- <noscript><img height="1" width="1" alt="" style="display:none" src="https://www.facebook.com/tr?id=400077940140529&amp;ev=PixelInitialized" /></noscript>
-->
<noscript><img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=1632642126990378&ev=PageView&noscript=1"/></noscript>
<!-- Google Tag Manager : customer data layer -->
<script>
@ -281,16 +263,17 @@
{/if}
</script>
<!-- End Google Tag Manager : customer data layer -->
{literal}
<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
<script>
(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-M7DXWP');</script>
})(window,document,'script','dataLayer','GTM-M7DXWP');
</script>
<!-- End Google Tag Manager -->
{/literal}
@ -304,8 +287,7 @@
{/literal}
{elseif $page_name == 'product'}
{literal}
<script type="text/javascript">
<script type="text/javascript">
fbq('track', 'ViewContent', {
content_name:"{/literal}{$product->name|escape:'html':'UTF-8'}{literal}",
content_ids:['{/literal}{$product->id}{literal}'],
@ -320,12 +302,9 @@
{/if}
<body{if isset($page_name)} id="{$page_name|escape:'html':'UTF-8'}"{/if} class="{if isset($page_name)}{$page_name|escape:'html':'UTF-8'}{/if}{if isset($body_classes) && $body_classes|@count} {implode value=$body_classes separator=' '}{/if}{if $hide_left_column} hide-left-column{/if}{if $hide_right_column} hide-right-column{/if}{if isset($content_only) && $content_only} content_only{/if} lang_{$lang_iso} {if !$logged}unlogged{/if}">
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M7DXWP"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
<noscript><img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=1632642126990378&amp;ev=PageView&amp;noscript=1"/></noscript>
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M7DXWP" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
{if !isset($content_only) || !$content_only}
{if isset($restricted_country_mode) && $restricted_country_mode}
@ -336,8 +315,7 @@
<div id="fb-root"></div>
{literal}
<script>
(function(d, s, id) {
(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
@ -361,9 +339,6 @@
{/if}
<!-- Traccking affilnet END -->
<div id="page">
<div class="header-container">
<header id="header">

View File

@ -751,7 +751,7 @@ $_LANG['product_26f5a22330a8d5d32c87e6a4c7f3de95'] = 'Jusqu\'à';
$_LANG['product_28a623fd7e9d81936b562dc5241a16a7'] = 'Ce produit n\'existe pas dans cette déclinaison. Vous pouvez néanmoins en sélectionner une autre.';
$_LANG['product_2d0f6b8300be19cf35e89e66f0677f95'] = 'Ajouter au panier';
$_LANG['product_3601146c4e948c32b6424d2c0a7f0118'] = 'Prix';
$_LANG['product_374689becdae1fa1a84e42f8eac042cd'] = 'Livraison gratuite à partir de 79€ TTC dachat';
$_LANG['product_374689becdae1fa1a84e42f8eac042cd'] = ' Aujourd\'hui livraison gratuite chez vous et en point relais à partir de 49€ TTC';
$_LANG['product_3b6d056ac93fc7b1947c3bc2ce720aaf'] = 'Veuillez remplir tous les champs, puis enregistrer votre personnalisation';
$_LANG['product_3d0d1f906e27800531e054a3b6787b7c'] = 'Quantité : ';
$_LANG['product_441ca5553df52b87e87513c6b88927d3'] = 'd\'éco-participation';

View File

@ -0,0 +1,28 @@
{if $slides|@count > 0}
<div class="row slider-ctn">
{*desktop*}
<div id="slider_home" class="clearfix snotmobile">
<div class="clearfix owl">
{foreach from=$slides item=slide key=key name=slider}
<div class="col-sm-12 slide-home item" style="height:300px;background: url('{$img_ps_dir}slider/{$slide.id_slide}.jpg') no-repeat left top; background-size: 100% auto;">
{if isset($slide.url) && $slide.url}
<a href="{$slide.url}" style="width:100%;height: 100%;display: block;" {if isset($slide.title) && $slide.title}title="{$slide.title}"{/if}></a>
{/if}
</div>
{/foreach}
</div>
</div>
{*mobile*}
<div id="slider_home_mobile" class="clearfix smobile">
<div class="clearfix owl">
{foreach from=$slides item=slide key=key name=slider}
<div class="col-sm-12 slide-home item" style="height:200px;background: url('{$img_ps_dir}slider/{$slide.id_slide}-mobile.jpg') no-repeat center top; background-size: contain;">
{if isset($slide.url) && $slide.url}
<a {if !$cookie->logged}onclick="window.location.href='{$link->getPageLink('authentication', true)|escape:'html':'UTF-8'}';"{else}href="{$slide.url}"{/if} style="width:100%;height: 100%;display: block;" {if isset($slide.title) && $slide.title}title="{$slide.title}"{/if}></a>
{/if}
</div>
{/foreach}
</div>
</div>
</div>
{/if}

View File

@ -45,14 +45,15 @@
</a>
</div>
{if $privatesale->imagelogo}
{capture name=img_sale}
{$link_img}{$privatesale->id}/logo/{$privatesale->id}_{$cookie->id_lang}.jpg
{/capture}
<div class="imagelogo">
{if $privatesale->imagelogo}
{/capture}
<div class="imagelogo">
<img src="{$smarty.capture.img_sale}"/>
{/if}
</div>
{/if}
<div class="snotmobile">
{if $category->description}
{$category->description}

View File

@ -52,39 +52,14 @@ $(document).ready(function() {
<div class="carrier_discount_ctn">
<p>{l s='LIVRAISON GRATUITE' mod='privatesales'|escape:'html':'UTF-8'}<span>{l s='à partir de 79€ ttc en Point Relais' mod='privatesales'|escape:'html':'UTF-8'}</span><p>
</div>
<h3 class="sale-title-type col-xs-12 smobile"><span>{l s='Nos ventes en cours' mod='privatesales'}</span></h3>
<h3 class="sale-title-type col-xs-12 smobile"><span>{l s='Nos ventes en cours' mod='privatesales'}</span></h3>
{if $currentsales|count > 0}
<div class="privatesales-slider">
{hook h='displaySlider' mod='advslider'}
</div>
{assign var=i value=0}
{foreach $currentsales as $sale}
{if isset($slider_active) && $slider_active && ($currentsales|count == 1 || $i == 0)}
<div class="row slider-ctn">
{*desktop*}
<div id="slider_home" class="clearfix snotmobile">
<div class="clearfix owl">
{foreach from=$slider item=slide key=key name=slider}
<div class="col-sm-12 slide-home item " {if isset($slide.img) && $slide.img!='slider/slider_{$key}_.png'}style="height:300px;background: url('{$img_dir}{$slide.img}') no-repeat left top; background-size: 100% auto;"{/if}>
{if isset($slide.link) && $slide.link}
<a class="" href="{$slide.link}" style="width:100%;height: 100%;display: block;" {if isset($slide.title) && $slide.title}title="{$slide.title}"{/if}></a>
{/if}
</div>
{/foreach}
</div>
</div>
{*mobile*}
<div id="slider_home_mobile" class="clearfix smobile">
<div class="clearfix owl">
{foreach from=$slider item=slide key=key name=slider}
<div class="col-sm-12 slide-home item" {if isset($slide.img_mobile) && $slide.img_mobile!='slider/slider_{$key}_.png'}style="height:200px;background: url('{$img_dir}{$slide.img_mobile}') no-repeat center top; background-size: contain;"{/if}>
{if isset($slide.link) && $slide.link}
<a class="" {if !$cookie->logged}onclick="window.location.href='{$link->getPageLink('authentication', true)|escape:'html':'UTF-8'}';"{else}href="{$slide.link}"{/if} style="width:100%;height: 100%;display: block;" {if isset($slide.title) && $slide.title}title="{$slide.title}"{/if}></a>
{/if}
</div>
{/foreach}
</div>
</div>
</div>
{/if}
{foreach $currentsales as $sale}
{capture name=img_sale}{$base_dir}{$link_img}{$sale->id}/current/{$sale->id}_{$cookie->id_lang}.jpg{/capture}
{if !$sale->news}
{if strtotime($sale->date_end) < (strtotime(date('Y-m-d H:i:s')) + (3600 * 24 * 2))}
@ -92,7 +67,7 @@ $(document).ready(function() {
{else}
<div class="sale {if $sale->univers}sale_univers{/if} {if $i == 0}first{/if}" id="sale_{$sale->id}" >
{/if}
<div class="sale_container clearfix" {if isset($sales_mobile) && $sales_mobile && !$cookie->logged}onclick="window.location.href='{$link->getPageLink('authentication', true)|escape:'html':'UTF-8'}';"{/if}>
<div class="sale_container clearfix"{if isset($sales_mobile) && $sales_mobile && !$cookie->logged} onclick="window.location.href='{$link->getPageLink('authentication', true)|escape:'html':'UTF-8'}?create_account=1';"{/if}>
{if $sale->concours && strtotime($sale->date_start) >= {mktime(strftime('%H') - $sale->concours_delay)}}
<div class="picto-concours">
<a href="{$sale->link}"></a>
@ -154,7 +129,7 @@ $(document).ready(function() {
{else}
<div class="sale {if isset($sale->news) && $sale->news}is_news{/if} {if $sale->univers}sale_univers{/if} {if $i == 0}first{/if}" id="sale_{$sale->id}">
{/if}
<div class="sale_container clearfix" {if $sales_mobile && !$cookie->logged}onclick="window.location.href='{$link->getPageLink('authentication', true)|escape:'html':'UTF-8'}';"{/if} style="{if $sale->image}background : url('{$smarty.capture.img_sale}') no-repeat 0 0 / 230% 100% {/if}">
<div class="sale_container clearfix"{if $sales_mobile && !$cookie->logged} onclick="window.location.href='{$link->getPageLink('authentication', true)|escape:'html':'UTF-8'}?create_account=1';"{/if} style="{if $sale->image}background : url('{$smarty.capture.img_sale}') no-repeat 0 0 / 230% 100% {/if}">
{if $sale->image}<img class="img_sale snotmobile" src="{$smarty.capture.img_sale}" />{/if}
<div class="snotmobile new-block clearfix" {if !$sale->univers && $cookie->logged}onclick="window.location.href='{$sale->link}';"{/if} >