Initial commit

This commit is contained in:
2019-11-20 07:44:43 +01:00
commit 5bf49c4a81
41188 changed files with 5459177 additions and 0 deletions

View File

@@ -0,0 +1,156 @@
NOTICE OF LICENSE
This source file is subject to a commercial license from Common-Services Co., Ltd.
Use, copy, modification or distribution of this source file without written
license agreement from the SARL SMC is strictly forbidden.
In order to obtain a license, please contact us: contact@common-services.com
INFORMATION SUR LA LICENCE D'UTILISATION
L'utilisation de ce fichier source est soumise a une licence commerciale concedee par la societe Common-Services Co., Ltd.
Toute utilisation, reproduction, modification ou distribution du present fichier source sans contrat de licence ecrit de la part de la
Common-Services Co. Ltd. est expressement interdite.
Pour obtenir une licence, veuillez contacter Common-Services Co., Ltd. a l'adresse: contact@common-services.com
@package SoNice Retour
@copyright Copyright (c) 2011-2015 Common Services Co Ltd - 90/25 Sukhumvit 81 - 10260 Bangkok - Thailand
@author Alexandre D.
@license Commercial license
-----------------------------------------------------------------------------------------------------------------------------------------------------
####################################
# v2.0.09 - (2018-04-02)
####################################
Fixed bugs:
FIX : transportation amount for international return
Improved/changed features:
[*] CORE : Updated l() function to comply with PS 1.7 ($locale = null)
[*] BO : N/A
####################################
# v2.0.08 - (2018-01-09)
####################################
Fixed bugs:
[*] FIX : Update string cleaning to replace by ' ' instead of '' in some case
Improved/changed features:
[*] CORE : Updated customs declaration country list
[*] CORE : Insert invoice number based on order id in case a third party ERP deals with it (can not be missing in web service call)
[*] BO : N/A
####################################
# v2.0.07 - (2017-11-29)
####################################
Fixed bugs:
[*] FIX : Order details in mail sent once a return is asked by customer
[*] FIX : Context on label creation
Improved/changed features:
[*] CORE : Update Validate class
[*] CORE : Added token for Ajax calls
[*] BO : N/A
####################################
# v2.0.06 - (2016-09-19)
####################################
Fixed bugs:
[*] FIX : N/A
Improved/changed features:
[*] CORE : PrestaShop 1.7 compliant
[*] BO : Update some translations
####################################
# v2.0.05 - (2016-08-22)
####################################
Fixed bugs:
[*] FIX : N/A
Improved/changed features:
[*] CORE : File structure is now compliant with PrestaShop recommendations
[*] CORE : Added jquery.migrate.js for "Return all product(s)" button in Order page
[*] BO : Better error display in Order page
[*] BO : Added "Return all product(s)" button in Order page
####################################
# v2.0.04 - (2016-03-28)
####################################
Fixed bugs:
[*] FIX : Bug on PS 1.4
Improved/changed features:
[*] CORE : N/A
[*] BO : N/A
####################################
# v2.0.04 - (2016-03-28)
####################################
Fixed bugs:
[*] FIX : Draggable destroy in order sheet
[*] FIX : JS error with image link
Improved/changed features:
[*] CORE : N/A
[*] BO : N/A
####################################
# v2.0.03 - (2016-03-09)
####################################
Fixed bugs:
[*] FIX : Right product code is now used for international returned (7R)
[*] FIX : jQuery UI Draggable, now draggable elements are always visible, not going under other elements
[*] FIX : 7R if label url does not exists then create return PDF from source code
[*] FIX : Bug with meta-data bar when creating a label for an already existing return (made by customer), remove old one to keep the new one, not both
Improved/changed features:
[*] CORE : Code updated to PSR2 standard
[*] CORE : An email is now sent to the merchant when customer create a return in FO
[*] CORE : It is now possible to send an email to customer once the return is created
[*] BO : Loader moved next to action buttons
####################################
# v2.0.02 - (2015-12-17)
####################################
Improved/changed features:
[*] BO : Added an option to select the way to display the label (in browser by default or in a new tab)

View File

@@ -0,0 +1,59 @@
# SoNice Retour
## A propos
SoNice Retour est une solution d'impression d'étiquettes retour Colissimo & So Colissimo uniquement réservée aux professionnels du e-commerce.
## Les "+" pour vous
* Productivité : facilite la gestion de votre SAV
* Amélioration de la gestion des retours de Prestashop
* Une gestion des retours simplifiée
* Vous pouvez personnaliser le mail envoyé à vos client par ColiPoste
Ce module a été développé par Common-Services, agence partenaire Prestashop, présente sur Prestashop Addons depuis 2010 et qui édite également 15 autres modules best-seller commercialisés uniquement sur Prestashop Addons.
## Fonctionnalités
**Description**
Vous expédiez des colis au quotidien, mais quid des retours ?
* Retour durant le délai de rétractation
* Retour S.A.V. produit
Dorénavant, pour permettre au client de vous renvoyer un colis, il vous suffira de lui mettre à disposition une étiquette retour Colissimo, c'est la vocation de ce module.
Le client imprime son étiquette et vous expédie son colis !
**Fonctionnalités**
SoNice Retour permet de générer des étiquettes de retour Colissimo Online pour la France (8R) et l'international (7R) via une interface simple et agréable, directement depuis la page de commande.
Deux possibilités sont proposées :
* Vous imprimez ou sauvegardez l'étiquette retour pour l'envoyer au client.
* Vous laissez le serveur de ColiPoste l'envoyer au client par email.
**Fonctionnement**
Cet outil repose sur un Service Web fourni par ColiPoste qui vous permet de créer des étiquettes de retour produits, au format PDF, pour vos clients.
Le module se repose sur la fonctionnalité native de Prestashop de gestion des retours, il vient compléter ce fonctionnement en ajoutant la fonction de création d'étiquette de retour.
L'utilisation est simple ; depuis la page commande vous glissez/déposez (Drag'n'Drop) le produit à retourner dans la section So Nice Retour.
**Démonstration**
Voici un lien vers le site de démonstration : http://sonice.prestashop150.common-services.com/admin3988/
Utilisez les identifiants par défaut (déjà affichés) pour vous connecter.
Une vidéo du module en action est également disponible à cette adresse : [https://www.youtube.com/watch?v=nyTt8Z6eUXI](https://www.youtube.com/watch?v=nyTt8Z6eUXI) .
Article sur notre blog :
[http://blog.common-services.com/sonice-retour-service-detiquetage-colissimo-pour-retours-de-produits/](http://blog.common-services.com/sonice-retour-service-detiquetage-colissimo-pour-retours-de-produits/)
### Requirements
Technical requirements : cURL installed.
Contrat avec Coliposte : So Colissimo Flexibilité option Web Service d'Étiquetage Unifié

View File

@@ -0,0 +1,348 @@
<?php
/*
* 2007-2014 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 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/osl-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/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
if ((bool)Configuration::get('PS_MOBILE_DEVICE')) {
require_once(_PS_MODULE_DIR_ . '/mobile_theme/Mobile_Detect.php');
}
// Retro 1.3, 'class_exists' cause problem with autoload...
if (version_compare(_PS_VERSION_, '1.4', '<')) {
// Not exist for 1.3
class Shop extends ObjectModel
{
public $id = 1;
public $id_shop_group = 1;
public function __construct()
{
}
public static function getShops()
{
return array(
array('id_shop' => 1, 'name' => 'Default shop')
);
}
public static function getCurrentShop()
{
return 1;
}
}
class Logger
{
public static function AddLog($message, $severity = 2)
{
$fp = fopen(dirname(__FILE__).'/../logs.txt', 'a+');
fwrite($fp, '['.(int)$severity.'] '.Tools::safeOutput($message));
fclose($fp);
}
}
}
// Not exist for 1.3 and 1.4
class Context
{
/**
* @var Context
*/
protected static $instance;
/**
* @var Cart
*/
public $cart;
/**
* @var Customer
*/
public $customer;
/**
* @var Cookie
*/
public $cookie;
/**
* @var Link
*/
public $link;
/**
* @var Country
*/
public $country;
/**
* @var Employee
*/
public $employee;
/**
* @var Controller
*/
public $controller;
/**
* @var Language
*/
public $language;
/**
* @var Currency
*/
public $currency;
/**
* @var AdminTab
*/
public $tab;
/**
* @var Shop
*/
public $shop;
/**
* @var Smarty
*/
public $smarty;
/**
* @ var Mobile Detect
*/
public $mobile_detect;
/**
* @var boolean|string mobile device of the customer
*/
protected $mobile_device;
public function __construct()
{
global $cookie, $cart, $smarty, $link;
$this->tab = null;
$this->cookie = $cookie;
$this->cart = $cart;
$this->smarty = $smarty;
$this->link = $link;
$this->controller = new ControllerBackwardModule();
if (is_object($cookie)) {
$this->currency = new Currency((int)$cookie->id_currency);
$this->language = new Language((int)$cookie->id_lang);
$this->country = new Country((int)$cookie->id_country);
$this->customer = new CustomerBackwardModule((int)$cookie->id_customer);
$this->employee = new Employee((int)$cookie->id_employee);
} else {
$this->currency = null;
$this->language = null;
$this->country = null;
$this->customer = null;
$this->employee = null;
}
$this->shop = new ShopBackwardModule();
if ((bool)Configuration::get('PS_MOBILE_DEVICE')) {
$this->mobile_detect = new Mobile_Detect();
}
}
public function getMobileDevice()
{
if (is_null($this->mobile_device)) {
$this->mobile_device = false;
if ($this->checkMobileContext()) {
switch ((int)Configuration::get('PS_MOBILE_DEVICE')) {
case 0: // Only for mobile device
if ($this->mobile_detect->isMobile() && !$this->mobile_detect->isTablet()) {
$this->mobile_device = true;
}
break;
case 1: // Only for touchpads
if ($this->mobile_detect->isTablet() && !$this->mobile_detect->isMobile()) {
$this->mobile_device = true;
}
break;
case 2: // For touchpad or mobile devices
if ($this->mobile_detect->isMobile() || $this->mobile_detect->isTablet()) {
$this->mobile_device = true;
}
break;
}
}
}
return $this->mobile_device;
}
protected function checkMobileContext()
{
return isset($_SERVER['HTTP_USER_AGENT'])
&& (bool)Configuration::get('PS_MOBILE_DEVICE')
&& !Context::getContext()->cookie->no_mobile;
}
/**
* Get a singleton context
*
* @return Context
*/
public static function getContext()
{
if (!isset(self::$instance)) {
self::$instance = new Context();
}
return self::$instance;
}
/**
* Clone current context
*
* @return Context
*/
public function cloneContext()
{
return clone($this);
}
/**
* @return int Shop context type (Shop::CONTEXT_ALL, etc.)
*/
public static function shop()
{
if (!self::$instance->shop->getContextType()) {
return ShopBackwardModule::CONTEXT_ALL;
}
return self::$instance->shop->getContextType();
}
}
/**
* Class Shop for Backward compatibility
*/
class ShopBackwardModule extends Shop
{
const CONTEXT_ALL = 1;
public $id = 1;
public $id_shop_group = 1;
public function getContextType()
{
return ShopBackwardModule::CONTEXT_ALL;
}
// Simulate shop for 1.3 / 1.4
public function getID()
{
return 1;
}
/**
* Get shop theme name
*
* @return string
*/
public function getTheme()
{
return _THEME_NAME_;
}
public function isFeatureActive()
{
return false;
}
}
/**
* Class Controller for a Backward compatibility
* Allow to use method declared in 1.5
*/
class ControllerBackwardModule
{
/**
* @param $js_uri
* @return void
*/
public function addJS($js_uri)
{
Tools::addJS($js_uri);
}
/**
* @param $css_uri
* @param string $css_media_type
* @return void
*/
public function addCSS($css_uri, $css_media_type = 'all')
{
Tools::addCSS($css_uri, $css_media_type);
}
public function addJquery()
{
if (_PS_VERSION_ < '1.5') {
$this->addJS(_PS_JS_DIR_.'jquery/jquery-1.4.4.min.js');
} elseif (_PS_VERSION_ >= '1.5') {
$this->addJS(_PS_JS_DIR_.'jquery/jquery-1.7.2.min.js');
}
}
}
/**
* Class Customer for a Backward compatibility
* Allow to use method declared in 1.5
*/
class CustomerBackwardModule extends Customer
{
public $logged = false;
/**
* Check customer informations and return customer validity
*
* @since 1.5.0
* @param boolean $with_guest
* @return boolean customer validity
*/
public function isLogged($with_guest = false)
{
if (!$with_guest && $this->is_guest == 1) {
return false;
}
/* Customer is valid only if it can be load and if object password is the same as database one */
if ($this->logged == 1 && $this->id && Validate::isUnsignedId($this->id) && Customer::checkPassword($this->id, $this->passwd)) {
return true;
}
return false;
}
}

View File

@@ -0,0 +1,348 @@
<?php
/*
* 2007-2014 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 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/osl-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 https://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2014 PrestaShop SA
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
if ((bool)Configuration::get('PS_MOBILE_DEVICE')) {
require_once(_PS_MODULE_DIR_ . '/mobile_theme/Mobile_Detect.php');
}
// Retro 1.3, 'class_exists' cause problem with autoload...
if (version_compare(_PS_VERSION_, '1.4', '<')) {
// Not exist for 1.3
class Shop extends ObjectModel
{
public $id = 1;
public $id_shop_group = 1;
public function __construct()
{
}
public static function getShops()
{
return array(
array('id_shop' => 1, 'name' => 'Default shop')
);
}
public static function getCurrentShop()
{
return 1;
}
}
class Logger
{
public static function AddLog($message, $severity = 2)
{
$fp = fopen(dirname(__FILE__).'/../logs.txt', 'a+');
fwrite($fp, '['.(int)$severity.'] '.Tools::safeOutput($message));
fclose($fp);
}
}
}
// Not exist for 1.3 and 1.4
class Context
{
/**
* @var Context
*/
protected static $instance;
/**
* @var Cart
*/
public $cart;
/**
* @var Customer
*/
public $customer;
/**
* @var Cookie
*/
public $cookie;
/**
* @var Link
*/
public $link;
/**
* @var Country
*/
public $country;
/**
* @var Employee
*/
public $employee;
/**
* @var Controller
*/
public $controller;
/**
* @var Language
*/
public $language;
/**
* @var Currency
*/
public $currency;
/**
* @var AdminTab
*/
public $tab;
/**
* @var Shop
*/
public $shop;
/**
* @var Smarty
*/
public $smarty;
/**
* @ var Mobile Detect
*/
public $mobile_detect;
/**
* @var boolean|string mobile device of the customer
*/
protected $mobile_device;
public function __construct()
{
global $cookie, $cart, $smarty, $link;
$this->tab = null;
$this->cookie = $cookie;
$this->cart = $cart;
$this->smarty = $smarty;
$this->link = $link;
$this->controller = new ControllerBackwardModule();
if (is_object($cookie)) {
$this->currency = new Currency((int)$cookie->id_currency);
$this->language = new Language((int)$cookie->id_lang);
$this->country = new Country((int)$cookie->id_country);
$this->customer = new CustomerBackwardModule((int)$cookie->id_customer);
$this->employee = new Employee((int)$cookie->id_employee);
} else {
$this->currency = null;
$this->language = null;
$this->country = null;
$this->customer = null;
$this->employee = null;
}
$this->shop = new ShopBackwardModule();
if ((bool)Configuration::get('PS_MOBILE_DEVICE')) {
$this->mobile_detect = new Mobile_Detect();
}
}
public function getMobileDevice()
{
if (is_null($this->mobile_device)) {
$this->mobile_device = false;
if ($this->checkMobileContext()) {
switch ((int)Configuration::get('PS_MOBILE_DEVICE')) {
case 0: // Only for mobile device
if ($this->mobile_detect->isMobile() && !$this->mobile_detect->isTablet()) {
$this->mobile_device = true;
}
break;
case 1: // Only for touchpads
if ($this->mobile_detect->isTablet() && !$this->mobile_detect->isMobile()) {
$this->mobile_device = true;
}
break;
case 2: // For touchpad or mobile devices
if ($this->mobile_detect->isMobile() || $this->mobile_detect->isTablet()) {
$this->mobile_device = true;
}
break;
}
}
}
return $this->mobile_device;
}
protected function checkMobileContext()
{
return isset($_SERVER['HTTP_USER_AGENT'])
&& (bool)Configuration::get('PS_MOBILE_DEVICE')
&& !Context::getContext()->cookie->no_mobile;
}
/**
* Get a singleton context
*
* @return Context
*/
public static function getContext()
{
if (!isset(self::$instance)) {
self::$instance = new Context();
}
return self::$instance;
}
/**
* Clone current context
*
* @return Context
*/
public function cloneContext()
{
return clone($this);
}
/**
* @return int Shop context type (Shop::CONTEXT_ALL, etc.)
*/
public static function shop()
{
if (!self::$instance->shop->getContextType()) {
return ShopBackwardModule::CONTEXT_ALL;
}
return self::$instance->shop->getContextType();
}
}
/**
* Class Shop for Backward compatibility
*/
class ShopBackwardModule extends Shop
{
const CONTEXT_ALL = 1;
public $id = 1;
public $id_shop_group = 1;
public function getContextType()
{
return ShopBackwardModule::CONTEXT_ALL;
}
// Simulate shop for 1.3 / 1.4
public function getID()
{
return 1;
}
/**
* Get shop theme name
*
* @return string
*/
public function getTheme()
{
return _THEME_NAME_;
}
public function isFeatureActive()
{
return false;
}
}
/**
* Class Controller for a Backward compatibility
* Allow to use method declared in 1.5
*/
class ControllerBackwardModule
{
/**
* @param $js_uri
* @return void
*/
public function addJS($js_uri)
{
Tools::addJS($js_uri);
}
/**
* @param $css_uri
* @param string $css_media_type
* @return void
*/
public function addCSS($css_uri, $css_media_type = 'all')
{
Tools::addCSS($css_uri, $css_media_type);
}
public function addJquery()
{
if (_PS_VERSION_ < '1.5') {
$this->addJS(_PS_JS_DIR_.'jquery/jquery-1.4.4.min.js');
} elseif (_PS_VERSION_ >= '1.5') {
$this->addJS(_PS_JS_DIR_.'jquery/jquery-1.7.2.min.js');
}
}
}
/**
* Class Customer for a Backward compatibility
* Allow to use method declared in 1.5
*/
class CustomerBackwardModule extends Customer
{
public $logged = false;
/**
* Check customer informations and return customer validity
*
* @since 1.5.0
* @param boolean $with_guest
* @return boolean customer validity
*/
public function isLogged($with_guest = false)
{
if (!$with_guest && $this->is_guest == 1) {
return false;
}
/* Customer is valid only if it can be load and if object password is the same as database one */
if ($this->logged == 1 && $this->id && Validate::isUnsignedId($this->id) && Customer::checkPassword($this->id, $this->passwd)) {
return true;
}
return false;
}
}

View File

@@ -0,0 +1,49 @@
<?php
/*
* 2007-2014 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 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/osl-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/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
/**
* Class allow to display tpl on the FO
*/
class BWDisplay extends FrontController
{
// Assign template, on 1.4 create it else assign for 1.5
public function setTemplate($template)
{
if (_PS_VERSION_ >= '1.5') {
parent::setTemplate($template);
} else {
$this->template = $template;
}
}
// Overload displayContent for 1.4
public function displayContent()
{
parent::displayContent();
echo Context::getContext()->smarty->fetch($this->template);
}
}

View File

@@ -0,0 +1,49 @@
<?php
/*
* 2007-2014 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 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/osl-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 https://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2014 PrestaShop SA
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
/**
* Class allow to display tpl on the FO
*/
class BWDisplay extends FrontController
{
// Assign template, on 1.4 create it else assign for 1.5
public function setTemplate($template)
{
if (_PS_VERSION_ >= '1.5') {
parent::setTemplate($template);
} else {
$this->template = $template;
}
}
// Overload displayContent for 1.4
public function displayContent()
{
parent::displayContent();
echo Context::getContext()->smarty->fetch($this->template);
}
}

View File

@@ -0,0 +1,55 @@
<?php
/*
* 2007-2014 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 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/osl-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/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
/**
* Backward function compatibility
* Need to be called for each module in 1.4
*/
// Get out if the context is already defined
if (!in_array('Context', get_declared_classes())) {
require_once(dirname(__FILE__).'/Context.php');
}
// Get out if the Display (BWDisplay to avoid any conflict)) is already defined
if (!in_array('BWDisplay', get_declared_classes())) {
require_once(dirname(__FILE__).'/Display.php');
}
// If not under an object we don't have to set the context
if (!isset($this)) {
return;
} elseif (isset($this->context)) {
// If we are under an 1.5 version and backoffice, we have to set some backward variable
if (_PS_VERSION_ >= '1.5' && isset($this->context->employee->id) && $this->context->employee->id && isset(AdminController::$currentIndex) && !empty(AdminController::$currentIndex)) {
global $currentIndex;
$currentIndex = AdminController::$currentIndex;
}
return;
}
$this->context = Context::getContext();
$this->smarty = $this->context->smarty;

View File

@@ -0,0 +1 @@
version = 0.4

View File

@@ -0,0 +1,55 @@
<?php
/*
* 2007-2014 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 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/osl-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 https://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2014 PrestaShop SA
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
/**
* Backward function compatibility
* Need to be called for each module in 1.4
*/
// Get out if the context is already defined
if (!in_array('Context', get_declared_classes())) {
require_once(dirname(__FILE__).'/Context.php');
}
// Get out if the Display (BWDisplay to avoid any conflict)) is already defined
if (!in_array('BWDisplay', get_declared_classes())) {
require_once(dirname(__FILE__).'/Display.php');
}
// If not under an object we don't have to set the context
if (!isset($this)) {
return;
} elseif (isset($this->context)) {
// If we are under an 1.5 version and backoffice, we have to set some backward variable
if (_PS_VERSION_ >= '1.5' && isset($this->context->employee->id) && $this->context->employee->id && isset(AdminController::$currentIndex) && !empty(AdminController::$currentIndex)) {
global $currentIndex;
$currentIndex = AdminController::$currentIndex;
}
return;
}
$this->context = Context::getContext();
$this->smarty = $this->context->smarty;

View File

@@ -0,0 +1,35 @@
<?php
/*
* 2007-2014 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 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/osl-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/osl-3.0.php Open Software License (OSL 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;

View File

@@ -0,0 +1,35 @@
<?php
/*
* 2007-2014 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 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/osl-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 https://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2014 PrestaShop SA
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 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;

View File

@@ -0,0 +1,84 @@
<?php
/**
* NOTICE OF LICENSE
*
* This source file is subject to a commercial license from Common-Services Co., Ltd.
* Use, copy, modification or distribution of this source file without written
* license agreement from the SARL SMC is strictly forbidden.
* In order to obtain a license, please contact us: contact@common-services.com
* ...........................................................................
* INFORMATION SUR LA LICENCE D'UTILISATION
*
* L'utilisation de ce fichier source est soumise a une licence commerciale
* concedee par la societe Common-Services Co., Ltd.
* Toute utilisation, reproduction, modification ou distribution du present
* fichier source sans contrat de licence ecrit de la part de la Common-Services Co. Ltd. est
* expressement interdite.
* Pour obtenir une licence, veuillez contacter Common-Services Co., Ltd. a l'adresse: contact@common-services.com
* ...........................................................................
*
* @package SoNice Retour
* @author Alexandre D.
* @copyright Copyright (c) 2011-2015 Common Services Co Ltd - 90/25 Sukhumvit 81 - 10260 Bangkok - Thailand
* @license Commercial license
* Support by mail : support.sonice@common-services.com
*/
class SoColissimoCurlParser
{
public $curl_response = null;
public $label_binary = null;
public $cn23_binary = null;
public $has_label = false;
public function __construct($curl_response)
{
$this->curl_response = $curl_response;
if (preg_match('/<label>[\w\W].*<\/label>/', $curl_response)) {
$this->has_label = true;
}
}
public function parse()
{
if ($this->label_binary || $this->cn23_binary) {
return ($this);
}
$response_to_parse = $this->curl_response;
$response_to_parse = preg_replace('/--uu[\s\S].*/', '', $response_to_parse);
// Sometimes the flag "s" causes error, solution is to remove it.
$response_to_parse = preg_replace('/<soap[\s\S.*].*Envelope>/s', '', $response_to_parse);
$response_to_parse = trim(preg_replace('/^Content[\s\S].*/m', '', $response_to_parse));
// if ($this->has_label)
// {
// $response_to_parse = explode('%PDF', $response_to_parse);
//
// $this->label_binary = trim($response_to_parse[0]);
// $this->cn23_binary = '%PDF'.$response_to_parse[1];
// }
// else
$this->label_binary = $response_to_parse;
return ($this);
}
public function getLabelBinary()
{
return ($this->label_binary);
}
public function getCN23Binary()
{
return ($this->cn23_binary);
}
}

View File

@@ -0,0 +1,271 @@
<?php
/**
* NOTICE OF LICENSE
*
* This source file is subject to a commercial license from Common-Services Co., Ltd.
* Use, copy, modification or distribution of this source file without written
* license agreement from the SARL SMC is strictly forbidden.
* In order to obtain a license, please contact us: contact@common-services.com
* ...........................................................................
* INFORMATION SUR LA LICENCE D'UTILISATION
*
* L'utilisation de ce fichier source est soumise a une licence commerciale
* concedee par la societe Common-Services Co., Ltd.
* Toute utilisation, reproduction, modification ou distribution du present
* fichier source sans contrat de licence ecrit de la part de la Common-Services Co. Ltd. est
* expressement interdite.
* Pour obtenir une licence, veuillez contacter Common-Services Co., Ltd. a l'adresse: contact@common-services.com
* ...........................................................................
*
* @package SoNice Retour
* @author Alexandre D.
* @copyright Copyright (c) 2011-2015 Common Services Co Ltd - 90/25 Sukhumvit 81 - 10260 Bangkok - Thailand
* @license Commercial license
* Support by mail : support.sonice@common-services.com
*/
require_once(dirname(__FILE__).'/../sonice_retour.php');
require_once(dirname(__FILE__).'/SoColissimoCurlParser.php');
abstract class SoColissimoWebService extends SoNice_Retour
{
/** Supervision link to check web service availability */
const WS_SUPERVISION = 'http://ws.colissimo.fr/supervisionWSShipping/supervision.jsp';
const SCE_WS = 'https://ws.colissimo.fr/sls-ws/SlsServiceWS';
const SCE_WS_TELINTRANS = 'http://pfi.telintrans.fr/sls-ws/SlsServiceWS';
/** @var mixed The web service response */
public $response = null;
/** @var SoColissimoCurlParser */
public $raw_response;
public $origin_request;
public $error = null;
public $request;
public $module_conf;
public $carrier_conf;
/** @var array Contains options for the soap client connection */
protected $debug = false;
public function __construct($demo = false)
{
parent::__construct();
$this->demo = $demo ? $demo : Configuration::get('ETIQUETAGE_RETURN_TEST');
$this->module_conf = unserialize(Configuration::get(
'ETIQUETAGE_RETURN_CONF',
null,
$this->context->shop->id_shop_group,
$this->context->shop->id
));
}
public function l($string, $specific = false, $locale = null)
{
if (!$specific) {
$specific = basename(__FILE__, '.php');
}
if (class_exists('Translate')) {
return Translate::getModuleTranslation(get_parent_class(), $string, $specific);
}
return parent::l($string, $specific);
}
private function _fillXML($params, &$sls_generate_label, &$document)
{
$requires_cdata = array(
'Description', 'instructions', 'commercialName', 'companyName', 'lastName', 'firstName',
'line0', 'line1', 'line2', 'line3', 'city'
);
foreach ($params as $key => $value) {
if (is_numeric($key)) {
// only happens with articles
$key = 'article';
}
if (!is_array($value)) {
if ($value) {
if (in_array($key, $requires_cdata)) {
$tmp_element = $document->createElement($key);
$tmp_element->appendChild($document->createCDATASection($value));
} else {
$tmp_element = $document->createElement($key, $value);
}
$sls_generate_label->appendChild($tmp_element);
}
} else {
$new_child = $document->createElement($key);
$sls_generate_label->appendChild($new_child);
$this->_fillXML($value, $new_child, $document);
}
}
}
protected function _callWS($params)
{
$document = new DOMDocument('1.0', 'utf-8');
$document->formatOutput = true;
$document->preserveWhiteSpace = true;
$soap_envelope = $document->createElement('soap:Envelope');
$soap_envelope->setAttribute('xmlns:soap', 'http://schemas.xmlsoap.org/soap/envelope/');
$soap_envelope->setAttribute('xmlns:sls', 'http://sls.ws.coliposte.fr');
$soap_body = $document->createElement('soap:Body');
$sls_generate_label = $document->createElement('sls:generateLabel');
$sls_generate_label_request = $document->createElement('generateLabelRequest');
$soap_envelope->appendChild($soap_body);
$soap_body->appendChild($sls_generate_label);
$sls_generate_label->appendChild($sls_generate_label_request);
$document->appendChild($soap_envelope);
$this->_fillXML($params, $sls_generate_label_request, $document);
$request = $document->saveXML();
// var_dump($this->xmlpp($request));die;
$this->origin_request = $request;
$this->request = $request;
$headers = array(
'Accept-Encoding: gzip,deflate',
'Content-Type: text/xml; charset="utf-8"',
'SOAPAction: ""'
);
$webservice_url = array_key_exists('dev_mode', $this->module_conf) && $this->module_conf['dev_mode'] ?
self::SCE_WS_TELINTRANS : self::SCE_WS;
$ch = curl_init();
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_URL, $webservice_url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_POSTFIELDS, $request);
curl_setopt($ch, CURLOPT_VERBOSE, true);
// IF demo() ELSE webservice() ENDIF
if ($this->demo) {
$result = Tools::file_get_contents(dirname(__FILE__).'/../functions/raw_response.txt');
} else {
$result = curl_exec($ch);
}
$this->raw_response = new SoColissimoCurlParser($result);
$result = $this->xmldata($result);
if ($result === false) {
echo nl2br(print_r(curl_getinfo($ch), true));
echo 'Request';
print('<pre>'.print_r(htmlentities($request, ENT_QUOTES, 'UTF-8'), true).'</pre>');
echo 'cURL error number:'.curl_errno($ch).'\n<br/>';
echo 'cURL error message:'.curl_error($ch).'\n<br/>';
curl_close($ch);
throw new Exception(curl_error($ch));
}
curl_close($ch);
return ($result);
}
public function xmldata($page)
{
if (empty($page)) {
printf('%s(#%d): empty string passed to the function', basename(__FILE__), __LINE__);
return (false);
}
// On some system the following regexp failed because the response is too long
// Minimize the response by removing header at beginning and kepping enough text to catch the XML code.
$page = Tools::substr($page, 100, 1250);
preg_match('/<soap:Envelope[\s\S]*soap:Envelope>/', $page, $page);
$page = reset($page);
$page = $this->xmlpp($page);
// remove namespaces
$page = preg_replace('/xmlns[^=]*="[^"]*"/i', '', $page);
$page = preg_replace('/[a-zA-Z0-9]+:([a-zA-Z0-9]+[ =>])/', '$1', $page);
// filters
$page = str_replace(array("\n", "\r", "\t"), '', $page);
$page = trim(str_replace('"', "'", $page));
$xml = simplexml_load_string($page, null, LIBXML_NOCDATA);
if (!$xml instanceof SimpleXMLElement) {
printf('%s(#%d): invalid string passed to the function: "%s"', basename(__FILE__), __LINE__, $page);
return (false);
}
return ($xml);
}
/**
* Check the availability of ColiPoste web services
*
* @return boolean Supervision status
*/
public static function webServiceSupervision()
{
$supervision = Tools::file_get_contents(self::WS_SUPERVISION);
if (preg_match('/\[OK\]/', $supervision)) {
return (true);
}
return (false);
}
public function xmlpp($xml, $html_output = false)
{
$xml_obj = new SimpleXMLElement($xml);
$level = 4;
$indent = 0;
$pretty = array();
$xml = explode("\n", preg_replace('/>\s*</', ">\n<", $xml_obj->asXML()));
if (count($xml) && preg_match('/^<\?\s*xml/', $xml[0])) {
$pretty[] = array_shift($xml);
}
foreach ($xml as $el) {
if (preg_match('/^<([\w])+[^>\/]*>$/U', $el)) {
$pretty[] = str_repeat(' ', $indent).$el;
$indent += $level;
} else {
if (preg_match('/^<\/.+>$/', $el)) {
$indent -= $level;
}
if ($indent < 0) {
$indent += $level;
}
$pretty[] = str_repeat(' ', $indent).$el;
}
}
$xml = implode("\n", $pretty);
if ($html_output) {
$xml = htmlentities($xml);
}
return $xml;
}
}

View File

@@ -0,0 +1,336 @@
<?php
/**
* NOTICE OF LICENSE
*
* This source file is subject to a commercial license from Common-Services Co., Ltd.
* Use, copy, modification or distribution of this source file without written
* license agreement from the SARL SMC is strictly forbidden.
* In order to obtain a license, please contact us: contact@common-services.com
* ...........................................................................
* INFORMATION SUR LA LICENCE D'UTILISATION
*
* L'utilisation de ce fichier source est soumise a une licence commerciale
* concedee par la societe Common-Services Co., Ltd.
* Toute utilisation, reproduction, modification ou distribution du present
* fichier source sans contrat de licence ecrit de la part de la Common-Services Co. Ltd. est
* expressement interdite.
* Pour obtenir une licence, veuillez contacter Common-Services Co., Ltd. a l'adresse: contact@common-services.com
* ...........................................................................
*
* @package SoNice Retour
* @author Alexandre D.
* @copyright Copyright (c) 2011-2015 Common Services Co Ltd - 90/25 Sukhumvit 81 - 10260 Bangkok - Thailand
* @license Commercial license
* Support by mail : support.sonice@common-services.com
*/
class SoNiceEtiquetageValidate
{
public static $country_calling_codes = array(
'AF' => '93',
'AL' => '355',
'DZ' => '213',
'AD' => '376',
'AO' => '244',
'AQ' => '672',
'AR' => '54',
'AM' => '374',
'AW' => '297',
'AU' => '61',
'AT' => '43',
'AZ' => '994',
'BH' => '973',
'BD' => '880',
'BY' => '375',
'BE' => '32',
'BZ' => '501',
'BJ' => '229',
'BT' => '975',
'BO' => '591',
'BQ' => '599',
'BA' => '387',
'BW' => '267',
'BV' => '47',
'BR' => '55',
'IO' => '246',
'BN' => '673',
'BG' => '359',
'BF' => '226',
'BI' => '257',
'KH' => '855',
'CM' => '237',
'CA' => '1',
'CV' => '238',
'CF' => '236',
'TD' => '235',
'CL' => '56',
'CN' => '86',
'CX' => '61',
'CC' => '61',
'CO' => '57',
'KM' => '269',
'CG' => '242',
'CD' => '243',
'CK' => '682',
'CR' => '506',
'HR' => '385',
'CU' => '53',
'CW' => '599',
'CY' => '357',
'CZ' => '420',
'CI' => '225',
'DK' => '45',
'DJ' => '253',
'EC' => '593',
'EG' => '20',
'SV' => '503',
'GQ' => '240',
'ER' => '291',
'EE' => '372',
'ET' => '251',
'FK' => '500',
'FO' => '298',
'FJ' => '679',
'FI' => '358',
'FR' => '33',
'GF' => '594',
'PF' => '689',
'TF' => '262',
'GA' => '241',
'GM' => '220',
'GE' => '995',
'DE' => '49',
'GH' => '233',
'GI' => '350',
'GR' => '30',
'GL' => '299',
'GP' => '590',
'GT' => '502',
'GG' => '44',
'GN' => '224',
'GW' => '245',
'GY' => '592',
'HT' => '509',
'HM' => '672',
'HN' => '504',
'HK' => '852',
'HU' => '36',
'IS' => '354',
'IN' => '91',
'ID' => '62',
'IR' => '98',
'IQ' => '964',
'IE' => '353',
'IM' => '44',
'IL' => '972',
'IT' => '39',
'JP' => '81',
'JE' => '44',
'JO' => '962',
'KZ' => '7',
'KE' => '254',
'KI' => '686',
'KP' => '850',
'KR' => '82',
'KW' => '965',
'KG' => '996',
'LA' => '856',
'LV' => '371',
'LB' => '961',
'LS' => '266',
'LR' => '231',
'LY' => '218',
'LI' => '423',
'LT' => '370',
'LU' => '352',
'MO' => '853',
'MK' => '389',
'MG' => '261',
'MW' => '265',
'MY' => '60',
'MV' => '960',
'ML' => '223',
'MT' => '356',
'MH' => '692',
'MQ' => '596',
'MR' => '222',
'MU' => '230',
'YT' => '262',
'MX' => '52',
'FM' => '691',
'MD' => '373',
'MC' => '33',
'MN' => '976',
'ME' => '382',
'MA' => '212',
'MZ' => '258',
'MM' => '95',
'NA' => '264',
'NR' => '674',
'NP' => '977',
'NL' => '31',
'NC' => '687',
'NZ' => '64',
'NI' => '505',
'NE' => '227',
'NG' => '234',
'NU' => '683',
'NF' => '672',
'NO' => '47',
'OM' => '968',
'PK' => '92',
'PW' => '680',
'PS' => '970',
'PA' => '507',
'PG' => '675',
'PY' => '595',
'PE' => '51',
'PH' => '63',
'PN' => '870',
'PL' => '48',
'PT' => '351',
'PR' => '1',
'QA' => '974',
'RO' => '40',
'RU' => '7',
'RW' => '250',
'RE' => '262',
'BL' => '590',
'MF' => '590',
'PM' => '508',
'WS' => '685',
'SM' => '378',
'ST' => '239',
'SA' => '966',
'SN' => '221',
'SC' => '248',
'SL' => '232',
'SG' => '65',
'SK' => '421',
'SI' => '386',
'SB' => '677',
'SO' => '252',
'ZA' => '27',
'GS' => '500',
'SS' => '211',
'ES' => '34',
'LK' => '94',
'SD' => '249',
'SR' => '597',
'SJ' => '47',
'SZ' => '268',
'SE' => '46',
'CH' => '41',
'SY' => '963',
'TW' => '886',
'TJ' => '992',
'TZ' => '255',
'TH' => '66',
'TL' => '670',
'TG' => '228',
'TK' => '690',
'TO' => '676',
'TN' => '216',
'TR' => '90',
'TM' => '993',
'TV' => '688',
'UG' => '256',
'UA' => '380',
'AE' => '971',
'GB' => '44',
'US' => '1',
'UY' => '598',
'UZ' => '998',
'VU' => '678',
'VE' => '58',
'VN' => '84',
'WF' => '681',
'EH' => '212',
'YE' => '967',
'ZM' => '260',
'ZW' => '263',
'AX' => '358'
);
public static $format_codification = array(
'A' => '/[^a-zA-Z ]/',
'AN' => '/[^[:print:]]|[\"]/',
'CP' => '/[^a-zA-Z0-9]/',
'N' => '/[^-0-9.]/',
// ^((\+|00)([0-9]{1,3})\s?|0)[067]{1,2}(\s?\d{2}){4}$
'TP' => '/[^+0-9]/'
);
public static function sanitize($data, $format, $element = null, $iso_country = null)
{
$data_format = preg_replace('/[^a-zA-Z]/', '', $format);
switch ($data_format) {
case 'A':
case 'AN':
case 'CP':
case 'N':
case 'TP':
$data_min_length = 0;
$data_max_length = 999;
$data_length = explode('..', preg_replace('/[^0-9\.\-]/', '', $format));
if (count($data_length) == 1 && $data_length[0]) {
$data_min_length = $data_max_length = (int)$data_length[0];
} elseif (count($data_length) == 2) {
$data_min_length = (int)$data_length[0];
$data_max_length = (int)$data_length[1];
}
if (mb_detect_encoding((string)$data) != 'UTF-8') {
iconv('ISO-8859-15', 'UTF-8//TRANSLIT', $data);
}
$data = mb_convert_encoding($data, 'HTML-ENTITIES', 'UTF-8');
$searches = array('&szlig;', '&(..)lig;', '&([aouAOU])uml;', '&(.)[^;]*;');
$replacements = array('ss', '\\1', '\\1e', '\\1');
foreach ($searches as $key => $search) {
$data = mb_ereg_replace($search, $replacements[$key], $data);
}
$data = preg_replace(self::$format_codification[$data_format], ' ', $data); // replace space by empty string
if (Tools::strlen($data) < $data_min_length) {
die(sprintf(
'Error with the element ['.$element.'] : String ["%s"] is too short ! Minimum length is %d.',
$data,
$data_min_length
));
}
$data = Tools::substr(str_replace(':', '', $data), 0, $data_max_length);
break;
case 'B':
$data = (int)(bool)$data;
break;
default:
die('Error with the element ['.$element.'] : Unknown format : '.$data_format);
}
// Phone | change 0033661123456 to +33661123456
if ($data_format == 'TP') {
if ($iso_country && Tools::strlen($iso_country) == 2 && Tools::strtoupper($iso_country) == 'FR') {
$data = preg_replace('/^\+33/', '0', $data);
} else {
$data = preg_replace('/^00/', '+', $data);
if ($iso_country && Tools::strlen($iso_country) == 2 && $data && $data[0] != '+' && isset(self::$country_calling_codes[$iso_country])) {
$data = '+'.self::$country_calling_codes[$iso_country].Tools::substr($data, 1);
}
// Check belgium phone number, must start by +324
if ($iso_country && Tools::strlen($iso_country) == 2 && Tools::strtoupper($iso_country) == 'BE' && Tools::substr($data, 0, 4) != '+324') {
$data = null;
}
}
}
return $data;
}
}

View File

@@ -0,0 +1,653 @@
<?php
/**
* NOTICE OF LICENSE
*
* This source file is subject to a commercial license from Common-Services Co., Ltd.
* Use, copy, modification or distribution of this source file without written
* license agreement from the SARL SMC is strictly forbidden.
* In order to obtain a license, please contact us: contact@common-services.com
* ...........................................................................
* INFORMATION SUR LA LICENCE D'UTILISATION
*
* L'utilisation de ce fichier source est soumise a une licence commerciale
* concedee par la societe Common-Services Co., Ltd.
* Toute utilisation, reproduction, modification ou distribution du present
* fichier source sans contrat de licence ecrit de la part de la Common-Services Co. Ltd. est
* expressement interdite.
* Pour obtenir une licence, veuillez contacter Common-Services Co., Ltd. a l'adresse: contact@common-services.com
* ...........................................................................
*
* @package SoNice Retour
* @author Alexandre D.
* @copyright Copyright (c) 2011-2015 Common Services Co Ltd - 90/25 Sukhumvit 81 - 10260 Bangkok - Thailand
* @license Commercial license
* Support by mail : support.sonice@common-services.com
*/
require_once(_PS_MODULE_DIR_.'sonice_retour/classes/SoColissimoWebService.php');
require_once(_PS_MODULE_DIR_.'sonice_retour/classes/SoNiceEtiquetageValidate.php');
final class SoNiceRetourPDF extends SoColissimoWebService
{
const FUNCTION_WS = 'getLetterColissimo';
const SCE_TABLE = 'so_return_label';
public $ps15x;
public $id_lang;
public $protocol;
public $url;
public $path;
public $product_list;
public $id_order_details_to_return;
public $order;
public $customer;
public $address;
public $params;
protected $need_cn23 = array(
'FR', 'BE', 'MC', 'AD', 'NL', 'DE', 'GB', 'LU', 'ES', 'PT', 'AT', 'CZ', 'HU', 'SK', 'SI', 'LT', 'LV', 'EE'
);
public function __construct($id_order, $id_order_details)
{
if (!is_null($id_order)) {
$this->order = new Order((int)$id_order);
}
if (!is_null($id_order_details)) {
$this->id_order_details_to_return = $id_order_details;
}
if (Validate::isLoadedObject($this->order)) {
$this->customer = new Customer((int)$this->order->id_customer);
$this->product_list = $this->order->getProductsDetail();
$this->address = new Address((int)$this->order->id_address_delivery);
$relais = false;
if ($this->ps15x && (Module::isEnabled('soflexibilite') || Module::isEnabled('soliberte'))) {
$soflexibilite_relays = Configuration::getMultiple(array(
'SOFLEXIBILITE_A2P_ID',
'SOFLEXIBILITE_BPR_ID',
'SOLIBERTE_A2P_ID',
'SOLIBERTE_BPR_ID'
));
if (strpos($this->address->alias, 'So Colissimo') !== false
&& in_array($this->order->id_carrier, $soflexibilite_relays)) {
$relais = true;
}
}
if ($this->ps15x && Module::isEnabled('chronopost')) {
$chronopost_relais = Configuration::get('CHRONORELAIS_CARRIER_ID');
if (strpos($this->address->alias, 'ChronoRelais') !== false
&& $this->order->id_carrier == $chronopost_relais) {
$relais = true;
}
}
if ($this->ps15x && Module::isEnabled('dpdfrance')) {
$relais = (bool)Db::getInstance()->getValue(
'SELECT `relay_id`
FROM `'._DB_PREFIX_.'dpdfrance_shipping`
WHERE `id_customer` = '.(int)$this->order->id_customer.'
AND `id_cart` = '.(int)$this->order->id_cart.'
AND `id_carrier` = '.(int)$this->order->id_carrier
);
}
if ($relais) {
// si l'adresse de livraison correspond a un relais on utilise l'adresse de facturation sur l'etiquette
$this->address = new Address((int)$this->order->id_address_invoice);
}
Context::getContext()->shop = new Shop($this->order->id_shop);
}
parent::__construct();
$this->path = _PS_MODULE_DIR_.'sonice_retour/';
$this->protocol = Configuration::get('PS_SSL_ENABLED') ? 'https://' : 'http://';
$this->url = $this->protocol.htmlspecialchars($_SERVER['HTTP_HOST'], ENT_COMPAT, 'UTF-8').
__PS_BASE_URI__.'modules/sonice_retour/';
$this->ps15x = version_compare(_PS_VERSION_, '1.5', '>=');
if (version_compare(_PS_VERSION_, '1.5', '>=')) {
$this->id_lang = (int)Context::getContext()->language->id;
$this->context = Context::getContext();
} else {
require_once(dirname(__FILE__).'/../backward_compatibility/backward.php');
$this->context = Context::getContext();
$this->id_lang = (int)Context::getContext()->language->id;
$this->context->shop->id = null;
$this->context->shop->id_shop_group = null;
}
}
public function l($string, $specific = false, $locale = null)
{
if (!$specific) {
$specific = basename(__FILE__, '.php');
}
if (class_exists('Translate')) {
return Translate::getModuleTranslation(get_parent_class(), $string, $specific);
}
return parent::l($string, $specific);
}
/**
* Call Coliposte Web Service
*
* @return bool
*/
public function callWS($login = null, $pwd = null, $params = null)
{
if (!$this->webServiceSupervision()) {
$this->error = new StdClass();
$this->error->errorID = 'SoNiceRetourPDF line '.__LINE__;
$this->error->error = $this->l(
'Network Supervision Failed. The Coliposte web service is currently having some trouble or is in maintenance. Please try again in a moment.'
);
return (false);
}
try {
if (is_array($params) && count($params)) {
$parameters = $params;
} else {
$parameters = $this->_getParams();
if ($login && $pwd) {
$parameters['letter']['password'] = $pwd;
$parameters['letter']['contractNumber'] = $login;
}
}
$this->response = parent::_callWS($parameters);
} catch (Exception $e) {
$this->error = new StdClass();
$this->error->errorID = 'SoNiceRetourPDF line '.__LINE__;
$this->error->error = sprintf('%s : %s', $e->getLine(), $e->getMessage());
return (false);
}
return (true);
}
public function getFormattedResponse()
{
$result = array();
$result['errorID'] = null;
$result['error'] = null;
$result['PdfUrl'] = null;
if (!$this->response instanceof SimpleXMLElement) {
$result['errorID'] = 'SoNiceRetourPDF #'.__LINE__;
$result['error'] = $this->l('The result does not have an XML format.');
return ($result);
}
$elements = $this->response->xpath('//Envelope/Body/generateLabelResponse/*');
if (!isset($elements[0]) || !isset($elements[0]->messages)) {
$result['errorID'] = 'SoNiceRetourPDF line '.__LINE__;
$result['error'] = 'Wrong Message';
if (isset($elements[0]->faultcode) && isset($elements[0]->faultstring)) {
echo '<pre>'.print_r($elements, true).'</pre>';
}
return ($result);
}
if ($elements[0]->messages->type == 'ERROR') {
$result['errorID'] = $elements[0]->messages->id;
$result['error'] = $elements[0]->messages->messageContent;
return ($result);
}
$result['parcelNumber'] = (string)$elements[0]->labelResponse->parcelNumber;
if ($this->demo) {
$result['parcelNumber'] = '8R'.abs(rand(1000000, 9999999)).abs(rand(100, 999));
}
// Download label
if ($this->demo) {
$result['PdfUrl'] = $this->url.'functions/demo_retour.pdf';
} elseif (isset($elements[0]->labelResponse->pdfUrl) && Tools::strlen((string)$elements[0]->labelResponse->pdfUrl)) {
$label = Tools::file_get_contents(str_replace('&amp;', '&', (string)$elements[0]->labelResponse->pdfUrl));
if (file_put_contents($this->path.'download/'.$result['parcelNumber'].'.pdf', $label)) {
$result['PdfUrl'] = str_replace('&amp;', '&', (string)$elements[0]->labelResponse->pdfUrl);
}
} elseif (!isset($elements[0]->labelResponse->pdfUrl)) {
$label = $this->raw_response->parse()->getLabelBinary();
if (!file_put_contents($this->path.'download/'.$result['parcelNumber'].'.pdf', $label)) {
echo $this->l('ERROR, unable to save label on the server. Please check the access permission of the folder ').
_PS_MODULE_DIR_.'sonice_retour/download/';
}
} else {
$result['errorID'] = 'SoNiceRetourPDF line '.__LINE__;
$result['error'] = 'No PDF from Coliposte to download...';
}
return ($result);
}
/**
* Fill the parameters for the web service
*
* @return array
*/
private function _getParams()
{
$date_deposite = new DateTime();
if (!Tools::strlen($this->module_conf['ContractNumber']) || !Tools::strlen($this->module_conf['Password']) ||
!Tools::strlen($this->module_conf['companyName']) || !Tools::strlen($this->module_conf['Line2']) ||
!Tools::strlen($this->module_conf['PostalCode']) || !Tools::strlen($this->module_conf['City'])) {
die($this->l('You need to configure the module with your login and address details.'));
}
if (Tools::strlen($this->module_conf['deposit_date'])) {
$date_deposite->modify('+'.(int)$this->module_conf['deposit_date'].' Day');
}
$order_total_weight = (float)$this->order->getTotalWeight();
if (!$order_total_weight || $order_total_weight < 0.01) {
$order_total_weight = 0.01;
}
if ($order_total_weight > 30) {
$order_total_weight /= 1000;
}
$phone_mobile = $this->address->phone_mobile;
if (!preg_match('/^((\+|00)([0-9]{1,3})\s?|0)[067]{1,2}(\s?\d{2}){4}$/', $phone_mobile)) {
$phone_mobile = $this->address->phone_mobile;
}
// For senderParcelRef
// If no id_return is given then we get the new one that should be created
$parcel_ref = (int)Tools::getValue('id_return') ?: (int)Db::getInstance()->getValue(
'SELECT 1 + IFNULL((
SELECT `id_order_return` AS `id_order_return`
FROM `'._DB_PREFIX_.'order_return`
ORDER BY `id_order_return` DESC
LIMIT 1),
0)'
);
$this->updateSenderAddress();
$this->updateAddresseeAddress();
$total_shipping_fee = version_compare(_PS_VERSION_, '1.5', '>=') ?
$this->order->total_shipping_tax_incl : $this->order->total_shipping;
$total_shipping_fee = Tools::ps_round($total_shipping_fee, 2);
$params = array(
'contractNumber' => SoNiceEtiquetageValidate::sanitize($this->module_conf['ContractNumber'], 'N6', 'contractNumber'),
'password' => SoNiceEtiquetageValidate::sanitize($this->module_conf['Password'], 'AN6..15', 'password'),
'outputFormat' => array(
'x' => 0,
'y' => 0,
'outputPrintingType' => 'PDF_A4_300dpi',
'returnType' => $this->module_conf['returnType']
),
'letter' => array(
'service' => array(
'productCode' => (Tools::strtoupper(Country::getIsoById((int)$this->address->id_country)) == 'FR' ? 'CORE' : 'CORI'),
'depositDate' => $date_deposite->format('Y-m-d'),
'transportationAmount' => SoNiceEtiquetageValidate::sanitize($total_shipping_fee * 100, 'N', 'transportationAmount'),
'totalAmount' => SoNiceEtiquetageValidate::sanitize($total_shipping_fee * 100, 'N', 'totalAmount'), // International
'orderNumber' => SoNiceEtiquetageValidate::sanitize($this->order->id, 'N0..30', 'orderNumber'),
'commercialName' => SoNiceEtiquetageValidate::sanitize($this->module_conf['companyName'], 'AN', 'commercialName'),
),
'parcel' => array(
'insuranceValue' => null,
'weight' => SoNiceEtiquetageValidate::sanitize($order_total_weight, 'N', 'weight'),
'nonMachinable' => false,
'instructions' => null,
'pickupLocationId' => null,
),
'customsDeclarations' => $this->getCustomsDeclarations(),
'sender' => array(
'senderParcelRef' => SoNiceEtiquetageValidate::sanitize('RET'.$parcel_ref, 'AN', 'senderParcelRef'),
'address' => array(
'companyName' => SoNiceEtiquetageValidate::sanitize($this->address->company, 'AN0..35', 'sender::companyName'),
'lastName' => SoNiceEtiquetageValidate::sanitize($this->address->lastname, 'A0..35', 'sender::lastname'),
'firstName' => SoNiceEtiquetageValidate::sanitize($this->address->firstname, 'A0..35', 'sender::firstname'),
'line0' => SoNiceEtiquetageValidate::sanitize($this->address->address2, 'AN0..35', 'sender::line0'),
// OCARAT utilisation de line1 pour indiquer le nom de l'expediteur si son adresse contient un nom de societe
'line1' => SoNiceEtiquetageValidate::sanitize(
(!empty($this->address->company) ?
'(' . $this->address->lastname . ' ' . $this->address->firstname . ')' :
null
),
'AN0..35',
'sender::line1'
),
'line2' => SoNiceEtiquetageValidate::sanitize($this->address->address1, 'AN1..35', 'sender::line2'),
'line3' => null,
'countryCode' => SoNiceEtiquetageValidate::sanitize(Country::getIsoById((int)$this->address->id_country), 'A2', 'sender::countryCode'),
'city' => SoNiceEtiquetageValidate::sanitize($this->address->city, 'AN1..35', 'sender::city'),
'zipCode' => SoNiceEtiquetageValidate::sanitize($this->address->postcode, 'AN0..9', 'sender::zipCode'),
'phoneNumber' => Tools::strlen($this->address->phone) > 5
? SoNiceEtiquetageValidate::sanitize($this->address->phone, 'TP0..15', 'sender::phoneNumber', Country::getIsoById((int)$this->address->id_country))
: null,
'mobileNumber' => $phone_mobile
? SoNiceEtiquetageValidate::sanitize($phone_mobile, 'TP0..15', 'sender::mobileNumber', Country::getIsoById((int)$this->address->id_country))
: SoNiceEtiquetageValidate::sanitize($this->address->phone_mobile, 'TP0..15', 'sender::mobileNumber', Country::getIsoById((int)$this->address->id_country)),
'doorCode1' => null,
'doorCode2' => null,
'email' => SoNiceEtiquetageValidate::sanitize($this->customer->email, 'AN0..80', 'sender::email'),
'intercom' => null
)
),
'addressee' => array(
'address' => array(
'companyName' => SoNiceEtiquetageValidate::sanitize($this->module_conf['companyName'], 'AN0..35', 'addressee::companyName'),
'lastName' => SoNiceEtiquetageValidate::sanitize($this->module_conf['Name'], 'A0..35', 'addressee::lastname'),
'firstName' => SoNiceEtiquetageValidate::sanitize($this->module_conf['Surname'], 'A0..29', 'addressee::firstname'),
'line0' => SoNiceEtiquetageValidate::sanitize($this->module_conf['Line0'], 'AN0..35', 'addressee::line0'),
'line1' => null,
'line2' => SoNiceEtiquetageValidate::sanitize($this->module_conf['Line2'], 'AN1..35', 'addressee::line2'),
'line3' => null,
'countryCode' => Country::getIsoById(Configuration::get('PS_SHOP_COUNTRY_ID')) ?: 'FR',
'city' => SoNiceEtiquetageValidate::sanitize($this->module_conf['City'], 'AN1..35', 'addressee::city'),
'zipCode' => SoNiceEtiquetageValidate::sanitize($this->module_conf['PostalCode'], 'AN0..9', 'addressee::zipCode'),
'phoneNumber' => SoNiceEtiquetageValidate::sanitize($this->module_conf['phoneNumber'], 'TP0..15', 'addressee::phoneNumber'),
'mobileNumber' => null,
'doorCode1' => null,
'doorCode2' => null,
'email' => SoNiceEtiquetageValidate::sanitize($this->module_conf['Mail'], 'AN0..80', 'addressee::email'),
'intercom' => null,
'language' => 'FR',
)
)
)
);
$this->validateParameters($params);
return ($params);
}
private function updateAddresseeAddress()
{
$product = (array)$this->order->getProducts();
$product = reset($product);
$id_warehouse = array_key_exists('id_warehouse', $product) ?
$product['id_warehouse'] : 0;
if (Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT') && $id_warehouse) {
$warehouse = new Warehouse($id_warehouse) ;
if (Validate::isLoadedObject($warehouse)) {
if ($id_address = (int)$warehouse->id_address) {
$address = new Address($id_address);
if (Validate::isLoadedObject($address)) {
$this->module_conf['companyName'] = $warehouse->name;
$this->module_conf['Line2'] = $address->address1;
$this->module_conf['Line0'] = $address->address2;
$this->module_conf['countryCode'] = Country::getIsoById($address->id_country);
$this->module_conf['city'] = $address->city;
$this->module_conf['zipCode'] = $address->postcode;
$this->module_conf['phoneNumber'] = $address->phone;
$this->module_conf['mobileNumber'] = $address->phone_mobile;
}
}
}
}
}
private function updateSenderAddress()
{
$relay = Db::getInstance()->getRow(
'SELECT *
FROM `'._DB_PREFIX_.'socolissimo_delivery_info`
WHERE `id_cart` = '.(int)$this->order->id_cart.'
AND `id_customer` = '.(int)$this->order->id_customer
);
if ($relay && count($relay)) {
$invoice_address = new Address($this->order->id_address_invoice);
if (Validate::isLoadedObject($invoice_address)) {
$this->address = $invoice_address;
// $this->address->company = $relay['cecompanyname'];
// $this->address->firstname = isset($relay['cefirstname']) && $relay['cefirstname'] ?
// Tools::ucfirst($relay['cefirstname']) : Tools::ucfirst($relay['prfirstname']);
// $this->address->lastname = isset($relay['cename']) && $relay['cename'] ?
// Tools::ucfirst($relay['cename']) : Tools::ucfirst($this->address->lastname);
// $this->address->address1 = isset($relay['praddress1']) && $relay['praddress1'] ?
// Tools::ucfirst($relay['praddress1']) : Tools::ucfirst($this->address->address1);
// $this->address->address2 = isset($relay['praddress2']) && $relay['praddress2'] ?
// Tools::ucfirst($relay['praddress2']) : Tools::ucfirst($this->address->address2);
// $this->address->postcode = isset($relay['przipcode']) && $relay['przipcode'] ?
// Tools::ucfirst($relay['przipcode']) : Tools::ucfirst($this->address->postcode);
// $this->address->city = isset($relay['prtown']) && $relay['prtown'] ?
// Tools::ucfirst($relay['prtown']) : Tools::ucfirst($this->address->city);
//
// if (isset($relay['cecountry']) && Tools::strlen($relay['cecountry']) == 2) {
// $id_country = Country::getByIso($relay['cecountry']);
// if ($this->address->id_country !== $id_country) {
// $this->address->id_country = $id_country;
// $this->address->country = Country::getNameById($this->order->id_lang, $id_country);
// }
// }
}
}
}
private function validateParameters(&$params)
{
// Lastname missing
// Marketplace order for instance
if (!isset($params['letter']['sender']['address']['lastName']) || !$params['letter']['sender']['address']['lastName']) {
if (strpos($params['letter']['sender']['address']['firstName'], 'co')) {
$full_name = explode('co', $params['letter']['sender']['address']['firstName']);
$full_name = explode(' ', reset($full_name));
$params['letter']['sender']['address']['firstName'] = array_shift($full_name);
$params['letter']['sender']['address']['lastName'] = implode(' ', $full_name);
} else {
$full_name = explode(' ', $params['letter']['sender']['address']['firstName']);
$params['letter']['sender']['address']['firstName'] = array_shift($full_name);
$params['letter']['sender']['address']['lastName'] = implode(' ', $full_name);
}
}
// Firstname missing
if (!isset($params['letter']['sender']['address']['firstName']) || !$params['letter']['sender']['address']['firstName'] ||
Tools::strlen($params['letter']['sender']['address']['firstName']) < 2) {
if (strpos($params['letter']['sender']['address']['lastName'], ' co ')) {
$full_name = explode('co', $params['letter']['sender']['address']['lastName']);
$full_name = explode(' ', reset($full_name));
$params['letter']['sender']['address']['lastName'] = array_shift($full_name);
$params['letter']['sender']['address']['firstName'] = implode(' ', $full_name);
} else {
$full_name = explode(' ', $params['letter']['sender']['address']['lastName']);
$params['letter']['sender']['address']['lastName'] = array_shift($full_name);
$params['letter']['sender']['address']['firstName'] = implode(' ', $full_name);
}
}
// If COLI and no shipping fee then set it to 1EUR
if (isset($params['letter']['service']['productCode']) &&
in_array($params['letter']['service']['productCode'], array('CORI'))) {
$params['letter']['service']['transportationAmount'] = max(
100,
(int)$params['letter']['service']['transportationAmount']
);
$params['letter']['service']['totalAmount'] = max(
100,
(int)$params['letter']['service']['totalAmount']
);
}
}
private function getCustomsDeclarations()
{
$customs_declarations = null;
$address_country = Tools::strtoupper(Country::getIsoById((int)$this->address->id_country));
$currency = new Currency($this->order->id_currency);
if (in_array($address_country, $this->need_cn23)) {
return $customs_declarations;
}
if (!Validate::isLoadedObject($currency)) {
$currency = new stdClass();
$currency->iso_code = 'EUR';
}
// Invoice number missing fix
// In case of external ERP, etc.
if (!$this->order->invoice_number) {
$this->order->invoice_number = sprintf('%06s', $this->order->id);
}
$articles = array();
foreach ($this->order->getProducts() as $id_product => $product) {
if ($product['product_price'] == 0) {
$product['product_price'] = 1;
}
$articles[$id_product] = array(
'description' => SoNiceEtiquetageValidate::sanitize(
Tools::substr(str_replace(',', '', strip_tags($product['product_name'])), 0, 63),
'AN1..64'
),
'quantity' => (int)SoNiceEtiquetageValidate::sanitize($product['product_quantity'], 'N'),
'weight' => ($product['product_weight'] >= 0.01) ?
(float)SoNiceEtiquetageValidate::sanitize($product['product_weight'], 'N') : 0.01,
'value' => (float)SoNiceEtiquetageValidate::sanitize($product['product_price'], 'N'),
'hsCode' => 123456, // TODO SoNiceEtiquetageHsCode::getProductHsCode($product['product_id']),
'originCountry' => $address_country,
'currency' => $currency->iso_code,
'artref' => $product['product_reference'],
'originalIdent' => 'A'
);
if (isset($this->module_conf['weight_unit']) && $this->module_conf['weight_unit'] == 'g') {
$articles[$id_product]['weight'] /= 1000;
}
}
$articles['category'] = array(
'value' => 6 // Retour de marchandise
);
$articles['original'] = array(
'originalIdent' => 'A',
'originalInvoiceNumber' => $this->order->invoice_number,
'originalInvoiceDate' => date('Y-m-d', strtotime($this->order->invoice_date)),
'originalParcelNumber' => $this->order->shipping_number
);
$invoice_format = '%1$s%2$06d';
if (Configuration::get(
'PS_INVOICE_USE_YEAR',
null,
$this->context->shop->id_shop_group,
$this->context->shop->id
)) {
$invoice_format = Configuration::get(
'PS_INVOICE_YEAR_POS',
null,
$this->context->shop->id_shop_group,
$this->context->shop->id
) ? '%1$s%3$s/%2$06d' : '%1$s%2$06d/%3$s';
}
$customs_declarations = array(
'includeCustomsDeclarations' => true,
'contents' => $articles,
'invoiceNumber' => sprintf(
$invoice_format,
Configuration::get(
'PS_INVOICE_PREFIX',
null,
$this->context->shop->id_shop_group,
$this->context->shop->id
),
$this->order->invoice_number
),
'licenceNumber' => null,
'certificatNumber' => null
);
return ($customs_declarations);
}
public static function getParcelNumberByIdOrder($id_order)
{
if (!is_int($id_order)) {
return (false);
}
return (Db::getInstance()->getValue('SELECT `parcel_number` FROM '._DB_PREFIX_.self::SCE_TABLE.' WHERE `id_order` = '.(int)$id_order));
}
public static function getLabelInformationByIdOrder($id_order)
{
if (!is_int($id_order)) {
return (false);
}
$data = Db::getInstance()->executeS('SELECT * FROM '._DB_PREFIX_.self::SCE_TABLE.' WHERE `id_order` = '.(int)$id_order);
if (!is_array($data) || !count($data) || !$data) {
return (false);
}
return ($data[0]);
}
public static function getIdOrderByParcelNumber($parcel_number)
{
if (!$parcel_number) {
return (false);
}
return ((int)Db::getInstance()->getValue('SELECT `id_order` FROM '._DB_PREFIX_.self::SCE_TABLE.' WHERE `parcel_number` = "'.$parcel_number.'"'));
}
public static function deleteLabelByIdOrder($id_order)
{
if (!$id_order) {
return (false);
}
return (Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'sonice_etq_label WHERE `id_order` = '.(int)$id_order));
}
public static function getIdOrderCarrierByOrderId($id_order)
{
if (!$id_order) {
return (false);
}
return (Db::getInstance()->getValue('SELECT `id_order_carrier` FROM `'._DB_PREFIX_.'order_carrier` WHERE `id_order` = '.(int)$id_order));
}
}

View File

@@ -0,0 +1,74 @@
<?php
/**
* NOTICE OF LICENSE
*
* This source file is subject to a commercial license from Common-Services Co., Ltd.
* Use, copy, modification or distribution of this source file without written
* license agreement from the SARL SMC is strictly forbidden.
* In order to obtain a license, please contact us: contact@common-services.com
* ...........................................................................
* INFORMATION SUR LA LICENCE D'UTILISATION
*
* L'utilisation de ce fichier source est soumise a une licence commerciale
* concedee par la societe Common-Services Co., Ltd.
* Toute utilisation, reproduction, modification ou distribution du present
* fichier source sans contrat de licence ecrit de la part de la Common-Services Co. Ltd. est
* expressement interdite.
* Pour obtenir une licence, veuillez contacter Common-Services Co., Ltd. a l'adresse: contact@common-services.com
* ...........................................................................
*
* @package SoNice Retour
* @author Alexandre D.
* @copyright Copyright (c) 2011-2015 Common Services Co Ltd - 90/25 Sukhumvit 81 - 10260 Bangkok - Thailand
* @license Commercial license
* Support by mail : support.sonice@common-services.com
*/
class SoNiceRetourTools
{
public static function cleanup()
{
$now = time();
$output_dir = _PS_MODULE_DIR_.'sonice_retour/download/';
if (!is_dir($output_dir)) {
return null;
}
$files_pdf = glob($output_dir.'*.pdf');
$files_prn = glob($output_dir.'*.prn');
$files = array_merge($files_pdf, $files_prn);
if (!is_array($files) || !count($files)) {
return null;
}
// Sort by date
foreach ($files as $file) {
if (filemtime($file) < $now - (86400 * 31)) {
unlink($file);
}
}
}
public static function moduleIsInstalled($module_name)
{
if (method_exists('Module', 'isInstalled')) {
return (Module::isInstalled($module_name));
} else {
Db::getInstance()->executeS(
'SELECT `id_module`
FROM `'._DB_PREFIX_.'module`
WHERE `name` = \''.pSQL($module_name).'\''
);
return (bool)Db::getInstance()->numRows();
}
}
public static function arrayMapCastInteger($value)
{
return (int)$value;
}
}

View File

@@ -0,0 +1,11 @@
<?php
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.

View File

@@ -0,0 +1,240 @@
<?php
/**
* NOTICE OF LICENSE
*
* This source file is subject to a commercial license from SARL SMC
* Use, copy, modification or distribution of this source file without written
* license agreement from the SARL SMC is strictly forbidden.
* In order to obtain a license, please contact us: contact@common-services.com
* ...........................................................................
* INFORMATION SUR LA LICENCE D'UTILISATION
*
* L'utilisation de ce fichier source est soumise a une licence commerciale
* concedee par la societe SMC
* Toute utilisation, reproduction, modification ou distribution du present
* fichier source sans contrat de licence ecrit de la part de la SARL SMC est
* expressement interdite.
* Pour obtenir une licence, veuillez contacter Common-Services Co., Ltd. a l'adresse: contact@common-services.com
* ...........................................................................
*
* @author Debusschere A.
* @copyright Copyright (c) 2011-2015 Common Services Co Ltd - 90/25 Sukhumvit 81 - 10260 Bangkok - Thailand
* @package Shared
* @license Commercial license
*/
if (!defined('_PS_VERSION_')) {
exit;
}
/**
* Class generating configuration message
*/
class ConfigureMessage
{
const _MESSAGE_ = '<div class="%s">%s</div>';
const _DEBUG_ = '<div class="%s"><pre>%s</pre></div>';
const _CLASS_ERROR_15_ = 'error';
const _CLASS_WARNING_15_ = 'warn';
const _CLASS_SUCCESS_15_ = 'conf';
const _CLASS_INFO_15_ = 'info hint';
const _CLASS_ERROR_16_ = 'alert alert-danger';
const _CLASS_WARNING_16_ = 'alert alert-warning';
const _CLASS_SUCCESS_16_ = 'alert alert-success';
const _CLASS_INFO_16_ = 'alert alert-info';
protected static $msg_list = array();
protected static $has_error_msg = false;
protected static $has_warning_msg = false;
protected static $has_success_msg = false;
protected static $has_info_msg = false;
/**
* Generate the HTML code corresponding to an error message
*
* @param String $msg
* return void|null
*/
public static function error($msg = 'Error')
{
if (is_array($msg) && count($msg)) {
foreach ($msg as $ps_error) {
self::error($ps_error);
}
return null;
}
$error_msg = null;
if (version_compare(_PS_VERSION_, '1.6', '<')) {
$error_msg = sprintf(self::_MESSAGE_, self::_CLASS_ERROR_15_, $msg);
} else {
$error_msg = '<div class="bootstrap">'.sprintf(self::_MESSAGE_, self::_CLASS_ERROR_16_, $msg).'</div>';
}
self::$has_error_msg = true;
self::$msg_list[] = $error_msg;
}
/**
* Generate the HTML code corresponding to a warning message
*
* @param String $msg
*/
public static function warning($msg = 'Warning')
{
$warning_msg = null;
if (version_compare(_PS_VERSION_, '1.6', '<')) {
$warning_msg = sprintf(self::_MESSAGE_, self::_CLASS_WARNING_15_, $msg);
} else {
$warning_msg = '<div class="bootstrap">'.sprintf(self::_MESSAGE_, self::_CLASS_WARNING_16_, $msg).'</div>';
}
self::$has_warning_msg = true;
self::$msg_list[] = $warning_msg;
}
/**
* Generate the HTML code corresponding to a success message
*
* @param String $msg
*/
public static function success($msg = 'Success')
{
$success_msg = null;
if (version_compare(_PS_VERSION_, '1.6', '<')) {
$success_msg = sprintf(self::_MESSAGE_, self::_CLASS_SUCCESS_15_, $msg);
} else {
$success_msg = '<div class="bootstrap">'.sprintf(self::_MESSAGE_, self::_CLASS_SUCCESS_16_, $msg).'</div>';
}
self::$has_success_msg = true;
self::$msg_list[] = $success_msg;
}
/**
* Generate the HTML code corresponding to an information message
*
* @param String $msg
*/
public static function info($msg = 'Success')
{
$info_msg = null;
if (version_compare(_PS_VERSION_, '1.6', '<')) {
$info_msg = sprintf(self::_MESSAGE_, self::_CLASS_INFO_15_, $msg);
} else {
$info_msg = '<div class="bootstrap">'.sprintf(self::_MESSAGE_, self::_CLASS_INFO_16_, $msg).'</div>';
}
self::$has_info_msg = true;
self::$msg_list[] = $info_msg;
}
/**
* Generate the HTML code corresponding to a debug message
*
* @param String $msg
*/
public static function debug($msg = 'Debug')
{
$info_msg = null;
if (version_compare(_PS_VERSION_, '1.6', '<')) {
$info_msg = sprintf(self::_DEBUG_, self::_CLASS_INFO_15_, $msg);
} else {
$info_msg = '<div class="bootstrap">'.sprintf(self::_DEBUG_, self::_CLASS_INFO_16_, $msg).'</div>';
}
self::$msg_list[] = $info_msg;
}
/**
* Return the html code of all messages to be displayed
*
* @return String
*/
public static function display()
{
$html = '';
if (count(self::$msg_list)) {
foreach (self::$msg_list as $msg) {
$html .= $msg;
}
}
return ($html);
}
/**
* Return the list of message
*
* @return Array
*/
public static function getMessageList()
{
return (self::$msg_list);
}
/**
* Return true if the message list contain at least 1 error message
*
* @return Boolean
*/
public static function hasErrorMessage()
{
return (self::$has_error_msg);
}
/**
* Return true if the message list contain at least 1 warning message
*
* @return Boolean
*/
public static function hasWarningMessage()
{
return (self::$has_warning_msg);
}
/**
* Return true if the message list contain at least 1 success message
*
* @return Boolean
*/
public static function hasSuccessMessage()
{
return (self::$has_success_msg);
}
/**
* Return true if the message list contain at least 1 information message
*
* @return Boolean
*/
public static function hasInfoMessage()
{
return (self::$has_info_msg);
}
}

View File

@@ -0,0 +1,105 @@
<?php
/**
* NOTICE OF LICENSE
*
* This source file is subject to a commercial license from SARL SMC
* Use, copy, modification or distribution of this source file without written
* license agreement from the SARL SMC is strictly forbidden.
* In order to obtain a license, please contact us: contact@common-services.com
* ...........................................................................
* INFORMATION SUR LA LICENCE D'UTILISATION
*
* L'utilisation de ce fichier source est soumise a une licence commerciale
* concedee par la societe SMC
* Toute utilisation, reproduction, modification ou distribution du present
* fichier source sans contrat de licence ecrit de la part de la SARL SMC est
* expressement interdite.
* Pour obtenir une licence, veuillez contacter Common-Services Co., Ltd. a l'adresse: contact@common-services.com
* ...........................................................................
*
* @author Debusschere A.
* @copyright Copyright (c) 2011-2015 Common Services Co Ltd - 90/25 Sukhumvit 81 - 10260 Bangkok - Thailand
* @package Shared
* @license Commercial license
*/
if (!defined('_PS_VERSION_')) {
exit;
}
/**
* Class generating configuration tabs
*/
class ConfigureTab
{
public static function generateTabs($tab_list, $module_name = '')
{
// $protocol = Configuration::get('PS_SSL_ENABLED') ? 'https://' : 'http://';
if (!Tools::strlen($module_name)) {
$module_name = self::getModuleName();
}
// commented out by O.B. on 2015-03-10: cause cross domain redirection issue
// $url = $protocol.htmlspecialchars($_SERVER['HTTP_HOST'], ENT_COMPAT, 'UTF-8').
// __PS_BASE_URI__.'modules/'.$module_name.'/';
$url = __PS_BASE_URI__.'modules/'.$module_name.'/';
$context = Context::getContext();
$context->smarty->assign(array(
'tab_list' => $tab_list,
'img_dir' => $url.'views/img/shared/tab/',
'module_url' => $url,
'module_name' => $module_name,
'ps16x' => version_compare(_PS_VERSION_, '1.6', '>='),
'ps15x' => version_compare(_PS_VERSION_, '1.5', '>='),
'has_line' => self::hasLine($tab_list),
'line_number' => self::getLineNumber($tab_list)
));
$html = $context->smarty->fetch(dirname(__FILE__).'/../../views/templates/admin/shared/tabs.tpl');
return ($html);
}
public static function getModuleName($addslash = false)
{
$e = new Exception();
$trace = $e->getTrace();
$caller = $trace[2];
if (!isset($caller['class'])) {
return (false);
}
return (Tools::strtolower($caller['class']).($addslash ? '/' : ''));
}
public static function hasLine($tab_list)
{
if (is_array($tab_list) && count($tab_list)) {
foreach ($tab_list as $tab) {
if (isset($tab['line']) && $tab['line']) {
return (true);
}
}
}
return (false);
}
public static function getLineNumber($tab_list)
{
$line_number = array();
if (is_array($tab_list) && count($tab_list)) {
foreach ($tab_list as $tab) {
if (isset($tab['line']) && $tab['line']) {
$line_number[$tab['line']] = 1;
}
}
}
return (count($line_number));
}
}

View File

@@ -0,0 +1,11 @@
<?php
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,131 @@
<?php
/**
* NOTICE OF LICENSE
*
* This source file is subject to a commercial license from SARL SMC
* Use, copy, modification or distribution of this source file without written
* license agreement from the SARL SMC is strictly forbidden.
* In order to obtain a license, please contact us: contact@common-services.com
* ...........................................................................
* INFORMATION SUR LA LICENCE D'UTILISATION
*
* L'utilisation de ce fichier source est soumise a une licence commerciale
* concedee par la societe SMC
* Toute utilisation, reproduction, modification ou distribution du present
* fichier source sans contrat de licence ecrit de la part de la SARL SMC est
* expressement interdite.
* Pour obtenir une licence, veuillez contacter Common-Services Co., Ltd. a l'adresse: contact@common-services.com
* ...........................................................................
*
* @author Debusschere A.
* @copyright Copyright (c) 2011-2015 Common Services Co Ltd - 90/25 Sukhumvit 81 - 10260 Bangkok - Thailand
* @package Shared
* @license Commercial license
*/
/**
* Class generating module tabs
*/
class CommonServicesTab extends Tab
{
const ADD = 'a';
const REMOVE = 'd';
const UPDATE = 'u';
public static function setup($action, $class, $name, $parent, $debug = false)
{
switch ($action) {
case self::ADD:
if (!Tab::getIdFromClassName($class)) {
if (!self::installModuleTab($class, $name, $parent)) {
if ($debug) {
printf('%s(#%d): Unable to install: %s', basename(__FILE__), __LINE__, $class);
}
return false;
}
}
break;
case self::UPDATE:
if (self::Setup(self::REMOVE, $class, $name, $parent, $debug)) {
return (self::Setup(self::ADD, $class, $name, $parent, $debug));
}
break;
case self::REMOVE:
if (Tab::getIdFromClassName($class)) {
if (!self::uninstallModuleTab($class)) {
if ($debug) {
printf('%s(#%d): Unable to uninstall: %s', basename(__FILE__), __LINE__, $class);
}
return false;
}
}
break;
}
return true;
}
private static function installModuleTab($tabClass, $tabName, $tabParent)
{
$module = self::getModuleName();
$pass = true;
$tabNameLang = array();
foreach (Language::getLanguages() as $language) {
$tabNameLang[$language['id_lang']] = $tabName;
}
$tab = new Tab();
$tab->name = $tabNameLang;
$tab->class_name = $tabClass;
$tab->module = $module;
$tab->id_parent = Tab::getIdFromClassName($tabParent);
// For Prestashop 1.2
if (version_compare(_PS_VERSION_, '1.3', '<')) {
$pass = $tab->add();
} else {
$pass = $tab->save();
}
return ($pass);
}
public static function getModuleName()
{
$trace = debug_backtrace();
$caller = $trace[4];
if (!isset($caller['class'])) {
return (false);
} else {
return (Tools::strtolower($caller['class']));
}
}
private static function uninstallModuleTab($tabClass)
{
$pass = true;
$idTab = Tab::getIdFromClassName($tabClass);
// Big Bug PS 1.4 - cached entry is not removed on delete() ...
if (version_compare(_PS_VERSION_, '1.5.5', '<')) {
if (isset(Tab::$_getIdFromClassName[Tools::strtolower($tabClass)])) {
unset(Tab::$_getIdFromClassName[Tools::strtolower($tabClass)]);
}
if (isset(Tab::$_getIdFromClassName[($tabClass)])) {
unset(Tab::$_getIdFromClassName[($tabClass)]);
}
}
if ($idTab != 0) {
$tab = new Tab($idTab);
$pass = $tab->delete();
}
return ($pass);
}
}

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<module>
<name>sonice_retour</name>
<displayName><![CDATA[SoNice Retour]]></displayName>
<version><![CDATA[2.0.09]]></version>
<description><![CDATA[This service permits to generate labels with or without proof of submission according to your contract.]]></description>
<author><![CDATA[Common-Services]]></author>
<tab><![CDATA[shipping_logistics]]></tab>
<is_configurable>1</is_configurable>
<need_instance>0</need_instance>
<limited_countries></limited_countries>
</module>

File diff suppressed because one or more lines are too long

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1 @@
Hello World !

View File

@@ -0,0 +1,11 @@
<?php
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,151 @@
<?php
global $_MODULE;
$_MODULE = array();
$_MODULE['<{sonice_retour}prestashop>sonice_retour_391a3885e2f8914b4982a783246cdb80'] = 'L\'extension cURL doit être activée sur votre serveur.';
$_MODULE['<{sonice_retour}prestashop>sonice_retour_b7b77a75ea6b3e288f98e74063d40a37'] = 'La variable `display_errors` de PHP est activée.';
$_MODULE['<{sonice_retour}prestashop>sonice_retour_c05fdc9a5510c343c6f53bae8d649c89'] = 'La constante Prestashop _PS_MODE_DEV_ est activée.';
$_MODULE['<{sonice_retour}prestashop>sonice_retour_ea7ab797cd015a7e11c901dd14375b73'] = 'La fonction phpinfo() est désactivée pour des raisons de sécurité.';
$_MODULE['<{sonice_retour}prestashop>sonice_retour_e307db07b3975fef922a80d07455ee5e'] = 'Base de données';
$_MODULE['<{sonice_retour}prestashop>sonice_retour_da725565bdf9672aebce12c389eecf3a'] = 'Echec d\'écriture dans le dossier';
$_MODULE['<{sonice_retour}prestashop>sonice_retour_dfc7f76358db8692831406dd8c9f8e11'] = 'Une erreur s\'est produite pendant l\'installation avec parent::install().';
$_MODULE['<{sonice_retour}prestashop>sonice_retour_dba15d6330818bbc135290370955bb24'] = 'Une erreur s\'est produite pendant l\'enregistrement des hooks.';
$_MODULE['<{sonice_retour}prestashop>sonice_retour_4a71215765336a824dc27d05cd86e715'] = 'Une erreur s\'est produite pendant la vérification des droits sur le dossier.';
$_MODULE['<{sonice_retour}prestashop>sonice_retour_9f88712da436e8d35afd72e30cddf828'] = 'Une erreur s\'est produite pendant la désinstallation des hooks.';
$_MODULE['<{sonice_retour}prestashop>sonice_retour_5431e5e203773b8fbf0f3823db849c61'] = 'Une erreur s\'est produite pendant la désinstallation avec parent::uninstall().';
$_MODULE['<{sonice_retour}prestashop>sonice_retour_8661626e97af70a1d76fb9dc248545ce'] = 'Configuration mise à jour.';
$_MODULE['<{sonice_retour}prestashop>sonice_retour_24c866bdc049f438bfd0a264b0bae43a'] = 'Échec de la mise à jour.';
$_MODULE['<{sonice_retour}prestashop>sonice_retour_08bd40c7543007ad06e4fce31618f6ec'] = 'Identifiants';
$_MODULE['<{sonice_retour}prestashop>sonice_retour_dd7bf230fde8d4836917806aff6a6b27'] = 'Adresse';
$_MODULE['<{sonice_retour}prestashop>sonice_retour_f4f70727dc34561dfde1a3c529b6205c'] = 'Paramètres';
$_MODULE['<{sonice_retour}prestashop>sonice_retour_63d5049791d9d79d86e9a108b0a999ca'] = 'Référence';
$_MODULE['<{sonice_retour}prestashop>sonice_retour_deb10517653c255364175796ace3553f'] = 'Produit';
$_MODULE['<{sonice_retour}prestashop>sonice_retour_694e8d1f2ee056f98ee488bdc4982d73'] = 'Quantité';
$_MODULE['<{sonice_retour}prestashop>sonice_retour_11f993ef8b81b14a36c4e4d3244db7c7'] = 'Un nouveau retour';
$_MODULE['<{sonice_retour}prestashop>sonice_retour_472c55d234f470420b8d3ecf61d97367'] = 'Commande Retour - #%06d';
$_MODULE['<{sonice_retour}prestashop>sonice_retour_88183b946cc5f0e8c96b2e66e1c74a7e'] = 'Inconnu';
$_MODULE['<{sonice_retour}prestashop>soniceretourpdf_5eab11a2ee6cd2687ea1219d17954510'] = 'Le résultat n\'a pas de format XML.';
$_MODULE['<{sonice_retour}prestashop>soniceretourpdf_1034ad5fe114ea11ee9e7bcab6137999'] = 'ERREUR, impossible de sauvegarder l\'étiquette sur votre serveur. Merci de vérifier les permissions d\'accès au dossier';
$_MODULE['<{sonice_retour}prestashop>soniceretourpdf_6d7ea65b52a49d6e8bf2d7013f2f0b2b'] = 'Vous devez configurer le module avec vos identifiants et votre adresse.';
$_MODULE['<{sonice_retour}prestashop>check_login_8c56f9a6342f05711b726635e44b78c8'] = 'Impossible de récupérer les informations de connexion.';
$_MODULE['<{sonice_retour}prestashop>check_login_92d5a6f66eba552207a3abae8f03485b'] = 'Une erreur s\'est produite lors de l\'initialisation de la classe SoNiceRetourPDF.';
$_MODULE['<{sonice_retour}prestashop>check_login_dba7a5a0ad95d05ba1dea1c06d209e74'] = 'Une erreur s\'est produite pendant l\'appel au web service.';
$_MODULE['<{sonice_retour}prestashop>get_labels_7363ca7331cd8c8c054771b584481212'] = 'Impossible de récupérer le tableau contenant les IDs de commande.';
$_MODULE['<{sonice_retour}prestashop>get_labels_2b56b60f878922093facd42284848a0c'] = 'Détails';
$_MODULE['<{sonice_retour}prestashop>get_labels_a240fa27925a635b08dc28c9e4f9216d'] = 'Commande';
$_MODULE['<{sonice_retour}prestashop>get_labels_2233f46f3e1e208620ef871c22e22f39'] = 'Il semblerait que les données que nous essayons d\'insérer dans la base de données soit éronnés. Les valeurs sont :';
$_MODULE['<{sonice_retour}prestashop>get_labels_2aee0be2678ee90fd327cc186826438e'] = 'Absent(e)';
$_MODULE['<{sonice_retour}prestashop>get_labels_7fd3178f4f811cd2467823e337635213'] = 'L\'étiquette n\'a pas été sauvegardé, essayé plus tard.';
$_MODULE['<{sonice_retour}prestashop>conf_account_99dea78007133396a7b8ed70578ac6ae'] = 'Identifiants';
$_MODULE['<{sonice_retour}prestashop>conf_account_dc647eb65e6711e155375218212b3964'] = 'Mot de passe';
$_MODULE['<{sonice_retour}prestashop>conf_account_2c40b7f73f847be513f358f503fab7e5'] = 'Vérifier';
$_MODULE['<{sonice_retour}prestashop>conf_account_f5465b0444ddcd9b8663413da479c8c7'] = 'Vos identifiants sont corrects !';
$_MODULE['<{sonice_retour}prestashop>conf_account_26897bbc6f397e5c45e8a302a5a30e23'] = 'Vos identifiants sont incorrects :';
$_MODULE['<{sonice_retour}prestashop>conf_account_ec3028a12402ab7f43962a6f3a667b6e'] = 'Mode débug';
$_MODULE['<{sonice_retour}prestashop>conf_account_93cba07454f06a4a960172bbd6e2a435'] = 'Oui';
$_MODULE['<{sonice_retour}prestashop>conf_account_bafd7322c6e97d25b6299b5d6fe8920b'] = 'Non';
$_MODULE['<{sonice_retour}prestashop>conf_account_4245499695408b974322be6f01b0d17a'] = 'Mode test';
$_MODULE['<{sonice_retour}prestashop>conf_address_dd7bf230fde8d4836917806aff6a6b27'] = 'Adresse';
$_MODULE['<{sonice_retour}prestashop>conf_address_14fb40f197fba0997de4063651cbc3c0'] = 'Cette adresse sera utilisée sur l\'étiquette durant sa création.';
$_MODULE['<{sonice_retour}prestashop>conf_address_f489aec34ed35eef9ee82032d4ec4c2d'] = 'Elle correspond à l\'adresse de l\'expéditeur.';
$_MODULE['<{sonice_retour}prestashop>conf_address_e7b47c58815acf1d3afa59a84b5db7fb'] = 'Raison social';
$_MODULE['<{sonice_retour}prestashop>conf_address_49ee3087348e8d44e1feda1917443987'] = 'Nom';
$_MODULE['<{sonice_retour}prestashop>conf_address_8e55577a8ed3b20bff65d23c000280d4'] = 'Prénom';
$_MODULE['<{sonice_retour}prestashop>conf_address_46140fd4f90101f3beccfd3428bea873'] = 'Nom du service';
$_MODULE['<{sonice_retour}prestashop>conf_address_5e178542b85fb18ca3c459e9a95f4f2e'] = 'Code Postal';
$_MODULE['<{sonice_retour}prestashop>conf_address_57d056ed0984166336b7879c2af3657f'] = 'Ville';
$_MODULE['<{sonice_retour}prestashop>conf_address_bcc254b55c4a1babdf1dcb82c207506b'] = 'Téléphone';
$_MODULE['<{sonice_retour}prestashop>conf_address_19f823c6453c2b1ffd09cb715214813d'] = 'Champs requis';
$_MODULE['<{sonice_retour}prestashop>conf_informations_279d5d00ea04380ed74235702e10567f'] = 'Vérification de la Configuration';
$_MODULE['<{sonice_retour}prestashop>conf_informations_cc9b821f4d3c01e7cefffaf94056021a'] = 'La configuration du module et le contrôle d\'intégrité ont été réalisé avec succès.';
$_MODULE['<{sonice_retour}prestashop>conf_informations_eec6f26b86c7b449c8b292b5b0315d17'] = 'Paramètres PHP';
$_MODULE['<{sonice_retour}prestashop>conf_informations_7d5a27f1b53dc519eac7bb288f664892'] = 'Plus d\'informations';
$_MODULE['<{sonice_retour}prestashop>conf_informations_38338588815210b0bae966d889e38416'] = 'Paramètres PretaShop';
$_MODULE['<{sonice_retour}prestashop>conf_setting_f4f70727dc34561dfde1a3c529b6205c'] = 'Paramètres';
$_MODULE['<{sonice_retour}prestashop>conf_setting_935807508a8c79ff0493e684f3a558ea'] = 'Date de dépôt estimée';
$_MODULE['<{sonice_retour}prestashop>conf_setting_44fdec47036f482b68b748f9d786801b'] = 'jour(s)';
$_MODULE['<{sonice_retour}prestashop>conf_setting_8d4ff3a0f20f55b226a8b59a37701731'] = 'Envoyer l\'étiquette au client';
$_MODULE['<{sonice_retour}prestashop>conf_setting_36911f400a4d2038f2066c9358c3bc49'] = 'Ne pas envoyer l\'étiquette au client.';
$_MODULE['<{sonice_retour}prestashop>conf_setting_9b35535139b82915b1f33eea609100d6'] = 'Envoyer l\'étiquette en tant que pièce jointe';
$_MODULE['<{sonice_retour}prestashop>conf_setting_9b75c2d7a6e28187e0daf20c26d94857'] = 'Envoyer l\'étiquette en tant que lien hypertexte (URL)';
$_MODULE['<{sonice_retour}prestashop>conf_setting_fe7ab552e01895d582752eeac4e1a0f8'] = 'Ouvrir l\'étiquette dans';
$_MODULE['<{sonice_retour}prestashop>conf_setting_48915e1a7777d52a60bcff704b181d88'] = 'L\'interface par défaut du navigateur (défaut)';
$_MODULE['<{sonice_retour}prestashop>conf_setting_9e2b2e8dbd5ce5af8a2ca99abdb08278'] = 'Dans une nouvelle fenêtre';
$_MODULE['<{sonice_retour}prestashop>conf_setting_8c9bce3aef2cd95825058272e7d6f675'] = 'Envoyer un mail au client une fois l\'étiquette créée';
$_MODULE['<{sonice_retour}prestashop>conf_setting_2d4e2b165efb5699e97ebe91edd6708b'] = 'Ne pas envoyer de mail';
$_MODULE['<{sonice_retour}prestashop>conf_sonice_retour_450ee027c4d7abb2e0f6587e0a4b1e9f'] = 'Ce Web Service permet de générer des étiquettes Colissimo pour le retour de vos colis.';
$_MODULE['<{sonice_retour}prestashop>conf_sonice_retour_c4c95c36570d5a8834be5e88e2f0f6b2'] = 'Informations';
$_MODULE['<{sonice_retour}prestashop>conf_sonice_retour_ac858b8ec193d2e6eb95cb8d611a56a1'] = 'Ce module est fourni par';
$_MODULE['<{sonice_retour}prestashop>conf_sonice_retour_71611e8bc3d53ba196b4ecae9143aac4'] = 'Pour plus d\'informations, suivez nous sur notre blog';
$_MODULE['<{sonice_retour}prestashop>conf_sonice_retour_75856f3970cc3dddb58fda68068c4f60'] = 'Plus d\'informations sur nous sur le site de Prestashop';
$_MODULE['<{sonice_retour}prestashop>conf_sonice_retour_46f5a6aafb0c9281896bc83e12799510'] = 'Vous allez adorer nos autres modules';
$_MODULE['<{sonice_retour}prestashop>conf_sonice_retour_5b6cf869265c13af8566f192b4ab3d2a'] = 'Documentation';
$_MODULE['<{sonice_retour}prestashop>conf_sonice_retour_b5182d8eb75347e441450c33a940f9c4'] = 'Merci de lire la documentation';
$_MODULE['<{sonice_retour}prestashop>conf_sonice_retour_db5eb84117d06047c97c9a0191b5fffe'] = 'Support';
$_MODULE['<{sonice_retour}prestashop>conf_sonice_retour_5a20360a4561a8537d41d37780992c17'] = 'Le support technique est disponible seulement par e-mail.';
$_MODULE['<{sonice_retour}prestashop>conf_sonice_retour_651430de2bd38198965f8268749e908b'] = 'Pour tout support, merci de nous fournir';
$_MODULE['<{sonice_retour}prestashop>conf_sonice_retour_bb15b8d458f23303a9bb6a5f4b6f2f34'] = 'Une description détaillée du problème rencontré';
$_MODULE['<{sonice_retour}prestashop>conf_sonice_retour_5fa2806040520dc81cd5ed2534d795cb'] = 'Votre ID de commande disponible dans votre historique des commandes sur Prestashop Addons';
$_MODULE['<{sonice_retour}prestashop>conf_sonice_retour_7a579b573ff0f01c4bfa0412bc3abd03'] = 'Votre version de Prestashop';
$_MODULE['<{sonice_retour}prestashop>conf_sonice_retour_eec204828b3f96091a3cfa061a25918b'] = 'Votre version du module';
$_MODULE['<{sonice_retour}prestashop>conf_sonice_retour_07c42d0498378c2928d592bd933c385c'] = 'Support Common-Services';
$_MODULE['<{sonice_retour}prestashop>conf_sonice_retour_9e619b9277266b1047521ee723521ede'] = 'Support pour SoNice Retour';
$_MODULE['<{sonice_retour}prestashop>conf_sonice_retour_5a4986250fb1e473c546861131a2b61f'] = 'Bonjour, Je rencontre actuellement quelques soucis avec votre module en version %s sur mon Prestashop v%s.';
$_MODULE['<{sonice_retour}prestashop>conf_sonice_retour_8d282a8bd2fe903679ba3011d408c26a'] = 'Licence';
$_MODULE['<{sonice_retour}prestashop>conf_sonice_retour_01f1d0aed624750b841177137a71fceb'] = 'Ce module est soumit à une licence commerciale de la part de la S.A.R.L. SMC.';
$_MODULE['<{sonice_retour}prestashop>conf_sonice_retour_5930131df7694eeb2ba3fa1084fc851e'] = 'En cas d\'acquisition sur Prestashop Addons, la facture est la preuve de l\'obtention de votre licence.';
$_MODULE['<{sonice_retour}prestashop>conf_sonice_retour_a4fde23bda2fb6a622fc38653d8a661a'] = 'Dans les autres cas, veuillez nous contacter pour obtenir une licence';
$_MODULE['<{sonice_retour}prestashop>configuration_c50e303cd9adf250f105f477910a009e'] = 'La date de dépôt estimée doit être un nombre valide.';
$_MODULE['<{sonice_retour}prestashop>configuration_a3e783bc4cfc656c06ef1cad241ae0ea'] = 'Impossible de se connecter au serveur distant.';
$_MODULE['<{sonice_retour}prestashop>glossary_7f527d66e01174abaa6a623cbf1f5f72'] = 'Il s\'agit du n° de client sur 6 caractères, fourni par La Poste Colissimo à l\'ouverture de votre compte client.';
$_MODULE['<{sonice_retour}prestashop>glossary_af307ed3f97be14c33de885dac5d4048'] = 'Vous devez souscrire un contrat Colissimo Flexibilité opion Web Service d\'Étiquetage Unifié avec ColiPoste pour recevoir votre identifiant / mot de passe et utiliser ce service.';
$_MODULE['<{sonice_retour}prestashop>glossary_7710ad2def7b2d51f7ba82a5f670d754'] = 'Mot de passe associé au n° de client saisi.';
$_MODULE['<{sonice_retour}prestashop>glossary_80dbd24640339d90b28d3d116609349f'] = 'Il doit être identique à celui de votre espace client.';
$_MODULE['<{sonice_retour}prestashop>glossary_5176834d74596fc9f2a6467f30fee427'] = 'Permet l\'utilisation du web service de développement Telintrans.';
$_MODULE['<{sonice_retour}prestashop>glossary_833f7b90218dffdef9df91338ae83339'] = 'Cette option ne doit pas être active, il s\'agit uniquement d\'une option pour les développeurs !';
$_MODULE['<{sonice_retour}prestashop>glossary_a71c7da865affb350dc174e1be011945'] = 'Affiche les traces pour débugguer ou en mode développement. ';
$_MODULE['<{sonice_retour}prestashop>glossary_c01dba2d402de656eaee297772d10ac5'] = 'En exploitation cette option ne doit pas être active !';
$_MODULE['<{sonice_retour}prestashop>glossary_63c7c22bcaecb49e845d1aa986eb5346'] = 'Ce mode est un mode de test ou de développement réalisant de faux appels API. ';
$_MODULE['<{sonice_retour}prestashop>glossary_afd5530fe51ada7cf557e7e61940ca89'] = 'A n\'utiliser qu\'a des fins de développement ou de tests dans votre environnement d\'exploitation.';
$_MODULE['<{sonice_retour}prestashop>glossary_536d2bd08c33772f4adce31ae30c259c'] = 'Nombre de jour, après la création de l\'étiquette, avant de donner le colis à ColiPoste.';
$_MODULE['<{sonice_retour}prestashop>glossary_4a625e7026dc07ca12a38b24bc1978c6'] = 'Par défaut, l\'étiquette de retour est uniquement retournée dans la réponse du web service.';
$_MODULE['<{sonice_retour}prestashop>glossary_69468fc42f503bce5e98632acbed147d'] = 'Vous avez la possibilité d\'envoyer cette étiquette retour directement à votre client en sélectionnant une des options suivantes.';
$_MODULE['<{sonice_retour}prestashop>validate_c9cc8cce247e49bae79f15173ce97354'] = 'Enregistrer';
$_MODULE['<{sonice_retour}prestashop>orderreturn_e06d7593c1cd6dabef450be6c3da7091'] = 'SoNice Retour';
$_MODULE['<{sonice_retour}prestashop>orderreturn_a5137503509f486a5dbc0c2c4b351c55'] = 'Vous devez glisser / déposer vos produits avant de faire une action.';
$_MODULE['<{sonice_retour}prestashop>orderreturn_617ca1d5f8feab9d0ea5ff495ec9418e'] = 'Vous ne pouvez pas faire cette action en mode de démonstration.';
$_MODULE['<{sonice_retour}prestashop>orderreturn_deb10517653c255364175796ace3553f'] = 'Produit';
$_MODULE['<{sonice_retour}prestashop>orderreturn_197101c4a1b1fc503dcd6ebee127aa10'] = 'Prix unitaire';
$_MODULE['<{sonice_retour}prestashop>orderreturn_03ab340b3f99e03cff9e84314ead38c0'] = 'Qté';
$_MODULE['<{sonice_retour}prestashop>orderreturn_cc61945cbbf46721a053467c395c666f'] = 'Remboursé';
$_MODULE['<{sonice_retour}prestashop>orderreturn_fdfac28b5ad628f25649d9c2eb4fc62e'] = 'Retourné';
$_MODULE['<{sonice_retour}prestashop>orderreturn_f8a09f634b7b3ede2da34607da2aaebe'] = 'Quantités disponibles';
$_MODULE['<{sonice_retour}prestashop>orderreturn_7a37cf02d0d02cc1f26933405b220fe7'] = 'Déposez vos produits ici';
$_MODULE['<{sonice_retour}prestashop>orderreturn_7f930cbe4f418eaab52f7cee71c080ef'] = 'Pour les ajouter à votre étiquette de retour';
$_MODULE['<{sonice_retour}prestashop>orderreturn_fa4ac35407fa83e1bacba29d75cb8e93'] = 'Désolé, il n\'y a pas d\'étiquette pour cette commande, il faut la créer.';
$_MODULE['<{sonice_retour}prestashop>orderreturn_43d017fdd1ca985a54fc6eb0ab51fab0'] = 'Générer l\'étiquette retour';
$_MODULE['<{sonice_retour}prestashop>orderreturn_dfaa2ed89a3e4f03bb56e96939a235c7'] = 'Imprimer l\'étiquette retour';
$_MODULE['<{sonice_retour}prestashop>orderreturn_65978c0957e6f139b63aebbdc1003646'] = 'Générer l\'étiquette';
$_MODULE['<{sonice_retour}prestashop>orderreturn_ca4b372b83c3985f2c1530046ac56b81'] = 'L\'étiquette est prête à être imprimé.';
$_MODULE['<{sonice_retour}prestashop>orderreturn_48a76b3c34e42f6c41ae4c22ad98c2b2'] = 'L\'étiquette est prête à être enregistré.';
$_MODULE['<{sonice_retour}prestashop>orderreturn_3c75413dc4cde97fe944ea797d3fff7d'] = 'L\'étiquette a été envoyé à votre client.';
$_MODULE['<{sonice_retour}prestashop>orderreturn16_e06d7593c1cd6dabef450be6c3da7091'] = 'SoNice Retour';
$_MODULE['<{sonice_retour}prestashop>orderreturn16_a5137503509f486a5dbc0c2c4b351c55'] = 'Vous devez glisser / déposer vos produits avant de faire une action.';
$_MODULE['<{sonice_retour}prestashop>orderreturn16_617ca1d5f8feab9d0ea5ff495ec9418e'] = 'Vous ne pouvez pas faire cette action en mode de démonstration.';
$_MODULE['<{sonice_retour}prestashop>orderreturn16_deb10517653c255364175796ace3553f'] = 'Produit';
$_MODULE['<{sonice_retour}prestashop>orderreturn16_197101c4a1b1fc503dcd6ebee127aa10'] = 'Prix unitaire';
$_MODULE['<{sonice_retour}prestashop>orderreturn16_03ab340b3f99e03cff9e84314ead38c0'] = 'Qté';
$_MODULE['<{sonice_retour}prestashop>orderreturn16_cc61945cbbf46721a053467c395c666f'] = 'Remboursé';
$_MODULE['<{sonice_retour}prestashop>orderreturn16_fdfac28b5ad628f25649d9c2eb4fc62e'] = 'Retourné';
$_MODULE['<{sonice_retour}prestashop>orderreturn16_f8a09f634b7b3ede2da34607da2aaebe'] = 'Quantités disponibles';
$_MODULE['<{sonice_retour}prestashop>orderreturn16_7a37cf02d0d02cc1f26933405b220fe7'] = 'Déposez vos produits ici';
$_MODULE['<{sonice_retour}prestashop>orderreturn16_7f930cbe4f418eaab52f7cee71c080ef'] = 'Pour les ajouter à votre étiquette de retour';
$_MODULE['<{sonice_retour}prestashop>orderreturn16_6b5c3e78a01a9df9c7408649eb7adcec'] = 'Retourner tous les produits';
$_MODULE['<{sonice_retour}prestashop>orderreturn16_988fd738de9c6d177440c5dcf69e73ce'] = 'Retour';
$_MODULE['<{sonice_retour}prestashop>orderreturn16_fa4ac35407fa83e1bacba29d75cb8e93'] = 'Désolé, il n\'y a pas d\'étiquette disponible pour cette commande, vous devez d\'abord en créer une.';
$_MODULE['<{sonice_retour}prestashop>orderreturn16_dfaa2ed89a3e4f03bb56e96939a235c7'] = 'Imprimer l\'étiquette retour';
$_MODULE['<{sonice_retour}prestashop>orderreturn16_43d017fdd1ca985a54fc6eb0ab51fab0'] = 'Générer l\'étiquette';
$_MODULE['<{sonice_retour}prestashop>orderreturn16_65978c0957e6f139b63aebbdc1003646'] = 'Génération de l\'étiquette';
$_MODULE['<{sonice_retour}prestashop>orderreturn16_ca4b372b83c3985f2c1530046ac56b81'] = 'L\'étiquette est prête à être imprimé.';
$_MODULE['<{sonice_retour}prestashop>orderreturn16_48a76b3c34e42f6c41ae4c22ad98c2b2'] = 'L\'étiquette est prête à être enregistré.';
$_MODULE['<{sonice_retour}prestashop>orderreturn16_3c75413dc4cde97fe944ea797d3fff7d'] = 'L\'étiquette a été envoyé à votre client.';

View File

@@ -0,0 +1,93 @@
<?php
/**
* NOTICE OF LICENSE
*
* This source file is subject to a commercial license from Common-Services Co., Ltd.
* Use, copy, modification or distribution of this source file without written
* license agreement from the SARL SMC is strictly forbidden.
* In order to obtain a license, please contact us: contact@common-services.com
* ...........................................................................
* INFORMATION SUR LA LICENCE D'UTILISATION
*
* L'utilisation de ce fichier source est soumise a une licence commerciale
* concedee par la societe Common-Services Co., Ltd.
* Toute utilisation, reproduction, modification ou distribution du present
* fichier source sans contrat de licence ecrit de la part de la Common-Services Co. Ltd. est
* expressement interdite.
* Pour obtenir une licence, veuillez contacter Common-Services Co., Ltd. a l'adresse: contact@common-services.com
* ...........................................................................
*
* @package SoNice Retour
* @author Alexandre D.
* @copyright Copyright (c) 2011-2015 Common Services Co Ltd - 90/25 Sukhumvit 81 - 10260 Bangkok - Thailand
* @license Commercial license
* Support by mail : support.sonice@common-services.com
*/
if (isset($_SERVER['DropBox']) && $_SERVER['DropBox']) {
require_once(readlink(dirname($_SERVER['SCRIPT_FILENAME']).'/../../../config/config.inc.php'));
} else {
require_once(dirname(__FILE__).'/../../../config/config.inc.php');
}
if (Tools::getValue('token') !== md5(_COOKIE_IV_)) {
header('HTTP/1.0 401 Unauthorized');
echo 'Wrong token';
die;
}
class StateChanger extends Module
{
public function changeState()
{
ob_start();
$status = false;
// OCARAT modif pour envoi de mail
if (Tools::getValue('id') && Tools::getValue('state')) {
$id_order_return = Tools::getValue('id');
$state = Tools::getValue('state');
$orderReturn = new OrderReturn($id_order_return);
$order = new Order($orderReturn->id_order);
$customer = new Customer($orderReturn->id_customer);
$orderReturn->state = $state;
if ($orderReturn->save()) {
$orderReturnState = new OrderReturnState($orderReturn->state);
$vars = array(
'{lastname}' => $customer->lastname,
'{firstname}' => $customer->firstname,
'{id_order_return}' => $id_order_return,
'{state_order_return}' => (isset($orderReturnState->name[(int)$order->id_lang]) ?
$orderReturnState->name[(int)$order->id_lang] :
$orderReturnState->name[(int)Configuration::get('PS_LANG_DEFAULT')]),
);
Mail::Send((int)$order->id_lang, 'order_return_state',
Mail::l('Your order return status has changed', $order->id_lang),
$vars, $customer->email, $customer->firstname . ' ' . $customer->lastname, null, null, null,
null, _PS_MAIL_DIR_, true, (int)$order->id_shop);
$status = true;
}
}
$result = ob_get_clean();
if ($result) {
$output = $result;
} else {
$output = null;
}
$json = array(
'output' => $output,
'status' => $status
);
die(Tools::jsonEncode($json));
}
}
$state_changer = new StateChanger();
$state_changer->changeState();

View File

@@ -0,0 +1,191 @@
<?php
/**
* NOTICE OF LICENSE
*
* This source file is subject to a commercial license from Common-Services Co., Ltd.
* Use, copy, modification or distribution of this source file without written
* license agreement from the SARL SMC is strictly forbidden.
* In order to obtain a license, please contact us: contact@common-services.com
* ...........................................................................
* INFORMATION SUR LA LICENCE D'UTILISATION
*
* L'utilisation de ce fichier source est soumise a une licence commerciale
* concedee par la societe Common-Services Co., Ltd.
* Toute utilisation, reproduction, modification ou distribution du present
* fichier source sans contrat de licence ecrit de la part de la Common-Services Co. Ltd. est
* expressement interdite.
* Pour obtenir une licence, veuillez contacter Common-Services Co., Ltd. a l'adresse: contact@common-services.com
* ...........................................................................
*
* @package SoNice Retour
* @author Alexandre D.
* @copyright Copyright (c) 2011-2015 Common Services Co Ltd - 90/25 Sukhumvit 81 - 10260 Bangkok - Thailand
* @license Commercial license
* Support by mail : support.sonice@common-services.com
*/
if (isset($_SERVER['DropBox']) && $_SERVER['DropBox']) {
require_once readlink(dirname($_SERVER['SCRIPT_FILENAME']).'/../../../config/config.inc.php');
require_once(readlink(_PS_MODULE_DIR_.'sonice_retour'.DIRECTORY_SEPARATOR.'sonice_retour.php'));
require_once(readlink(_PS_MODULE_DIR_.'sonice_retour'.DIRECTORY_SEPARATOR.'classes/SoNiceRetourPDF.php'));
/*
require_once(readlink(dirname($_SERVER['SCRIPT_FILENAME']).'/../../../config/config.inc.php'));
require_once(readlink(_PS_MODULE_DIR_.'sonice_etiquetage'.DIRECTORY_SEPARATOR.'sonice_retour.php'));
require_once(readlink(_PS_MODULE_DIR_.'sonice_etiquetage'.DIRECTORY_SEPARATOR.'classes/SoNiceRetourPDF.php'));
*/
} else {
require_once(dirname(__FILE__).'/../../../config/config.inc.php');
require_once(dirname(__FILE__).'/../sonice_retour.php');
require_once(dirname(__FILE__).'/../classes/SoNiceRetourPDF.php');
}
if (Tools::getValue('token') !== md5(_COOKIE_IV_)) {
header('HTTP/1.0 401 Unauthorized');
echo 'Wrong token';
die;
}
class SoNiceEtiquetageCheckLogin extends SoNice_Retour
{
public function __construct()
{
parent::__construct();
if (Tools::getValue('debug')) {
$this->debug = true;
}
if ($this->debug) {
@ini_set('display_errors', 'on');
@define('_PS_DEBUG_SQL_', true);
@error_reporting(E_ALL | E_STRICT);
}
}
public function checkThat()
{
ob_start();
$login = Tools::getValue('return_info');
if (!is_array($login) && !count($login)) {
die($this->l('Impossible to retrieve the login informations.'));
}
$id_order = (int)Db::getInstance()->getValue('SELECT `id_order` FROM `'._DB_PREFIX_.'orders` ORDER BY `id_order` DESC');
$info = new stdClass();
$pdf = new SoNiceRetourPDF($id_order, null);
if (!$pdf instanceof SoNiceRetourPDF) {
$info->status = false;
$info->errorID = 'SoNice';
$info->error = $this->l('An error occured while initialising SoNiceRetourPDF class.');
} else {
$params = array(
'contractNumber' => $login['ContractNumber'],
'password' => $login['Password'],
'outputFormat' => array(
'x' => 0,
'y' => 0,
'outputPrintingType' => 'PDF_A4_300dpi',
),
'letter' => array(
'service' => array(
'productCode' => 'CORE',
'depositDate' => date('Y-m-d'),
'transportationAmount' => 0,
'totalAmount' => null,
'orderNumber' => 42,
'commercialName' => 'Test',
'returnTypeChoice' => null,
),
'parcel' => array(
'weight' => 0.3,
'nonMachinable' => false,
'instructions' => null,
'pickupLocationId' => null,
),
'sender' => array(
'senderParcelRef' => 'EXP4242',
'address' => array(
'companyName' => null,
'lastName' => 'Doe',
'firstName' => 'John',
'line0' => null,
'line1' => null,
'line2' => '51 avenue Paul Doumer',
'line3' => null,
'countryCode' => 'FR',
'city' => 'Paris',
'zipCode' => '75116',
'phoneNumber' => null,
'mobileNumber' => null,
'doorCode1' => null,
'doorCode2' => null,
'email' => 'toto@mytest.fr',
'intercom' => null,
'language' => 'FR',
)
),
'addressee' => array(
'addresseeParcelRef' => 'ABCD123',
'address' => array(
'companyName' => 'Test',
'lastName' => null,
'firstName' => null,
'line0' => null,
'line1' => null,
'line2' => '13 rue de la Loge',
'line3' => null,
'countryCode' => 'FR',
'city' => 'Marseille',
'zipCode' => '13000',
'phoneNumber' => null,
'mobileNumber' => null,
'doorCode1' => null,
'doorCode2' => null,
'email' => 'test@mytest.fr',
'intercom' => null
)
)
)
);
$call = $pdf->callWS($login['ContractNumber'], $login['Password'], $params);
if ($call) {
$response = $pdf->getFormattedResponse();
if (!is_null($response['errorID']) && $response['errorID'] >= 30000 && $response['errorID'] <= 30008) {
$info->status = false;
$info->errorID = $response['errorID'];
$info->error = $response['error'];
} else {
$info->status = true;
$info->errorID = 0;
$info->error = '';
}
} else {
$info->status = false;
$info->errorID = 'SoNice';
$info->error = $this->l('Error with the web service call.');
}
}
$callback = Tools::getValue('callback');
$output = ob_get_clean();
die($callback.'('.Tools::jsonEncode(array(
'console' => $output,
'info' => $info,
'request' => '<pre>'.$pdf->xmlpp($pdf->origin_request, true).'</pre>',
'response' => '<pre>'.$pdf->xmlpp($pdf->response->asXML(), true).'</pre>'
)).')');
}
}
$login = new SoNiceEtiquetageCheckLogin();
$login->checkThat();

View File

@@ -0,0 +1,20 @@
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ns2:generateLabelResponse xmlns:ns2="http://sls.ws.coliposte.fr">
<return>
<messages>
<id>0</id>
<messageContent>La requête a été traitée avec succès</messageContent>
<type>INFOS</type>
</messages>
<labelResponse>
<label>
<xop:Include href="cid:ba63815d-25be-4ab2-9c5f-33e2232bbf3c-326@cxf.apache.org" xmlns:xop="http://www.w3.org/2004/08/xop/include"/>
</label>
<parcelNumber>8R28280687469</parcelNumber>
<pdfUrl>https://10.36.211.129/sls-ws/GetLabel?parcelNumber=8R28280687469&amp;includeCustomsDeclarations=false&amp;signature=6817d6904ed1456974d2ad27da57554c74fc2671b97a917ffcc1fd85e963f5ca</pdfUrl>
</labelResponse>
</return>
</ns2:generateLabelResponse>
</soap:Body>
</soap:Envelope>

Binary file not shown.

View File

@@ -0,0 +1,52 @@
<?php
/**
* NOTICE OF LICENSE
*
* This source file is subject to a commercial license from Common-Services Co., Ltd.
* Use, copy, modification or distribution of this source file without written
* license agreement from the SARL SMC is strictly forbidden.
* In order to obtain a license, please contact us: contact@common-services.com
* ...........................................................................
* INFORMATION SUR LA LICENCE D'UTILISATION
*
* L'utilisation de ce fichier source est soumise a une licence commerciale
* concedee par la societe Common-Services Co., Ltd.
* Toute utilisation, reproduction, modification ou distribution du present
* fichier source sans contrat de licence ecrit de la part de la Common-Services Co. Ltd. est
* expressement interdite.
* Pour obtenir une licence, veuillez contacter Common-Services Co., Ltd. a l'adresse: contact@common-services.com
* ...........................................................................
*
* @package SoNice Retour
* @author Alexandre D.
* @copyright Copyright (c) 2011-2015 Common Services Co Ltd - 90/25 Sukhumvit 81 - 10260 Bangkok - Thailand
* @license Commercial license
* Support by mail : support.sonice@common-services.com
*/
if (isset($_SERVER['DropBox']) && $_SERVER['DropBox']) {
require_once(readlink(dirname($_SERVER['SCRIPT_FILENAME']).'/../../../config/config.inc.php'));
} else {
require_once(dirname(__FILE__).'/../../../config/config.inc.php');
}
require_once(_PS_MODULE_DIR_.'sonice_retour'.DIRECTORY_SEPARATOR.'sonice_retour.php');
class SoColissimoDownload extends SoNice_retour
{
public function action()
{
$file = $_REQUEST['file'];
if (!file_exists($this->download_folder.$file)) {
die('File not found');
}
header('Content-Disposition: attachment; filename="'.date('Ymd-His').'.pdf"');
echo Tools::file_get_contents($this->download_folder.$file);
}
}
$so_colissimo_download = new SoColissimoDownload();
$so_colissimo_download->action();

View File

@@ -0,0 +1,254 @@
<?php
/**
* NOTICE OF LICENSE
*
* This source file is subject to a commercial license from Common-Services Co., Ltd.
* Use, copy, modification or distribution of this source file without written
* license agreement from the SARL SMC is strictly forbidden.
* In order to obtain a license, please contact us: contact@common-services.com
* ...........................................................................
* INFORMATION SUR LA LICENCE D'UTILISATION
*
* L'utilisation de ce fichier source est soumise a une licence commerciale
* concedee par la societe Common-Services Co., Ltd.
* Toute utilisation, reproduction, modification ou distribution du present
* fichier source sans contrat de licence ecrit de la part de la Common-Services Co. Ltd. est
* expressement interdite.
* Pour obtenir une licence, veuillez contacter Common-Services Co., Ltd. a l'adresse: contact@common-services.com
* ...........................................................................
*
* @package SoNice Retour
* @author Alexandre D.
* @copyright Copyright (c) 2011-2015 Common Services Co Ltd - 90/25 Sukhumvit 81 - 10260 Bangkok - Thailand
* @license Commercial license
* Support by mail : support.sonice@common-services.com
*/
if (isset($_SERVER['DropBox']) && $_SERVER['DropBox']) {
require_once(readlink(dirname($_SERVER['SCRIPT_FILENAME']).'/../../../config/config.inc.php'));
require_once(readlink(_PS_MODULE_DIR_.'sonice_retour'.DIRECTORY_SEPARATOR.'sonice_retour.php'));
require_once(readlink(_PS_MODULE_DIR_.'sonice_retour'.DIRECTORY_SEPARATOR.'classes/SoNiceRetourPDF.php'));
require_once(readlink(_PS_MODULE_DIR_.'sonice_retour'.DIRECTORY_SEPARATOR.'classes/SoNiceRetourTools.php'));
} else {
require_once(dirname(__FILE__).'/../../../config/config.inc.php');
require_once(dirname(__FILE__).'/../sonice_retour.php');
require_once(dirname(__FILE__).'/../classes/SoNiceRetourPDF.php');
require_once(dirname(__FILE__).'/../classes/SoNiceRetourTools.php');
}
if (Tools::getValue('token') !== md5(_COOKIE_IV_)) {
header('HTTP/1.0 401 Unauthorized');
echo 'Wrong token';
die;
}
class SoNiceEtiquetageGetLabel extends SoNice_Retour
{
public $config;
public function __construct()
{
parent::__construct();
if (Tools::getValue('debug')) {
$this->debug = true;
}
if ($this->debug) {
@ini_set('display_errors', 'on');
@define('_PS_DEBUG_SQL_', true);
@error_reporting(E_ALL | E_STRICT);
}
$this->config = unserialize(Configuration::get('ETIQUETAGE_RETURN_CONF'));
if (!is_array($this->config)) {
$this->config = array();
}
}
public function getLabelPDF()
{
ob_start();
$id_order = Tools::getValue('id_order');
$id_order_details = Tools::getValue('id_order_details');
$id_order_details_quantity = Tools::getValue('id_order_details_quantity');
$id_return = Tools::getValue('id_return', null);
if (!Validate::isInt($id_order)) {
die($this->l('Impossible to retrieve the id order array.'));
}
$pdfs = array();
SoNiceRetourTools::cleanup();
$colissimo = new SoNiceRetourPDF($id_order, $id_order_details);
if (!$colissimo instanceof SoNiceRetourPDF) {
die(printf('Order %d : $colissimo is not an instance of class SoNiceRetourPDF.<br><br>', $id_order));
}
$call = $colissimo->callWS();
if (!$call) {
die(printf('Order %d : An error occured.<br>-> %s<br>-> %s<br><br>', $id_order, $colissimo->error->errorID, $colissimo->error->error));
}
$pdfs[$id_order] = $colissimo->getFormattedResponse();
if (!$pdfs[$id_order]['errorID'] && isset($pdfs[$id_order]['parcelNumber']) && Tools::strlen($pdfs[$id_order]['parcelNumber']) >= 10) {
$date = new DateTime();
$id_label = Db::getInstance()->getValue('SELECT `id_label` FROM `'._DB_PREFIX_.'so_return_label` WHERE `id_return` = '.(int)$id_return);
if (!$id_return) {
$order_return = new OrderReturn();
$order_return->id_customer = $colissimo->customer->id;
$order_return->id_order = $colissimo->order->id;
$order_return->state = 2;
$order_return->question = 'SoNice Retour - Commande '.(int)$colissimo->order->id;
if ($order_return->save()) {
$id_return = $order_return->id ? $order_return->id : Db::getInstance()->Insert_ID();
// OrderReturnDetails
$product_quantity_list = array();
foreach (array_keys($id_order_details) as $key) {
$product_quantity_list[$key] = $id_order_details_quantity[$key];
}
$order_return->addReturnDetail($id_order_details, $product_quantity_list, null, null);
// Send mail to customer
if (isset($this->config['email_to_customer']) && $this->config['email_to_customer']) {
$orderReturnState = new OrderReturnState($order_return->state);
$vars = array(
'{lastname}' => $colissimo->customer->lastname,
'{firstname}' => $colissimo->customer->firstname,
'{id_order_return}' => $id_return,
'{state_order_return}' => (
isset($orderReturnState->name[(int)$colissimo->order->id_lang]) ?
$orderReturnState->name[(int)$colissimo->order->id_lang] : $orderReturnState->name[(int)Configuration::get('PS_LANG_DEFAULT')]
)
);
Mail::Send(
(int)$colissimo->order->id_lang,
$this->config['email_to_customer'],
Mail::l('Your order return status has changed', $colissimo->order->id_lang),
$vars,
$colissimo->customer->email,
$colissimo->customer->firstname.' '.$colissimo->customer->lastname,
null,
null,
null,
null,
_PS_MAIL_DIR_,
true,
(int)$colissimo->order->id_shop
);
}
}
} else {
// DUPLICATE - TODO optimize
$order_return = new OrderReturn($id_return);
$order_return->state = 2;
if ($order_return->save()) {
// Send mail to customer
if (isset($this->config['email_to_customer']) && $this->config['email_to_customer']) {
$orderReturnState = new OrderReturnState($order_return->state);
$vars = array(
'{lastname}' => $colissimo->customer->lastname,
'{firstname}' => $colissimo->customer->firstname,
'{id_order_return}' => $id_return,
'{state_order_return}' => (
isset($orderReturnState->name[(int)$colissimo->order->id_lang]) ?
$orderReturnState->name[(int)$colissimo->order->id_lang] : $orderReturnState->name[(int)Configuration::get('PS_LANG_DEFAULT')]
)
);
Mail::Send(
(int)$colissimo->order->id_lang,
$this->config['email_to_customer'],
Mail::l('Your order return status has changed', $colissimo->order->id_lang),
$vars,
$colissimo->customer->email,
$colissimo->customer->firstname.' '.$colissimo->customer->lastname,
null,
null,
null,
null,
_PS_MAIL_DIR_,
true,
(int)$colissimo->order->id_shop
);
}
}
}
$pdfs[$id_order]['id_return'] = $id_return;
$pdfs[$id_order]['date'] = $date->format('Y-m-d H:i:s');
$state_infos = Db::getInstance()->getRow('
SELECT DISTINCT
orsl.`name`,
ors.`color`
FROM
`'._DB_PREFIX_.'order_return_state_lang` AS orsl,
`'._DB_PREFIX_.'order_return_state` AS ors
WHERE
ors.`id_order_return_state` = 2
AND ors.`id_order_return_state` = orsl.`id_order_return_state`
AND orsl.`id_lang` = 1
');
$pdfs[$id_order]['state'] = $state_infos['name'];
$pdfs[$id_order]['color'] = $state_infos['color'];
$sql = 'REPLACE INTO `'._DB_PREFIX_.'so_return_label` (`id_label`, `id_return`, `id_coliposte`, `date_add`, `date_upd`)
VALUES (
'.(int)$id_label.',
'.(int)$id_return.',
"'.pSQL($pdfs[$id_order]['parcelNumber']).'",
"'.$date->format('Y-m-d H:i:s').'",
"'.$date->format('Y-m-d H:i:s').'"
)';
Db::getInstance()->execute($sql);
// Set server link to PDF
if (!$colissimo->demo) {
$pdfs[$id_order]['PdfUrl'] = $this->url.'download/'.$pdfs[$id_order]['parcelNumber'].'.pdf';
} else {
@copy($this->path.'functions/demo_retour.pdf', $this->path.'download/'.$pdfs[$id_order]['parcelNumber'].'.pdf');
}
} else {
echo '<details><summary>'.$this->l('More details').'</summary><pre>'.$colissimo->xmlpp($colissimo->request, true).'</pre></details><br>';
printf('Web Service<br><pre>==> errorID -> %s<br>==> error -> %s</pre><br><br>', $pdfs[$id_order]['errorID'], $pdfs[$id_order]['error']);
printf(
$this->l('Order').' %d: %s<br>==> id_order -> %d<br>==> parcelNumer -> %s<br>==> PdfUrl -> %s<br>%s<br><br>',
$id_order,
$this->l('It seems like the datas we try to insert in the database are wrong. Values are :'),
$id_order,
isset($pdfs[$id_order]['parcelNumber']) && Tools::strlen($pdfs[$id_order]['parcelNumber']) < 10 ?
('<strong>'.$pdfs[$id_order]['parcelNumber'].'</strong>') : $this->l('Missing'),
isset($pdfs[$id_order]['PdfUrl']) && Tools::strlen($pdfs[$id_order]['PdfUrl']) <= 110 ?
('<strong>'.$pdfs[$id_order]['PdfUrl'].'</strong>') : $this->l('Missing'),
$this->l('The label was not saved, please try again later.')
);
}
$callback = Tools::getValue('callback');
$output = ob_get_clean();
// Delete parasite
if (Tools::strlen($output) < 5) {
$output = '';
}
die($callback.'('.Tools::jsonEncode(array('console' => $output, 'pdfs' => $pdfs)).')');
}
}
$label = new SoNiceEtiquetageGetLabel();
$label->getLabelPDF();

View File

@@ -0,0 +1,11 @@
<?php
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,24 @@
HTTP/1.1 200 OK
Date: Wed, 21 Oct 2015 10:48:00 GMT
Server: Apache-Coyote/1.1
Content-Type: multipart/related; type="application/xop+xml"; boundary="uuid:54455e20-d118-43b0-8a6a-6ab8631d3b36"; start="<root.message@cxf.apache.org>"; start-info="text/xml"
Vary: User-Agent
Keep-Alive: timeout=15, max=200
Connection: Keep-Alive
Transfer-Encoding: chunked
--uuid:54455e20-d118-43b0-8a6a-6ab8631d3b36
Content-Type: application/xop+xml; charset=UTF-8; type="text/xml";
Content-Transfer-Encoding: binary
Content-ID: <root.message@cxf.apache.org>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns2:generateLabelResponse xmlns:ns2="http://sls.ws.coliposte.fr"><return><messages><id>0</id><messageContent>La requête a été traitée avec succès</messageContent><type>INFOS</type></messages><labelResponse><label><xop:Include xmlns:xop="http://www.w3.org/2004/08/xop/include" href="cid:ba63815d-25be-4ab2-9c5f-33e2232bbf3c-326@cxf.apache.org"/></label><parcelNumber>8R28280687469</parcelNumber><pdfUrl>https://10.36.211.129/sls-ws/GetLabel?parcelNumber=8R28280687469&amp;includeCustomsDeclarations=false&amp;signature=6817d6904ed1456974d2ad27da57554c74fc2671b97a917ffcc1fd85e963f5ca</pdfUrl></labelResponse></return></ns2:generateLabelResponse></soap:Body></soap:Envelope>
--uuid:54455e20-d118-43b0-8a6a-6ab8631d3b36
Content-Type: application/octet-stream
Content-Transfer-Encoding: binary
Content-ID: <ba63815d-25be-4ab2-9c5f-33e2232bbf3c-326@cxf.apache.org>
%PDF-1.4
%âãÏÓ
3 0 obj <</Length 1573/Filter/FlateDecode>>stream
xœµXËn7¼ÏWðo ÈÁŽ<C381>S(<11>CàÃ>“R9€üû©ækfvײ,!Xx4ä<34>ÝÅîb±é{e´1Fùì5Ç #<23>²Q¯zǧƒúMý=MWonÿúG½þéÍt¯œÍÚF£,{<7B>“S”²ÎLÊ<06>¼éSîEÒ!Yeð“o.<2E>L<EFBFBD>jw§ÔÕÏÛFýðQ]OÓµz+.¦LÚQT.xí3)6N OµÙ<¼¾ãiJ¤nö°ë]i`qj~|úcºz÷ñæ<C3B1>QäʲoŽÓw† kœñ&˜ˆ÷„wùçL6ôn¿W7¦·7Ó¿ÓõZÎ:˜ Õ@1iæšg£SZÒd|…–,² hlfh;³€ƒ90

View File

@@ -0,0 +1,11 @@
<?php
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: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

View File

@@ -0,0 +1,35 @@
<?php
/**
* 2007-2015 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 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/osl-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-2015 PrestaShop SA
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 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;

View File

@@ -0,0 +1,35 @@
<?php
/**
* 2007-2015 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 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/osl-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 https://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2015 PrestaShop SA
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 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;

View File

@@ -0,0 +1,122 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
<title>Message de {shop_name}</title>
<style> @media only screen and (max-width: 300px){
body {
width:218px !important;
margin:auto !important;
}
thead, tbody{width: 100%}
.table {width:195px !important;margin:auto !important;}
.logo, .titleblock, .linkbelow, .box, .footer, .space_footer{width:auto !important;display: block !important;}
span.title{font-size:20px !important;line-height: 23px !important}
span.subtitle{font-size: 14px !important;line-height: 18px !important;padding-top:10px !important;display:block !important;}
td.box p{font-size: 12px !important;font-weight: bold !important;}
.table-recap table, .table-recap thead, .table-recap tbody, .table-recap th, .table-recap td, .table-recap tr {
display: block !important;
}
.table-recap{width: 200px!important;}
.table-recap tr td, .conf_body td{text-align:center !important;}
.address{display: block !important;margin-bottom: 10px !important;}
.space_address{display: none !important;}
}
@media only screen and (min-width: 301px) and (max-width: 500px) {
body {width:425px!important;margin:auto!important;}
thead, tbody{width: 100%}
.table {margin:auto!important;}
.logo, .titleblock, .linkbelow, .box, .footer, .space_footer{width:auto!important;display: block!important;}
.table-recap{width: 295px !important;}
.table-recap tr td, .conf_body td{text-align:center !important;}
.table-recap tr th{font-size: 10px !important}
}
@media only screen and (min-width: 501px) and (max-width: 768px) {
body {width:478px!important;margin:auto!important;}
thead, tbody{width: 100%}
.table {margin:auto!important;}
.logo, .titleblock, .linkbelow, .box, .footer, .space_footer{width:auto!important;display: block!important;}
}
@media only screen and (max-device-width: 480px) {
body {width:340px!important;margin:auto!important;}
thead, tbody{width: 100%}
.table {margin:auto!important;}
.logo, .titleblock, .linkbelow, .box, .footer, .space_footer{width:auto!important;display: block!important;}
.table-recap{width: 295px!important;}
.table-recap tr td, .conf_body td{text-align:center!important;}
.address{display: block !important;margin-bottom: 10px !important;}
.space_address{display: none !important;}
}
</style>
</head>
<body style="-webkit-text-size-adjust:none;background-color:#fff;width:650px;font-family:Open-sans, sans-serif;color:#555454;font-size:13px;line-height:18px;margin:auto">
<table class="table table-mail" style="width:100%;margin-top:10px;-moz-box-shadow:0 0 5px #afafaf;-webkit-box-shadow:0 0 5px #afafaf;-o-box-shadow:0 0 5px #afafaf;box-shadow:0 0 5px #afafaf;filter:progid:DXImageTransform.Microsoft.Shadow(color=#afafaf,Direction=134,Strength=5)">
<tr>
<td class="space" style="width:20px;padding:7px 0">&nbsp;</td>
<td align="center" style="padding:7px 0">
<table class="table" bgcolor="#ffffff" style="width:100%">
<tr>
<td align="center" class="logo" style="border-bottom:4px solid #333333;padding:7px 0">
<a title="{shop_name}" href="{shop_url}" style="color:#337ff1">
</a>
</td>
</tr>
<tr>
<td align="center" class="titleblock" style="padding:7px 0">
<font size="2" face="Open-sans, sans-serif" color="#555454">
<span class="title" style="font-weight:500;font-size:28px;text-transform:uppercase;line-height:33px">Bonjour,</span><br/>
<span class="subtitle" style="font-weight:500;font-size:16px;text-transform:uppercase;line-height:25px">Un nouveau retour de produit vient d'être passé par un client sur {shop_name}!</span>
</font>
</td>
</tr>
<tr>
<td class="space_footer" style="padding:0!important">&nbsp;</td>
</tr>
<tr>
<td class="box" style="border:1px solid #D6D4D4;background-color:#f8f8f8;padding:7px 0">
<table class="table" style="width:100%">
<tr>
<td width="10" style="padding:7px 0">&nbsp;</td>
<td style="padding:7px 0">
<font size="2" face="Open-sans, sans-serif" color="#555454">
<p data-html-only="1" style="border-bottom:1px solid #D6D4D4;margin:3px 0 7px;text-transform:uppercase;font-weight:500;font-size:18px;padding-bottom:10px">
Détails de la commande </p>
<span style="color:#777">
<span style="color:#333"><strong>Commande :</strong></span> {order_name} Date {date}<br /><br />
</span>
</font>
</td>
<td width="10" style="padding:7px 0">&nbsp;</td>
</tr>
</table>
</td>
</tr>
<tr>
<td style="padding:7px 0">
<font size="2" face="Open-sans, sans-serif" color="#555454">
{items}
</font>
</td>
</tr>
<tr>
<td class="space_footer" style="padding:0!important">&nbsp;</td>
</tr>
<tr>
<td class="footer" style="border-top:4px solid #333333;padding:7px 0">
<span><a href="{shop_url}" style="color:#337ff1">{shop_name}</a> réalisé avec <a href="http://www.prestashop.com/" style="color:#337ff1">PrestaShop&trade;</a></span>
</td>
</tr>
</table>
</td>
<td class="space" style="width:20px;padding:7px 0">&nbsp;</td>
</tr>
</table>
</body>
</html>

View File

@@ -0,0 +1,70 @@
[{shop_url}]
Bonjour {firstname} {lastname},
Merci d'avoir effectué vos achats sur {shop_name}!
COMMANDE : {order_name} Date {date}
PAIEMENT : {payment}
RÉFÉRENCE
PRODUIT
PRIX UNITAIRE
QUANTITÉ
PRIX TOTAL
{products_txt}
{discounts}
PRODUITS
{total_products}
RÉDUCTIONS
{total_discounts}
PAQUET CADEAU
{total_wrapping}
LIVRAISON
{total_shipping}
TVA TOTALE
{total_tax_paid}
TOTAL PAYÉ
{total_paid}
TRANSPORTEUR : {carrier}
PAIEMENT : {payment}
{delivery_block_txt}
{invoice_block_txt}
Vous pouvez accéder à tout moment au suivi de votre commande et
télécharger votre facture dans "Historique des commandes"
[{history_url}] de la rubrique "Mon compte"
[{my_account_url}] sur notre site.
Si vous avez un compte invité, vous pouvez suivre votre commande
dans la section "Suivi invité"
[{guest_tracking_url}?id_order={order_name}] de notre
site.
{shop_name} [{shop_url}] réalisé avec
PrestaShop(tm) [http://www.prestashop.com/]

View File

@@ -0,0 +1,35 @@
<?php
/**
* 2007-2015 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 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/osl-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-2015 PrestaShop SA
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 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;

View File

@@ -0,0 +1,35 @@
<?php
/**
* 2007-2015 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 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/osl-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 https://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2015 PrestaShop SA
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 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;

View File

@@ -0,0 +1,122 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
<title>Message de {shop_name}</title>
<style> @media only screen and (max-width: 300px){
body {
width:218px !important;
margin:auto !important;
}
thead, tbody{width: 100%}
.table {width:195px !important;margin:auto !important;}
.logo, .titleblock, .linkbelow, .box, .footer, .space_footer{width:auto !important;display: block !important;}
span.title{font-size:20px !important;line-height: 23px !important}
span.subtitle{font-size: 14px !important;line-height: 18px !important;padding-top:10px !important;display:block !important;}
td.box p{font-size: 12px !important;font-weight: bold !important;}
.table-recap table, .table-recap thead, .table-recap tbody, .table-recap th, .table-recap td, .table-recap tr {
display: block !important;
}
.table-recap{width: 200px!important;}
.table-recap tr td, .conf_body td{text-align:center !important;}
.address{display: block !important;margin-bottom: 10px !important;}
.space_address{display: none !important;}
}
@media only screen and (min-width: 301px) and (max-width: 500px) {
body {width:425px!important;margin:auto!important;}
thead, tbody{width: 100%}
.table {margin:auto!important;}
.logo, .titleblock, .linkbelow, .box, .footer, .space_footer{width:auto!important;display: block!important;}
.table-recap{width: 295px !important;}
.table-recap tr td, .conf_body td{text-align:center !important;}
.table-recap tr th{font-size: 10px !important}
}
@media only screen and (min-width: 501px) and (max-width: 768px) {
body {width:478px!important;margin:auto!important;}
thead, tbody{width: 100%}
.table {margin:auto!important;}
.logo, .titleblock, .linkbelow, .box, .footer, .space_footer{width:auto!important;display: block!important;}
}
@media only screen and (max-device-width: 480px) {
body {width:340px!important;margin:auto!important;}
thead, tbody{width: 100%}
.table {margin:auto!important;}
.logo, .titleblock, .linkbelow, .box, .footer, .space_footer{width:auto!important;display: block!important;}
.table-recap{width: 295px!important;}
.table-recap tr td, .conf_body td{text-align:center!important;}
.address{display: block !important;margin-bottom: 10px !important;}
.space_address{display: none !important;}
}
</style>
</head>
<body style="-webkit-text-size-adjust:none;background-color:#fff;width:650px;font-family:Open-sans, sans-serif;color:#555454;font-size:13px;line-height:18px;margin:auto">
<table class="table table-mail" style="width:100%;margin-top:10px;-moz-box-shadow:0 0 5px #afafaf;-webkit-box-shadow:0 0 5px #afafaf;-o-box-shadow:0 0 5px #afafaf;box-shadow:0 0 5px #afafaf;filter:progid:DXImageTransform.Microsoft.Shadow(color=#afafaf,Direction=134,Strength=5)">
<tr>
<td class="space" style="width:20px;padding:7px 0">&nbsp;</td>
<td align="center" style="padding:7px 0">
<table class="table" bgcolor="#ffffff" style="width:100%">
<tr>
<td align="center" class="logo" style="border-bottom:4px solid #333333;padding:7px 0">
<a title="{shop_name}" href="{shop_url}" style="color:#337ff1">
</a>
</td>
</tr>
<tr>
<td align="center" class="titleblock" style="padding:7px 0">
<font size="2" face="Open-sans, sans-serif" color="#555454">
<span class="title" style="font-weight:500;font-size:28px;text-transform:uppercase;line-height:33px">Bonjour,</span><br/>
<span class="subtitle" style="font-weight:500;font-size:16px;text-transform:uppercase;line-height:25px">Un nouveau retour de produit vient d'être passé par un client sur {shop_name}!</span>
</font>
</td>
</tr>
<tr>
<td class="space_footer" style="padding:0!important">&nbsp;</td>
</tr>
<tr>
<td class="box" style="border:1px solid #D6D4D4;background-color:#f8f8f8;padding:7px 0">
<table class="table" style="width:100%">
<tr>
<td width="10" style="padding:7px 0">&nbsp;</td>
<td style="padding:7px 0">
<font size="2" face="Open-sans, sans-serif" color="#555454">
<p data-html-only="1" style="border-bottom:1px solid #D6D4D4;margin:3px 0 7px;text-transform:uppercase;font-weight:500;font-size:18px;padding-bottom:10px">
Détails de la commande </p>
<span style="color:#777">
<span style="color:#333"><strong>Commande :</strong></span> {order_name} Date {date}<br /><br />
</span>
</font>
</td>
<td width="10" style="padding:7px 0">&nbsp;</td>
</tr>
</table>
</td>
</tr>
<tr>
<td style="padding:7px 0">
<font size="2" face="Open-sans, sans-serif" color="#555454">
{items}
</font>
</td>
</tr>
<tr>
<td class="space_footer" style="padding:0!important">&nbsp;</td>
</tr>
<tr>
<td class="footer" style="border-top:4px solid #333333;padding:7px 0">
<span><a href="{shop_url}" style="color:#337ff1">{shop_name}</a> réalisé avec <a href="http://www.prestashop.com/" style="color:#337ff1">PrestaShop&trade;</a></span>
</td>
</tr>
</table>
</td>
<td class="space" style="width:20px;padding:7px 0">&nbsp;</td>
</tr>
</table>
</body>
</html>

View File

@@ -0,0 +1,70 @@
[{shop_url}]
Bonjour {firstname} {lastname},
Merci d'avoir effectué vos achats sur {shop_name}!
COMMANDE : {order_name} Date {date}
PAIEMENT : {payment}
RÉFÉRENCE
PRODUIT
PRIX UNITAIRE
QUANTITÉ
PRIX TOTAL
{products_txt}
{discounts}
PRODUITS
{total_products}
RÉDUCTIONS
{total_discounts}
PAQUET CADEAU
{total_wrapping}
LIVRAISON
{total_shipping}
TVA TOTALE
{total_tax_paid}
TOTAL PAYÉ
{total_paid}
TRANSPORTEUR : {carrier}
PAIEMENT : {payment}
{delivery_block_txt}
{invoice_block_txt}
Vous pouvez accéder à tout moment au suivi de votre commande et
télécharger votre facture dans "Historique des commandes"
[{history_url}] de la rubrique "Mon compte"
[{my_account_url}] sur notre site.
Si vous avez un compte invité, vous pouvez suivre votre commande
dans la section "Suivi invité"
[{guest_tracking_url}?id_order={order_name}] de notre
site.
{shop_name} [{shop_url}] réalisé avec
PrestaShop(tm) [http://www.prestashop.com/]

View File

@@ -0,0 +1,35 @@
<?php
/**
* 2007-2015 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 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/osl-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-2015 PrestaShop SA
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 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;

View File

@@ -0,0 +1,35 @@
<?php
/**
* 2007-2015 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 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/osl-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 https://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2015 PrestaShop SA
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 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;

View File

@@ -0,0 +1,122 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
<title>Message de {shop_name}</title>
<style> @media only screen and (max-width: 300px){
body {
width:218px !important;
margin:auto !important;
}
thead, tbody{width: 100%}
.table {width:195px !important;margin:auto !important;}
.logo, .titleblock, .linkbelow, .box, .footer, .space_footer{width:auto !important;display: block !important;}
span.title{font-size:20px !important;line-height: 23px !important}
span.subtitle{font-size: 14px !important;line-height: 18px !important;padding-top:10px !important;display:block !important;}
td.box p{font-size: 12px !important;font-weight: bold !important;}
.table-recap table, .table-recap thead, .table-recap tbody, .table-recap th, .table-recap td, .table-recap tr {
display: block !important;
}
.table-recap{width: 200px!important;}
.table-recap tr td, .conf_body td{text-align:center !important;}
.address{display: block !important;margin-bottom: 10px !important;}
.space_address{display: none !important;}
}
@media only screen and (min-width: 301px) and (max-width: 500px) {
body {width:425px!important;margin:auto!important;}
thead, tbody{width: 100%}
.table {margin:auto!important;}
.logo, .titleblock, .linkbelow, .box, .footer, .space_footer{width:auto!important;display: block!important;}
.table-recap{width: 295px !important;}
.table-recap tr td, .conf_body td{text-align:center !important;}
.table-recap tr th{font-size: 10px !important}
}
@media only screen and (min-width: 501px) and (max-width: 768px) {
body {width:478px!important;margin:auto!important;}
thead, tbody{width: 100%}
.table {margin:auto!important;}
.logo, .titleblock, .linkbelow, .box, .footer, .space_footer{width:auto!important;display: block!important;}
}
@media only screen and (max-device-width: 480px) {
body {width:340px!important;margin:auto!important;}
thead, tbody{width: 100%}
.table {margin:auto!important;}
.logo, .titleblock, .linkbelow, .box, .footer, .space_footer{width:auto!important;display: block!important;}
.table-recap{width: 295px!important;}
.table-recap tr td, .conf_body td{text-align:center!important;}
.address{display: block !important;margin-bottom: 10px !important;}
.space_address{display: none !important;}
}
</style>
</head>
<body style="-webkit-text-size-adjust:none;background-color:#fff;width:650px;font-family:Open-sans, sans-serif;color:#555454;font-size:13px;line-height:18px;margin:auto">
<table class="table table-mail" style="width:100%;margin-top:10px;-moz-box-shadow:0 0 5px #afafaf;-webkit-box-shadow:0 0 5px #afafaf;-o-box-shadow:0 0 5px #afafaf;box-shadow:0 0 5px #afafaf;filter:progid:DXImageTransform.Microsoft.Shadow(color=#afafaf,Direction=134,Strength=5)">
<tr>
<td class="space" style="width:20px;padding:7px 0">&nbsp;</td>
<td align="center" style="padding:7px 0">
<table class="table" bgcolor="#ffffff" style="width:100%">
<tr>
<td align="center" class="logo" style="border-bottom:4px solid #333333;padding:7px 0">
<a title="{shop_name}" href="{shop_url}" style="color:#337ff1">
</a>
</td>
</tr>
<tr>
<td align="center" class="titleblock" style="padding:7px 0">
<font size="2" face="Open-sans, sans-serif" color="#555454">
<span class="title" style="font-weight:500;font-size:28px;text-transform:uppercase;line-height:33px">Bonjour,</span><br/>
<span class="subtitle" style="font-weight:500;font-size:16px;text-transform:uppercase;line-height:25px">Un nouveau retour de produit vient d'être passé par un client sur {shop_name}!</span>
</font>
</td>
</tr>
<tr>
<td class="space_footer" style="padding:0!important">&nbsp;</td>
</tr>
<tr>
<td class="box" style="border:1px solid #D6D4D4;background-color:#f8f8f8;padding:7px 0">
<table class="table" style="width:100%">
<tr>
<td width="10" style="padding:7px 0">&nbsp;</td>
<td style="padding:7px 0">
<font size="2" face="Open-sans, sans-serif" color="#555454">
<p data-html-only="1" style="border-bottom:1px solid #D6D4D4;margin:3px 0 7px;text-transform:uppercase;font-weight:500;font-size:18px;padding-bottom:10px">
Détails de la commande </p>
<span style="color:#777">
<span style="color:#333"><strong>Commande :</strong></span> {order_name} Date {date}<br /><br />
</span>
</font>
</td>
<td width="10" style="padding:7px 0">&nbsp;</td>
</tr>
</table>
</td>
</tr>
<tr>
<td style="padding:7px 0">
<font size="2" face="Open-sans, sans-serif" color="#555454">
{items}
</font>
</td>
</tr>
<tr>
<td class="space_footer" style="padding:0!important">&nbsp;</td>
</tr>
<tr>
<td class="footer" style="border-top:4px solid #333333;padding:7px 0">
<span><a href="{shop_url}" style="color:#337ff1">{shop_name}</a> réalisé avec <a href="http://www.prestashop.com/" style="color:#337ff1">PrestaShop&trade;</a></span>
</td>
</tr>
</table>
</td>
<td class="space" style="width:20px;padding:7px 0">&nbsp;</td>
</tr>
</table>
</body>
</html>

View File

@@ -0,0 +1,70 @@
[{shop_url}]
Bonjour {firstname} {lastname},
Merci d'avoir effectué vos achats sur {shop_name}!
COMMANDE : {order_name} Date {date}
PAIEMENT : {payment}
RÉFÉRENCE
PRODUIT
PRIX UNITAIRE
QUANTITÉ
PRIX TOTAL
{products_txt}
{discounts}
PRODUITS
{total_products}
RÉDUCTIONS
{total_discounts}
PAQUET CADEAU
{total_wrapping}
LIVRAISON
{total_shipping}
TVA TOTALE
{total_tax_paid}
TOTAL PAYÉ
{total_paid}
TRANSPORTEUR : {carrier}
PAIEMENT : {payment}
{delivery_block_txt}
{invoice_block_txt}
Vous pouvez accéder à tout moment au suivi de votre commande et
télécharger votre facture dans "Historique des commandes"
[{history_url}] de la rubrique "Mon compte"
[{my_account_url}] sur notre site.
Si vous avez un compte invité, vous pouvez suivre votre commande
dans la section "Suivi invité"
[{guest_tracking_url}?id_order={order_name}] de notre
site.
{shop_name} [{shop_url}] réalisé avec
PrestaShop(tm) [http://www.prestashop.com/]

View File

@@ -0,0 +1,35 @@
<?php
/**
* 2007-2015 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 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/osl-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-2015 PrestaShop SA
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 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;

View File

@@ -0,0 +1,35 @@
<?php
/**
* 2007-2015 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 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/osl-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 https://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2015 PrestaShop SA
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 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;

View File

@@ -0,0 +1,122 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
<title>Message de {shop_name}</title>
<style> @media only screen and (max-width: 300px){
body {
width:218px !important;
margin:auto !important;
}
thead, tbody{width: 100%}
.table {width:195px !important;margin:auto !important;}
.logo, .titleblock, .linkbelow, .box, .footer, .space_footer{width:auto !important;display: block !important;}
span.title{font-size:20px !important;line-height: 23px !important}
span.subtitle{font-size: 14px !important;line-height: 18px !important;padding-top:10px !important;display:block !important;}
td.box p{font-size: 12px !important;font-weight: bold !important;}
.table-recap table, .table-recap thead, .table-recap tbody, .table-recap th, .table-recap td, .table-recap tr {
display: block !important;
}
.table-recap{width: 200px!important;}
.table-recap tr td, .conf_body td{text-align:center !important;}
.address{display: block !important;margin-bottom: 10px !important;}
.space_address{display: none !important;}
}
@media only screen and (min-width: 301px) and (max-width: 500px) {
body {width:425px!important;margin:auto!important;}
thead, tbody{width: 100%}
.table {margin:auto!important;}
.logo, .titleblock, .linkbelow, .box, .footer, .space_footer{width:auto!important;display: block!important;}
.table-recap{width: 295px !important;}
.table-recap tr td, .conf_body td{text-align:center !important;}
.table-recap tr th{font-size: 10px !important}
}
@media only screen and (min-width: 501px) and (max-width: 768px) {
body {width:478px!important;margin:auto!important;}
thead, tbody{width: 100%}
.table {margin:auto!important;}
.logo, .titleblock, .linkbelow, .box, .footer, .space_footer{width:auto!important;display: block!important;}
}
@media only screen and (max-device-width: 480px) {
body {width:340px!important;margin:auto!important;}
thead, tbody{width: 100%}
.table {margin:auto!important;}
.logo, .titleblock, .linkbelow, .box, .footer, .space_footer{width:auto!important;display: block!important;}
.table-recap{width: 295px!important;}
.table-recap tr td, .conf_body td{text-align:center!important;}
.address{display: block !important;margin-bottom: 10px !important;}
.space_address{display: none !important;}
}
</style>
</head>
<body style="-webkit-text-size-adjust:none;background-color:#fff;width:650px;font-family:Open-sans, sans-serif;color:#555454;font-size:13px;line-height:18px;margin:auto">
<table class="table table-mail" style="width:100%;margin-top:10px;-moz-box-shadow:0 0 5px #afafaf;-webkit-box-shadow:0 0 5px #afafaf;-o-box-shadow:0 0 5px #afafaf;box-shadow:0 0 5px #afafaf;filter:progid:DXImageTransform.Microsoft.Shadow(color=#afafaf,Direction=134,Strength=5)">
<tr>
<td class="space" style="width:20px;padding:7px 0">&nbsp;</td>
<td align="center" style="padding:7px 0">
<table class="table" bgcolor="#ffffff" style="width:100%">
<tr>
<td align="center" class="logo" style="border-bottom:4px solid #333333;padding:7px 0">
<a title="{shop_name}" href="{shop_url}" style="color:#337ff1">
</a>
</td>
</tr>
<tr>
<td align="center" class="titleblock" style="padding:7px 0">
<font size="2" face="Open-sans, sans-serif" color="#555454">
<span class="title" style="font-weight:500;font-size:28px;text-transform:uppercase;line-height:33px">Bonjour,</span><br/>
<span class="subtitle" style="font-weight:500;font-size:16px;text-transform:uppercase;line-height:25px">Un nouveau retour de produit vient d'être passé par un client sur {shop_name}!</span>
</font>
</td>
</tr>
<tr>
<td class="space_footer" style="padding:0!important">&nbsp;</td>
</tr>
<tr>
<td class="box" style="border:1px solid #D6D4D4;background-color:#f8f8f8;padding:7px 0">
<table class="table" style="width:100%">
<tr>
<td width="10" style="padding:7px 0">&nbsp;</td>
<td style="padding:7px 0">
<font size="2" face="Open-sans, sans-serif" color="#555454">
<p data-html-only="1" style="border-bottom:1px solid #D6D4D4;margin:3px 0 7px;text-transform:uppercase;font-weight:500;font-size:18px;padding-bottom:10px">
Détails de la commande </p>
<span style="color:#777">
<span style="color:#333"><strong>Commande :</strong></span> {order_name} Date {date}<br /><br />
</span>
</font>
</td>
<td width="10" style="padding:7px 0">&nbsp;</td>
</tr>
</table>
</td>
</tr>
<tr>
<td style="padding:7px 0">
<font size="2" face="Open-sans, sans-serif" color="#555454">
{items}
</font>
</td>
</tr>
<tr>
<td class="space_footer" style="padding:0!important">&nbsp;</td>
</tr>
<tr>
<td class="footer" style="border-top:4px solid #333333;padding:7px 0">
<span><a href="{shop_url}" style="color:#337ff1">{shop_name}</a> réalisé avec <a href="http://www.prestashop.com/" style="color:#337ff1">PrestaShop&trade;</a></span>
</td>
</tr>
</table>
</td>
<td class="space" style="width:20px;padding:7px 0">&nbsp;</td>
</tr>
</table>
</body>
</html>

View File

@@ -0,0 +1,70 @@
[{shop_url}]
Bonjour {firstname} {lastname},
Merci d'avoir effectué vos achats sur {shop_name}!
COMMANDE : {order_name} Date {date}
PAIEMENT : {payment}
RÉFÉRENCE
PRODUIT
PRIX UNITAIRE
QUANTITÉ
PRIX TOTAL
{products_txt}
{discounts}
PRODUITS
{total_products}
RÉDUCTIONS
{total_discounts}
PAQUET CADEAU
{total_wrapping}
LIVRAISON
{total_shipping}
TVA TOTALE
{total_tax_paid}
TOTAL PAYÉ
{total_paid}
TRANSPORTEUR : {carrier}
PAIEMENT : {payment}
{delivery_block_txt}
{invoice_block_txt}
Vous pouvez accéder à tout moment au suivi de votre commande et
télécharger votre facture dans "Historique des commandes"
[{history_url}] de la rubrique "Mon compte"
[{my_account_url}] sur notre site.
Si vous avez un compte invité, vous pouvez suivre votre commande
dans la section "Suivi invité"
[{guest_tracking_url}?id_order={order_name}] de notre
site.
{shop_name} [{shop_url}] réalisé avec
PrestaShop(tm) [http://www.prestashop.com/]

View File

@@ -0,0 +1,35 @@
<?php
/**
* 2007-2015 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 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/osl-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-2015 PrestaShop SA
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 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;

View File

@@ -0,0 +1,35 @@
<?php
/**
* 2007-2015 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 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/osl-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 https://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2015 PrestaShop SA
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 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;

View File

@@ -0,0 +1,122 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
<title>Message de {shop_name}</title>
<style> @media only screen and (max-width: 300px){
body {
width:218px !important;
margin:auto !important;
}
thead, tbody{width: 100%}
.table {width:195px !important;margin:auto !important;}
.logo, .titleblock, .linkbelow, .box, .footer, .space_footer{width:auto !important;display: block !important;}
span.title{font-size:20px !important;line-height: 23px !important}
span.subtitle{font-size: 14px !important;line-height: 18px !important;padding-top:10px !important;display:block !important;}
td.box p{font-size: 12px !important;font-weight: bold !important;}
.table-recap table, .table-recap thead, .table-recap tbody, .table-recap th, .table-recap td, .table-recap tr {
display: block !important;
}
.table-recap{width: 200px!important;}
.table-recap tr td, .conf_body td{text-align:center !important;}
.address{display: block !important;margin-bottom: 10px !important;}
.space_address{display: none !important;}
}
@media only screen and (min-width: 301px) and (max-width: 500px) {
body {width:425px!important;margin:auto!important;}
thead, tbody{width: 100%}
.table {margin:auto!important;}
.logo, .titleblock, .linkbelow, .box, .footer, .space_footer{width:auto!important;display: block!important;}
.table-recap{width: 295px !important;}
.table-recap tr td, .conf_body td{text-align:center !important;}
.table-recap tr th{font-size: 10px !important}
}
@media only screen and (min-width: 501px) and (max-width: 768px) {
body {width:478px!important;margin:auto!important;}
thead, tbody{width: 100%}
.table {margin:auto!important;}
.logo, .titleblock, .linkbelow, .box, .footer, .space_footer{width:auto!important;display: block!important;}
}
@media only screen and (max-device-width: 480px) {
body {width:340px!important;margin:auto!important;}
thead, tbody{width: 100%}
.table {margin:auto!important;}
.logo, .titleblock, .linkbelow, .box, .footer, .space_footer{width:auto!important;display: block!important;}
.table-recap{width: 295px!important;}
.table-recap tr td, .conf_body td{text-align:center!important;}
.address{display: block !important;margin-bottom: 10px !important;}
.space_address{display: none !important;}
}
</style>
</head>
<body style="-webkit-text-size-adjust:none;background-color:#fff;width:650px;font-family:Open-sans, sans-serif;color:#555454;font-size:13px;line-height:18px;margin:auto">
<table class="table table-mail" style="width:100%;margin-top:10px;-moz-box-shadow:0 0 5px #afafaf;-webkit-box-shadow:0 0 5px #afafaf;-o-box-shadow:0 0 5px #afafaf;box-shadow:0 0 5px #afafaf;filter:progid:DXImageTransform.Microsoft.Shadow(color=#afafaf,Direction=134,Strength=5)">
<tr>
<td class="space" style="width:20px;padding:7px 0">&nbsp;</td>
<td align="center" style="padding:7px 0">
<table class="table" bgcolor="#ffffff" style="width:100%">
<tr>
<td align="center" class="logo" style="border-bottom:4px solid #333333;padding:7px 0">
<a title="{shop_name}" href="{shop_url}" style="color:#337ff1">
</a>
</td>
</tr>
<tr>
<td align="center" class="titleblock" style="padding:7px 0">
<font size="2" face="Open-sans, sans-serif" color="#555454">
<span class="title" style="font-weight:500;font-size:28px;text-transform:uppercase;line-height:33px">Bonjour,</span><br/>
<span class="subtitle" style="font-weight:500;font-size:16px;text-transform:uppercase;line-height:25px">Un nouveau retour de produit vient d'être passé par un client sur {shop_name}!</span>
</font>
</td>
</tr>
<tr>
<td class="space_footer" style="padding:0!important">&nbsp;</td>
</tr>
<tr>
<td class="box" style="border:1px solid #D6D4D4;background-color:#f8f8f8;padding:7px 0">
<table class="table" style="width:100%">
<tr>
<td width="10" style="padding:7px 0">&nbsp;</td>
<td style="padding:7px 0">
<font size="2" face="Open-sans, sans-serif" color="#555454">
<p data-html-only="1" style="border-bottom:1px solid #D6D4D4;margin:3px 0 7px;text-transform:uppercase;font-weight:500;font-size:18px;padding-bottom:10px">
Détails de la commande </p>
<span style="color:#777">
<span style="color:#333"><strong>Commande :</strong></span> {order_name} Date {date}<br /><br />
</span>
</font>
</td>
<td width="10" style="padding:7px 0">&nbsp;</td>
</tr>
</table>
</td>
</tr>
<tr>
<td style="padding:7px 0">
<font size="2" face="Open-sans, sans-serif" color="#555454">
{items}
</font>
</td>
</tr>
<tr>
<td class="space_footer" style="padding:0!important">&nbsp;</td>
</tr>
<tr>
<td class="footer" style="border-top:4px solid #333333;padding:7px 0">
<span><a href="{shop_url}" style="color:#337ff1">{shop_name}</a> réalisé avec <a href="http://www.prestashop.com/" style="color:#337ff1">PrestaShop&trade;</a></span>
</td>
</tr>
</table>
</td>
<td class="space" style="width:20px;padding:7px 0">&nbsp;</td>
</tr>
</table>
</body>
</html>

View File

@@ -0,0 +1,70 @@
[{shop_url}]
Bonjour {firstname} {lastname},
Merci d'avoir effectué vos achats sur {shop_name}!
COMMANDE : {order_name} Date {date}
PAIEMENT : {payment}
RÉFÉRENCE
PRODUIT
PRIX UNITAIRE
QUANTITÉ
PRIX TOTAL
{products_txt}
{discounts}
PRODUITS
{total_products}
RÉDUCTIONS
{total_discounts}
PAQUET CADEAU
{total_wrapping}
LIVRAISON
{total_shipping}
TVA TOTALE
{total_tax_paid}
TOTAL PAYÉ
{total_paid}
TRANSPORTEUR : {carrier}
PAIEMENT : {payment}
{delivery_block_txt}
{invoice_block_txt}
Vous pouvez accéder à tout moment au suivi de votre commande et
télécharger votre facture dans "Historique des commandes"
[{history_url}] de la rubrique "Mon compte"
[{my_account_url}] sur notre site.
Si vous avez un compte invité, vous pouvez suivre votre commande
dans la section "Suivi invité"
[{guest_tracking_url}?id_order={order_name}] de notre
site.
{shop_name} [{shop_url}] réalisé avec
PrestaShop(tm) [http://www.prestashop.com/]

View File

@@ -0,0 +1,11 @@
<?php
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,224 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
<title>Message de {shop_name}</title>
<style> @media only screen and (max-width: 300px) {
body {
width: 218px !important;
margin: auto !important;
}
thead, tbody {
width: 100%
}
.table {
width: 195px !important;
margin: auto !important;
}
.logo, .titleblock, .linkbelow, .box, .footer, .space_footer {
width: auto !important;
display: block !important;
}
span.title {
font-size: 20px !important;
line-height: 23px !important
}
span.subtitle {
font-size: 14px !important;
line-height: 18px !important;
padding-top: 10px !important;
display: block !important;
}
td.box p {
font-size: 12px !important;
font-weight: bold !important;
}
.table-recap table, .table-recap thead, .table-recap tbody, .table-recap th, .table-recap td, .table-recap tr {
display: block !important;
}
.table-recap {
width: 200px !important;
}
.table-recap tr td, .conf_body td {
text-align: center !important;
}
.address {
display: block !important;
margin-bottom: 10px !important;
}
.space_address {
display: none !important;
}
}
@media only screen and (min-width: 301px) and (max-width: 500px) {
body {
width: 425px !important;
margin: auto !important;
}
thead, tbody {
width: 100%
}
.table {
margin: auto !important;
}
.logo, .titleblock, .linkbelow, .box, .footer, .space_footer {
width: auto !important;
display: block !important;
}
.table-recap {
width: 295px !important;
}
.table-recap tr td, .conf_body td {
text-align: center !important;
}
.table-recap tr th {
font-size: 10px !important
}
}
@media only screen and (min-width: 501px) and (max-width: 768px) {
body {
width: 478px !important;
margin: auto !important;
}
thead, tbody {
width: 100%
}
.table {
margin: auto !important;
}
.logo, .titleblock, .linkbelow, .box, .footer, .space_footer {
width: auto !important;
display: block !important;
}
}
@media only screen and (max-device-width: 480px) {
body {
width: 340px !important;
margin: auto !important;
}
thead, tbody {
width: 100%
}
.table {
margin: auto !important;
}
.logo, .titleblock, .linkbelow, .box, .footer, .space_footer {
width: auto !important;
display: block !important;
}
.table-recap {
width: 295px !important;
}
.table-recap tr td, .conf_body td {
text-align: center !important;
}
.address {
display: block !important;
margin-bottom: 10px !important;
}
.space_address {
display: none !important;
}
}
</style>
</head>
<body style="-webkit-text-size-adjust:none;background-color:#fff;width:650px;font-family:Open-sans, sans-serif;color:#555454;font-size:13px;line-height:18px;margin:auto">
<table class="table table-mail" style="width:100%;margin-top:10px;-moz-box-shadow:0 0 5px #afafaf;-webkit-box-shadow:0 0 5px #afafaf;-o-box-shadow:0 0 5px #afafaf;box-shadow:0 0 5px #afafaf;filter:progid:DXImageTransform.Microsoft.Shadow(color=#afafaf,Direction=134,Strength=5)">
<tr>
<td class="space" style="width:20px;padding:7px 0">&nbsp;</td>
<td align="center" style="padding:7px 0">
<table class="table" bgcolor="#ffffff" style="width:100%">
<tr>
<td align="center" class="logo" style="border-bottom:4px solid #333333;padding:7px 0">
<a title="{shop_name}" href="{shop_url}" style="color:#337ff1">
</a>
</td>
</tr>
<tr>
<td align="center" class="titleblock" style="padding:7px 0">
<font size="2" face="Open-sans, sans-serif" color="#555454">
<span class="title" style="font-weight:500;font-size:28px;text-transform:uppercase;line-height:33px">Bonjour,</span><br/>
<span class="subtitle" style="font-weight:500;font-size:16px;text-transform:uppercase;line-height:25px">Un nouveau retour de produit vient d&#039;&ecirc;tre pass&eacute; par un client sur {shop_name}!</span>
</font>
</td>
</tr>
<tr>
<td class="space_footer" style="padding:0!important">&nbsp;</td>
</tr>
<tr>
<td class="box" style="border:1px solid #D6D4D4;background-color:#f8f8f8;padding:7px 0">
<table class="table" style="width:100%">
<tr>
<td width="10" style="padding:7px 0">&nbsp;</td>
<td style="padding:7px 0">
<font size="2" face="Open-sans, sans-serif" color="#555454">
<p data-html-only="1" style="border-bottom:1px solid #D6D4D4;margin:3px 0 7px;text-transform:uppercase;font-weight:500;font-size:18px;padding-bottom:10px">
D&eacute;tails de la commande </p>
<span style="color:#777">
<span style="color:#333"><strong>Commande :</strong></span> {order_name}<br><strong>Date</strong> {date}
</span>
</font>
</td>
<td width="10" style="padding:7px 0">&nbsp;</td>
</tr>
</table>
</td>
</tr>
<tr>
<td style="padding:7px 0">
<font size="2" face="Open-sans, sans-serif" color="#555454">
{items}
</font>
</td>
</tr>
<tr>
<td class="space_footer" style="padding:0!important">&nbsp;</td>
</tr>
<tr>
<td class="footer" style="border-top:4px solid #333333;padding:7px 0">
<span><a href="{shop_url}" style="color:#337ff1">{shop_name}</a> r&eacute;alis&eacute; avec <a href="http://www.prestashop.com/" style="color:#337ff1">PrestaShop&trade;</a></span>
</td>
</tr>
</table>
</td>
<td class="space" style="width:20px;padding:7px 0">&nbsp;</td>
</tr>
</table>
</body>
</html>

View File

@@ -0,0 +1,14 @@
[{shop_url}]
Bonjour,
Un nouveau retour de produit vient d'être passé par un client sur {shop_name} !
Détails de la commande
Commande : {order_name}
Date : {date}
{items_list}
{shop_name} [{shop_url}] réalisé avec PrestaShop(tm) [http://www.prestashop.com/]

View File

@@ -0,0 +1,35 @@
<?php
/**
* 2007-2015 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 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/osl-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-2015 PrestaShop SA
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 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;

View File

@@ -0,0 +1,35 @@
<?php
/**
* 2007-2015 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 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/osl-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 https://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2015 PrestaShop SA
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 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;

View File

@@ -0,0 +1,122 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
<title>Message de {shop_name}</title>
<style> @media only screen and (max-width: 300px){
body {
width:218px !important;
margin:auto !important;
}
thead, tbody{width: 100%}
.table {width:195px !important;margin:auto !important;}
.logo, .titleblock, .linkbelow, .box, .footer, .space_footer{width:auto !important;display: block !important;}
span.title{font-size:20px !important;line-height: 23px !important}
span.subtitle{font-size: 14px !important;line-height: 18px !important;padding-top:10px !important;display:block !important;}
td.box p{font-size: 12px !important;font-weight: bold !important;}
.table-recap table, .table-recap thead, .table-recap tbody, .table-recap th, .table-recap td, .table-recap tr {
display: block !important;
}
.table-recap{width: 200px!important;}
.table-recap tr td, .conf_body td{text-align:center !important;}
.address{display: block !important;margin-bottom: 10px !important;}
.space_address{display: none !important;}
}
@media only screen and (min-width: 301px) and (max-width: 500px) {
body {width:425px!important;margin:auto!important;}
thead, tbody{width: 100%}
.table {margin:auto!important;}
.logo, .titleblock, .linkbelow, .box, .footer, .space_footer{width:auto!important;display: block!important;}
.table-recap{width: 295px !important;}
.table-recap tr td, .conf_body td{text-align:center !important;}
.table-recap tr th{font-size: 10px !important}
}
@media only screen and (min-width: 501px) and (max-width: 768px) {
body {width:478px!important;margin:auto!important;}
thead, tbody{width: 100%}
.table {margin:auto!important;}
.logo, .titleblock, .linkbelow, .box, .footer, .space_footer{width:auto!important;display: block!important;}
}
@media only screen and (max-device-width: 480px) {
body {width:340px!important;margin:auto!important;}
thead, tbody{width: 100%}
.table {margin:auto!important;}
.logo, .titleblock, .linkbelow, .box, .footer, .space_footer{width:auto!important;display: block!important;}
.table-recap{width: 295px!important;}
.table-recap tr td, .conf_body td{text-align:center!important;}
.address{display: block !important;margin-bottom: 10px !important;}
.space_address{display: none !important;}
}
</style>
</head>
<body style="-webkit-text-size-adjust:none;background-color:#fff;width:650px;font-family:Open-sans, sans-serif;color:#555454;font-size:13px;line-height:18px;margin:auto">
<table class="table table-mail" style="width:100%;margin-top:10px;-moz-box-shadow:0 0 5px #afafaf;-webkit-box-shadow:0 0 5px #afafaf;-o-box-shadow:0 0 5px #afafaf;box-shadow:0 0 5px #afafaf;filter:progid:DXImageTransform.Microsoft.Shadow(color=#afafaf,Direction=134,Strength=5)">
<tr>
<td class="space" style="width:20px;padding:7px 0">&nbsp;</td>
<td align="center" style="padding:7px 0">
<table class="table" bgcolor="#ffffff" style="width:100%">
<tr>
<td align="center" class="logo" style="border-bottom:4px solid #333333;padding:7px 0">
<a title="{shop_name}" href="{shop_url}" style="color:#337ff1">
</a>
</td>
</tr>
<tr>
<td align="center" class="titleblock" style="padding:7px 0">
<font size="2" face="Open-sans, sans-serif" color="#555454">
<span class="title" style="font-weight:500;font-size:28px;text-transform:uppercase;line-height:33px">Bonjour,</span><br/>
<span class="subtitle" style="font-weight:500;font-size:16px;text-transform:uppercase;line-height:25px">Un nouveau retour de produit vient d'être passé par un client sur {shop_name}!</span>
</font>
</td>
</tr>
<tr>
<td class="space_footer" style="padding:0!important">&nbsp;</td>
</tr>
<tr>
<td class="box" style="border:1px solid #D6D4D4;background-color:#f8f8f8;padding:7px 0">
<table class="table" style="width:100%">
<tr>
<td width="10" style="padding:7px 0">&nbsp;</td>
<td style="padding:7px 0">
<font size="2" face="Open-sans, sans-serif" color="#555454">
<p data-html-only="1" style="border-bottom:1px solid #D6D4D4;margin:3px 0 7px;text-transform:uppercase;font-weight:500;font-size:18px;padding-bottom:10px">
Détails de la commande </p>
<span style="color:#777">
<span style="color:#333"><strong>Commande :</strong></span> {order_name} Date {date}<br /><br />
</span>
</font>
</td>
<td width="10" style="padding:7px 0">&nbsp;</td>
</tr>
</table>
</td>
</tr>
<tr>
<td style="padding:7px 0">
<font size="2" face="Open-sans, sans-serif" color="#555454">
{items}
</font>
</td>
</tr>
<tr>
<td class="space_footer" style="padding:0!important">&nbsp;</td>
</tr>
<tr>
<td class="footer" style="border-top:4px solid #333333;padding:7px 0">
<span><a href="{shop_url}" style="color:#337ff1">{shop_name}</a> réalisé avec <a href="http://www.prestashop.com/" style="color:#337ff1">PrestaShop&trade;</a></span>
</td>
</tr>
</table>
</td>
<td class="space" style="width:20px;padding:7px 0">&nbsp;</td>
</tr>
</table>
</body>
</html>

View File

@@ -0,0 +1,70 @@
[{shop_url}]
Bonjour {firstname} {lastname},
Merci d'avoir effectué vos achats sur {shop_name}!
COMMANDE : {order_name} Date {date}
PAIEMENT : {payment}
RÉFÉRENCE
PRODUIT
PRIX UNITAIRE
QUANTITÉ
PRIX TOTAL
{products_txt}
{discounts}
PRODUITS
{total_products}
RÉDUCTIONS
{total_discounts}
PAQUET CADEAU
{total_wrapping}
LIVRAISON
{total_shipping}
TVA TOTALE
{total_tax_paid}
TOTAL PAYÉ
{total_paid}
TRANSPORTEUR : {carrier}
PAIEMENT : {payment}
{delivery_block_txt}
{invoice_block_txt}
Vous pouvez accéder à tout moment au suivi de votre commande et
télécharger votre facture dans "Historique des commandes"
[{history_url}] de la rubrique "Mon compte"
[{my_account_url}] sur notre site.
Si vous avez un compte invité, vous pouvez suivre votre commande
dans la section "Suivi invité"
[{guest_tracking_url}?id_order={order_name}] de notre
site.
{shop_name} [{shop_url}] réalisé avec
PrestaShop(tm) [http://www.prestashop.com/]

View File

@@ -0,0 +1,11 @@
<?php
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
/**
* 2007-2015 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 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/osl-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-2015 PrestaShop SA
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 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;

View File

@@ -0,0 +1,35 @@
<?php
/**
* 2007-2015 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 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/osl-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 https://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2015 PrestaShop SA
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 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;

View File

@@ -0,0 +1,122 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
<title>Message de {shop_name}</title>
<style> @media only screen and (max-width: 300px){
body {
width:218px !important;
margin:auto !important;
}
thead, tbody{width: 100%}
.table {width:195px !important;margin:auto !important;}
.logo, .titleblock, .linkbelow, .box, .footer, .space_footer{width:auto !important;display: block !important;}
span.title{font-size:20px !important;line-height: 23px !important}
span.subtitle{font-size: 14px !important;line-height: 18px !important;padding-top:10px !important;display:block !important;}
td.box p{font-size: 12px !important;font-weight: bold !important;}
.table-recap table, .table-recap thead, .table-recap tbody, .table-recap th, .table-recap td, .table-recap tr {
display: block !important;
}
.table-recap{width: 200px!important;}
.table-recap tr td, .conf_body td{text-align:center !important;}
.address{display: block !important;margin-bottom: 10px !important;}
.space_address{display: none !important;}
}
@media only screen and (min-width: 301px) and (max-width: 500px) {
body {width:425px!important;margin:auto!important;}
thead, tbody{width: 100%}
.table {margin:auto!important;}
.logo, .titleblock, .linkbelow, .box, .footer, .space_footer{width:auto!important;display: block!important;}
.table-recap{width: 295px !important;}
.table-recap tr td, .conf_body td{text-align:center !important;}
.table-recap tr th{font-size: 10px !important}
}
@media only screen and (min-width: 501px) and (max-width: 768px) {
body {width:478px!important;margin:auto!important;}
thead, tbody{width: 100%}
.table {margin:auto!important;}
.logo, .titleblock, .linkbelow, .box, .footer, .space_footer{width:auto!important;display: block!important;}
}
@media only screen and (max-device-width: 480px) {
body {width:340px!important;margin:auto!important;}
thead, tbody{width: 100%}
.table {margin:auto!important;}
.logo, .titleblock, .linkbelow, .box, .footer, .space_footer{width:auto!important;display: block!important;}
.table-recap{width: 295px!important;}
.table-recap tr td, .conf_body td{text-align:center!important;}
.address{display: block !important;margin-bottom: 10px !important;}
.space_address{display: none !important;}
}
</style>
</head>
<body style="-webkit-text-size-adjust:none;background-color:#fff;width:650px;font-family:Open-sans, sans-serif;color:#555454;font-size:13px;line-height:18px;margin:auto">
<table class="table table-mail" style="width:100%;margin-top:10px;-moz-box-shadow:0 0 5px #afafaf;-webkit-box-shadow:0 0 5px #afafaf;-o-box-shadow:0 0 5px #afafaf;box-shadow:0 0 5px #afafaf;filter:progid:DXImageTransform.Microsoft.Shadow(color=#afafaf,Direction=134,Strength=5)">
<tr>
<td class="space" style="width:20px;padding:7px 0">&nbsp;</td>
<td align="center" style="padding:7px 0">
<table class="table" bgcolor="#ffffff" style="width:100%">
<tr>
<td align="center" class="logo" style="border-bottom:4px solid #333333;padding:7px 0">
<a title="{shop_name}" href="{shop_url}" style="color:#337ff1">
</a>
</td>
</tr>
<tr>
<td align="center" class="titleblock" style="padding:7px 0">
<font size="2" face="Open-sans, sans-serif" color="#555454">
<span class="title" style="font-weight:500;font-size:28px;text-transform:uppercase;line-height:33px">Bonjour,</span><br/>
<span class="subtitle" style="font-weight:500;font-size:16px;text-transform:uppercase;line-height:25px">Un nouveau retour de produit vient d'être passé par un client sur {shop_name}!</span>
</font>
</td>
</tr>
<tr>
<td class="space_footer" style="padding:0!important">&nbsp;</td>
</tr>
<tr>
<td class="box" style="border:1px solid #D6D4D4;background-color:#f8f8f8;padding:7px 0">
<table class="table" style="width:100%">
<tr>
<td width="10" style="padding:7px 0">&nbsp;</td>
<td style="padding:7px 0">
<font size="2" face="Open-sans, sans-serif" color="#555454">
<p data-html-only="1" style="border-bottom:1px solid #D6D4D4;margin:3px 0 7px;text-transform:uppercase;font-weight:500;font-size:18px;padding-bottom:10px">
Détails de la commande </p>
<span style="color:#777">
<span style="color:#333"><strong>Commande :</strong></span> {order_name} Date {date}<br /><br />
</span>
</font>
</td>
<td width="10" style="padding:7px 0">&nbsp;</td>
</tr>
</table>
</td>
</tr>
<tr>
<td style="padding:7px 0">
<font size="2" face="Open-sans, sans-serif" color="#555454">
{items}
</font>
</td>
</tr>
<tr>
<td class="space_footer" style="padding:0!important">&nbsp;</td>
</tr>
<tr>
<td class="footer" style="border-top:4px solid #333333;padding:7px 0">
<span><a href="{shop_url}" style="color:#337ff1">{shop_name}</a> réalisé avec <a href="http://www.prestashop.com/" style="color:#337ff1">PrestaShop&trade;</a></span>
</td>
</tr>
</table>
</td>
<td class="space" style="width:20px;padding:7px 0">&nbsp;</td>
</tr>
</table>
</body>
</html>

View File

@@ -0,0 +1,70 @@
[{shop_url}]
Bonjour {firstname} {lastname},
Merci d'avoir effectué vos achats sur {shop_name}!
COMMANDE : {order_name} Date {date}
PAIEMENT : {payment}
RÉFÉRENCE
PRODUIT
PRIX UNITAIRE
QUANTITÉ
PRIX TOTAL
{products_txt}
{discounts}
PRODUITS
{total_products}
RÉDUCTIONS
{total_discounts}
PAQUET CADEAU
{total_wrapping}
LIVRAISON
{total_shipping}
TVA TOTALE
{total_tax_paid}
TOTAL PAYÉ
{total_paid}
TRANSPORTEUR : {carrier}
PAIEMENT : {payment}
{delivery_block_txt}
{invoice_block_txt}
Vous pouvez accéder à tout moment au suivi de votre commande et
télécharger votre facture dans "Historique des commandes"
[{history_url}] de la rubrique "Mon compte"
[{my_account_url}] sur notre site.
Si vous avez un compte invité, vous pouvez suivre votre commande
dans la section "Suivi invité"
[{guest_tracking_url}?id_order={order_name}] de notre
site.
{shop_name} [{shop_url}] réalisé avec
PrestaShop(tm) [http://www.prestashop.com/]

View File

@@ -0,0 +1,999 @@
<?php
/**
* NOTICE OF LICENSE
*
* This source file is subject to a commercial license from Common-Services Co., Ltd.
* Use, copy, modification or distribution of this source file without written
* license agreement from the SARL SMC is strictly forbidden.
* In order to obtain a license, please contact us: contact@common-services.com
* ...........................................................................
* INFORMATION SUR LA LICENCE D'UTILISATION
*
* L'utilisation de ce fichier source est soumise a une licence commerciale
* concedee par la societe Common-Services Co., Ltd.
* Toute utilisation, reproduction, modification ou distribution du present
* fichier source sans contrat de licence ecrit de la part de la Common-Services Co. Ltd. est
* expressement interdite.
* Pour obtenir une licence, veuillez contacter Common-Services Co., Ltd. a l'adresse: contact@common-services.com
* ...........................................................................
*
* @package SoNice Retour
* @author Alexandre D.
* @copyright Copyright (c) 2011-2015 Common Services Co Ltd - 90/25 Sukhumvit 81 - 10260 Bangkok - Thailand
* @license Commercial license
* Support by mail : support.sonice@common-services.com
*/
if (!defined('_PS_VERSION_')) {
exit;
}
if (!class_exists('SoNiceRetourTools')) {
require_once(_PS_MODULE_DIR_.'sonice_retour/classes/SoNiceRetourTools.php');
}
if (!class_exists('ConfigureMessage')) {
require_once(_PS_MODULE_DIR_.'sonice_retour/classes/shared/configure_message.class.php');
}
class SoNice_Retour extends Module
{
const ADD = 'a';
const REMOVE = 'd';
const UPDATE = 'u';
protected $ps16x = false;
protected $ps15x = false;
/** @var array ISO code of available countries */
protected $available_countries = array(
'fr', 'de', 'es', 'gb', 'lu', 'nl', 'be', 'ie', 'cz', 'sk', 'si', 'fi', 'at', 'it'
);
/** @var boolean Specify if the module is run in debug mode or not */
protected $debug = false;
public $path;
public $url;
public $id_lang;
public $download_folder;
public $http_download_folder;
public $function_folder;
public $change_return_state_url;
public $action_merchandise_return_url;
public $get_label_url;
public function __construct()
{
$this->name = 'sonice_retour';
$this->tab = 'shipping_logistics';
$this->version = '2.0.09';
$this->author = 'Common-Services';
$this->need_instance = 0;
$this->limited_countries = $this->available_countries;
$this->module_key = 'c9b0bd56ba47b0d88b9964dacc6ab652';
parent::__construct();
$this->displayName = 'SoNice Retour';
$this->description = $this->l(
'This service permits to generate labels with or without proof of submission according to your contract.'
);
$this->path = _PS_MODULE_DIR_.$this->name.'/';
$this->url = __PS_BASE_URI__.basename(_PS_MODULE_DIR_).'/'.$this->name.'/';
$this->download_folder = $this->path.'download/';
$this->http_download_folder = $this->url.'download/';
$this->function_folder = $this->url.'functions/';
$this->change_return_state_url = $this->function_folder.'changeReturnState.php';
$this->action_merchandise_return_url = $this->function_folder.'changeReturnState.php';
$this->get_label_url = $this->function_folder.'get_labels.php';
$this->bootstrap = true;
$this->initContext();
}
/**
* Init Prestashop context for version 1.5 & 1.4
*/
private function initContext()
{
if (version_compare(_PS_VERSION_, '1.6', '>=')) {
$this->ps16x = true;
}
if (version_compare(_PS_VERSION_, '1.5', '>=')) {
$this->context = Context::getContext();
$this->id_lang = (int)Context::getContext()->language->id;
$this->ps15x = true;
} else {
require_once(_PS_MODULE_DIR_.'sonice_retour/backward_compatibility/backward.php');
$this->context = Context::getContext();
$this->id_lang = (int)Context::getContext()->language->id;
$this->ps15x = false;
}
$this->context->smarty->assign(array(
'ps16x' => $this->ps16x,
'ps15x' => $this->ps15x,
'snr_url' => $this->url,
'snr_css' => $this->url.'views/css/',
'snr_js' => $this->url.'views/js/',
'snr_img' => $this->url.'views/img/'
));
$this->debug = (bool)Configuration::get('ETIQUETAGE_RETURN_DEBUG');
}
/**
* Set up hooks
*
* @param string $action
* @return bool
*/
private function hookSetup($action)
{
if ($this->ps15x) {
$expected_hooks = array(
'displayAdminOrder',
'actionCarrierUpdate',
'actionOrderReturn'
);
} else {
$expected_hooks = array(
'adminOrder',
'updateCarrier',
'orderReturn'
);
}
$pass = true;
if (in_array($action, array(self::REMOVE, self::UPDATE))) {
foreach ($expected_hooks as $expected_hook) {
if (!$this->unregisterHook($expected_hook)) {
$pass = false;
}
}
}
if (in_array($action, array(self::ADD, self::UPDATE))) {
foreach ($expected_hooks as $expected_hook) {
if (!$this->registerHook($expected_hook)) {
$pass = false;
}
}
}
return ($pass);
}
private function myAddJS($url)
{
if ($this->ps15x) {
$this->context->controller->addJS($url);
} else {
echo '<script type="text/javascript" src="'.$url.'"></script>';
}
}
private function myAddJQueryUI($name = null)
{
if ($this->ps15x) {
$this->context->controller->addJqueryUI($name);
} else {
echo '<script type="text/javascript" src="'._PS_JS_DIR_.'jquery/jquery-ui-1.8.10.custom.min.js"></script>';
}
return (true);
}
private function myAddCSS($url, $media)
{
if ($this->ps15x) {
return ($this->context->controller->addCSS($url, $media));
} else {
echo '<link type="text/css" rel="stylesheet" href="'.$url.'">';
}
}
private function backofficeInformations()
{
$php_infos = array();
$module_infos = array();
$module_config = unserialize(Configuration::get('ETIQUETAGE_RETURN_CONF'));
$prestashop_infos = array();
// Web service settings
if (!isset($module_config['ContractNumber']) || empty($module_config['ContractNumber'])) {
$module_infos['ws_login']['message'] = $this->l(
'You did not set a login yet, please fill the login field in the Login tab.'
);
$module_infos['ws_login']['level'] = $this->ps16x ? 'alert alert-warning' : 'warn';
}
if (!isset($module_config['Password']) || empty($module_config['Password'])) {
$module_infos['ws_pwd']['message'] = $this->l(
'You did not set a password yet, please fill the password field in the Login tab.'
);
$module_infos['ws_pwd']['level'] = $this->ps16x ? 'alert alert-warning' : 'warn';
}
if (!isset($module_config['Line2']) || empty($module_config['Line2'])
|| !isset($module_config['countryCode']) || empty($module_config['countryCode'])
|| !isset($module_config['City']) || empty($module_config['City'])
|| !isset($module_config['PostalCode']) || empty($module_config['PostalCode'])) {
$module_infos['ws_address']['message'] = $this->l(
'You did not set an address yet, please fill the address fields in the Address tab.'
);
$module_infos['ws_address']['level'] = $this->ps16x ? 'alert alert-warning' : 'warn';
}
// PHP
if (!is_writable(_PS_MODULE_DIR_.'sonice_retour/download')) {
$php_infos['dl_w']['message'] = sprintf($this->l(
'You have to set write permissions to the %s directory'
), _PS_MODULE_DIR_.'sonice_retour/download');
$php_infos['dl_w']['level'] = $this->ps16x ? 'alert alert-warning' : 'warn';
}
if (!method_exists('DOMDocument', 'createElement')) {
$php_infos['domdocument']['message'] = $this->l(
'PHP DOMDocument (XML Library) must be installed on this server. '.
'The module require this library and can\'t work without it.'
);
$php_infos['domdocument']['level'] = $this->ps16x ? 'alert alert-danger' : 'error';
$php_infos['domdocument']['link'] = 'http://php.net/manual/'.Language::getIsoById($this->id_lang).
'/class.domdocument.php';
}
if (!function_exists('curl_init')) {
$php_infos['curl']['message'] = $this->l('cURL extension must be available on your server.');
$php_infos['cur;']['level'] = $this->ps16x ? 'alert alert-danger' : 'error';
$php_infos['curl']['link'] = 'http://php.net/manual/'.Language::getIsoById($this->id_lang).'/book.curl.php';
}
if (in_array(@Tools::strtolower(ini_get('display_errors')), array('1', 'on'))) {
$php_infos['display_errors']['message'] = $this->l('PHP variable display_errors is On.');
$php_infos['display_errors']['level'] = $this->ps16x ? 'alert alert-info' : 'info';
}
if (!function_exists('mb_convert_encoding')) {
$php_infos['mbstring']['message'] = $this->l(
'PHP mb_string functions must be installed on this server. '.
'The module require this library and can\'t work without it.'
);
$php_infos['mbstring']['level'] = $this->ps16x ? 'alert alert-danger' : 'error';
$php_infos['mbstring']['link'] = 'http://php.net/manual/'.Language::getIsoById($this->id_lang).
'/mbstring.setup.php';
}
// PrestaShop
if (!(int)Configuration::get('PS_SHOP_ENABLE')) {
$prestashop_infos['maintenance']['message'] = $this->l(
'Be carefull, your shop is in maintenance mode, the module might not work in that mode'
);
$prestashop_infos['maintenance']['level'] = $this->ps16x ? 'alert alert-warning' : 'warn';
}
if (_PS_MODE_DEV_) {
$prestashop_infos['dev_mode']['message'] = $this->l('The Prestashop constant _PS_MODE_DEV_ is enabled.');
$prestashop_infos['dev_mode']['level'] = $this->ps16x ? 'alert alert-info' : 'info';
}
// URL issues for Ajax
$pass = true;
if (version_compare(_PS_VERSION_, '1.5', '>=')) {
if (Shop::isFeatureActive()) {
$shop = Context::getContext()->shop;
if ($_SERVER['HTTP_HOST'] != $shop->domain && $_SERVER['HTTP_HOST'] != $shop->domain_ssl) {
$pass = false;
}
} else {
$urls = ShopUrl::getShopUrls($this->context->shop->id)->where('main', '=', 1)->getFirst();
if ($_SERVER['HTTP_HOST'] != $urls->domain && $_SERVER['HTTP_HOST'] != $urls->domain_ssl) {
$pass = false;
}
}
} elseif (version_compare(_PS_VERSION_, '1.4', '>=')) {
if ($_SERVER['HTTP_HOST'] != Configuration::get('PS_SHOP_DOMAIN') &&
$_SERVER['HTTP_HOST'] != Configuration::get('PS_SHOP_DOMAIN_SSL')) {
$pass = false;
}
}
if (!$pass) {
$prestashop_infos['wrong_domain']['message'] = $this->l(
'Your are currently connected with the following domain name:'
).' '.$_SERVER['HTTP_HOST'].'. '.$this->l(
'This one is different from the main shop domain name set in "Preferences > SEO & URLs":'
).' '.Configuration::get('PS_SHOP_DOMAIN').'...';
$prestashop_infos['wrong_domain']['level'] = $this->ps16x ? 'alert alert-danger' : 'error';
}
$view_params = array();
$view_params['module_infos'] = $module_infos;
$view_params['module_info_ok'] = !count($module_infos);
$view_params['php_infos'] = $php_infos;
$view_params['php_info_ok'] = !count($php_infos);
$view_params['prestashop_infos'] = $prestashop_infos;
$view_params['prestashop_info_ok'] = !count($prestashop_infos);
ob_start();
try {
@phpinfo(INFO_ALL & ~INFO_CREDITS & ~INFO_LICENSE & ~INFO_ENVIRONMENT & ~INFO_VARIABLES);
} catch (Exception $excp) {
echo 'phpinfo() has been disabled for security reasons. '.$excp->getMessage();
}
$phpinfos = ob_get_clean();
$phpinfos = preg_replace(
'/(a:link.*)|(body, td, th, h1, h2.*)|(img.*)|(td, th.*)|(a:hover.*)|(class="center")/',
'',
$phpinfos
);
$view_params['phpinfo_str'] = empty($phpinfos) ?
$this->l('phpinfo() has been disabled for security reasons.') : $phpinfos;
$view_params['psinfo_str'] = $this->psInfo();
$view_params['dbinfo_str'] = $this->dbInfo();
return ($view_params);
}
public function psInfo()
{
// TODO
$prestashop_info = '';
if ($this->ps15x) {
$sort = 'ORDER by `name`,`id_shop`';
} else {
$sort = 'ORDER by `name`';
}
$results = Db::getInstance()->executeS(
'SELECT *
FROM `'._DB_PREFIX_.'configuration`
WHERE `name` LIKE "PS_%"
OR `name` LIKE "ETIQUETAGE_RETURN_%"
'.$sort
);
$ps_configuration = null;
foreach ($results as $result) {
if (strpos($result['name'], 'KEY') || strpos($result['name'], 'EMAIL') ||
strpos($result['name'], 'PASSWORD') || strpos($result['name'], 'PASSWD') ||
strpos($result['name'], 'CONTEXT_DATA')) {
continue;
}
$value = $result['value'];
if (base64_encode(base64_decode($value, true)) === $value) {
$value = base64_decode($value, true);
} else {
$value = $result['value'];
}
if (@serialize(@unserialize($value)) == $value) {
$value = '<div class="print_r">'.print_r(unserialize($value), true).'</div>';
} else {
$value = Tools::strlen($result['value']) > 128 ?
Tools::substr($result['value'], 0, 128).'...' : $result['value'];
}
if ($this->ps15x) {
$ps_configuration .= sprintf(
'%-50s %03d %03d : %s'."\n",
$result['name'],
$result['id_shop'],
$result['id_shop_group'],
$value
);
} else {
$ps_configuration .= sprintf('%-50s : %s'."\n", $result['name'], $value);
}
}
$prestashop_info .= '<h1>Prestashop</h1>';
$prestashop_info .= '<pre>';
$prestashop_info .= 'Version: '._PS_VERSION_."\n\n";
$prestashop_info .= "\n";
$prestashop_info .= $ps_configuration;
$prestashop_info .= '</pre>'."\n\n";
return ($prestashop_info);
}
public function dbInfo()
{
$tables_to_check = array(
_DB_PREFIX_.'so_return_label'
);
$query = Db::getInstance()->executeS('SHOW TABLES');
$tables = array();
foreach ($query as $rows) {
foreach ($rows as $t) {
$tables[$t] = 1;
}
}
$not_existing_tables = array();
foreach ($tables_to_check as $to_check) {
if (!isset($tables[$to_check])) {
$not_existing_tables[] = $to_check;
ConfigureMessage::error(
$this->l(
'The table `'.$to_check.'` was not found in your database.'
)
);
}
}
$tables_column = array();
foreach ($tables_to_check as $to_check) {
if (in_array($to_check, $not_existing_tables)) {
$tables_column[] = null;
continue;
}
$result = Db::getInstance()->executeS('SHOW COLUMNS FROM `'.$to_check.'`');
foreach ($result as $id => $column) {
$result[$id] = $column['Field'];
}
$tables_column[] = $result;
}
$db_info = '<h1>'.$this->l('Database').'</h1>';
$db_info .= '<pre>';
foreach ($tables_to_check as $id => $to_check) {
$db_info .= 'SHOW COLUMNS FROM `'.$to_check.'` : '.(in_array($to_check, $not_existing_tables) ?
'N/A<br>' : print_r($tables_column[$id], true));
$db_info .= 'SELECT * FROM `'.$to_check.'` ORDER BY `date_add` DESC LIMIT 5 : ';
$db_info .= print_r(Db::getInstance()->executeS(
'SELECT *
FROM `'.$to_check.'`
ORDER BY `date_add`
DESC LIMIT 5'
), true);
}
$db_info .= '</pre>';
return ($db_info);
}
private function checkhttpDownloadFolder()
{
if (!is_writable($this->download_folder)) {
@chmod($this->download_folder, 7777);
}
$content = 'Hello World !'.PHP_EOL;
if (file_put_contents($this->download_folder.'TO_DELETE.txt', $content) === false) {
printf(
'%s/%d: %s - %s',
basename(__FILE__),
__LINE__,
$this->l('Failed to write to the directory'),
$this->download_folder
);
return (false);
}
return (true);
}
public function install()
{
$pass = true;
if (!parent::install()) {
$this->_errors[] = $this->l('An error occured while installing with parent::install().');
$pass = false;
}
if (!$this->hookSetup(self::ADD)) {
$this->_errors[] = $this->l('An error occured while registering hooks.');
$pass = false;
}
if (!$this->checkhttpDownloadFolder()) {
$this->_errors[] = $this->l('An error occured while checking folder permissions.');
$pass = false;
}
// Basic configuration setup
$shop_phone = Configuration::get('PS_SHOP_PHONE');
$shop_phone = preg_replace('/\D/', '', $shop_phone);
$default_shop_informations = array(
'ContractNumber' => null,
'Password' => null,
'Name' => null,
'Surname' => null,
'ServiceInfo' => null,
'companyName' => Configuration::get('PS_SHOP_NAME'),
'Line0' => Configuration::get('PS_SHOP_ADDR2'),
'Line1' => null,
'Line2' => Configuration::get('PS_SHOP_ADDR1'),
'Line3' => null,
'PostalCode' => Configuration::get('PS_SHOP_CODE'),
'City' => Configuration::get('PS_SHOP_CITY'),
'countryCode' => 'FR',
'phoneNumber' => $shop_phone,
'Mail' => Configuration::get('PS_SHOP_EMAIL'),
'demo' => null,
'insurance' => null,
'deposit_date' => null,
'output_print_type' => 'PDF_A4_300dpi'
);
Configuration::updateValue('ETIQUETAGE_RETURN_CONF', serialize($default_shop_informations));
// Database
$sql = 'CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'so_return_label` (
`id_label` INT(10) NOT NULL AUTO_INCREMENT,
`id_return` INT(10) NOT NULL,
`id_coliposte` VARCHAR(20) NOT NULL,
`date_add` DATETIME NOT NULL,
`date_upd` DATETIME NOT NULL,
PRIMARY KEY (`id_label`)
) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8;';
if (!Db::getInstance()->execute($sql)) {
$pass = false;
}
return ((bool)$pass);
}
public function uninstall()
{
$pass = true;
if (!$this->hookSetup(self::REMOVE)) {
$this->_errors[] = $this->l('An error occured while unregistering hooks.');
$pass = false;
}
if (!parent::uninstall()) {
$this->_errors[] = $this->l('An error occured while uninstalling with parent::uninstall().');
$pass = false;
}
Configuration::deleteByName('ETIQUETAGE_RETURN_CONF');
Db::getInstance()->execute('DROP TABLE IF EXISTS `'._DB_PREFIX_.'so_return_label`');
return ((bool)$pass);
}
public function getContent()
{
$output = null;
if (Tools::isSubmit('submit'.$this->name)) {
$pass = true;
$values = Tools::getValue('return_info');
$values['ContractNumber'] = trim($values['ContractNumber']);
$values['Password'] = trim($values['Password']);
$values['deposit_date'] = (int)$values['deposit_date'];
$pass += Configuration::updateValue('ETIQUETAGE_RETURN_CONF', serialize($values));
$pass += Configuration::updateValue('ETIQUETAGE_RETURN_DEBUG', Tools::getValue('sne_debug'));
$pass += Configuration::updateValue('ETIQUETAGE_RETURN_TEST', Tools::getValue('sne_test_mode'));
// Database
$sql =
'CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'so_return_label` (
`id_label` INT(10) NOT NULL AUTO_INCREMENT,
`id_return` INT(10) NOT NULL,
`id_coliposte` VARCHAR(20) NOT NULL,
`date_add` DATETIME NOT NULL,
`date_upd` DATETIME NOT NULL,
PRIMARY KEY (`id_label`)
) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8;';
$pass += Db::getInstance()->execute($sql);
if ($pass) {
$output .= $this->displayConfirmation($this->l('Options updated.'));
} else {
$output .= $this->displayError($this->l('The system failed to save your options.'));
}
$this->hookSetup(self::UPDATE);
}
return $output.$this->displayForm();
}
public function displayForm()
{
require_once(dirname(__FILE__).'/classes/shared/configure_tab.class.php');
$html = '';
$alert_class = array();
$alert_class['danger'] = $this->ps16x ? 'alert alert-danger' : 'error';
$alert_class['warning'] = $this->ps16x ? 'alert alert-warning' : 'warn';
$alert_class['success'] = $this->ps16x ? 'alert alert-success' : 'conf';
$alert_class['info'] = $this->ps16x ? 'alert alert-info' : 'hint';
$this->context->smarty->assign(
array(
'sne_name' => $this->displayName,
'sne_version' => $this->version,
'ps_version' => _PS_VERSION_,
'sne_description' => $this->description,
'sne_module_dir' => $this->url,
'sne_module_path' => $this->path,
'sne_check_login' => $this->url.'functions/check_login.php?token='.md5(_COOKIE_IV_),
'sne_config' => unserialize(Configuration::get('ETIQUETAGE_RETURN_CONF')),
'sne_info' => $this->backofficeInformations(),
'selected_tab' => Tools::getValue('selected_tab') ? Tools::getValue('selected_tab') : '0',
'sne_module_name' => $this->name,
'alert_class' => $alert_class,
'sne_debug' => Configuration::get('ETIQUETAGE_RETURN_DEBUG'),
'sne_test_mode' => Configuration::get('ETIQUETAGE_RETURN_TEST'),
'sne_mails' => $this->getTemplates('fr')
)
);
$tab_list = array();
$tab_list[] = array(
'id' => 'sonice_retour', 'img' => 'sonice_retour', 'name' => 'SoNice Retour', 'selected' => true
);
$tab_list[] = array(
'id' => 'informations', 'img' => 'information', 'name' => 'Informations', 'selected' => false
);
$tab_list[] = array('id' => 'account', 'img' => 'key', 'name' => $this->l('Account'), 'selected' => false);
$tab_list[] = array('id' => 'address', 'img' => 'house', 'name' => $this->l('Address'), 'selected' => false);
$tab_list[] = array('id' => 'conf', 'img' => 'cog_edit', 'name' => $this->l('Settings'), 'selected' => false);
$this->myAddCSS($this->url.'views/css/configuration16.css', 'all');
$this->myAddCSS($this->url.'views/css/jquery.qtip.min.css', 'all');
$this->myAddJS($this->url.'views/js/configuration.js');
$this->myAddJS($this->url.'views/js/jquery.qtip.min.js');
$html .= ConfigureMessage::display();
$html .= $this->context->smarty->fetch(dirname(__FILE__).'/views/templates/admin/configuration/header.tpl');
$html .= ConfigureTab::generateTabs($tab_list);
$html .= $this->context->smarty->fetch(
dirname(__FILE__).'/views/templates/admin/configuration/configuration.tpl'
);
return ($html);
}
/**
* @see AdminStatusesController
* @param null $lang
* @return array
*/
protected function getTemplates($lang = null)
{
$default_path = '../mails/';
$theme_path = '../themes/'._THEME_NAME_.'/mails/';
$array = array();
foreach (Language::getLanguages(false) as $language) {
$iso_code = $language['iso_code'];
if ($lang && Tools::strtolower($lang) != Tools::strtolower($iso_code)) {
continue;
}
if (!@filemtime(_PS_ADMIN_DIR_.'/'.$default_path.$iso_code) &&
!@filemtime(_PS_ADMIN_DIR_.'/'.$theme_path.$iso_code)) {
continue;
}
$theme_templates_dir = _PS_ADMIN_DIR_.'/'.$theme_path.$iso_code;
$theme_templates = is_dir($theme_templates_dir) ? scandir($theme_templates_dir) : array();
$templates = array_unique(array_merge(scandir(
_PS_ADMIN_DIR_.'/'.$default_path.$iso_code
), $theme_templates));
foreach ($templates as $template) {
if (!strncmp(strrev($template), 'lmth.', 5)) {
$search_result = array_search($template, $theme_templates);
$array[$iso_code][] = array(
'id' => Tools::substr($template, 0, -5),
'name' => Tools::substr($template, 0, -5),
'folder' => ((!empty($search_result)?$theme_path:$default_path))
);
}
}
}
if ($lang && isset($array[Tools::strtolower($lang)])) {
return $array[Tools::strtolower($lang)];
}
return $array;
}
public function hookActionOrderReturn($params)
{
$customer = new Customer($params['orderReturn']->id_customer);
$order = new Order($params['orderReturn']->id_order);
$returned_products = OrderReturn::getOrdersReturnDetail($params['orderReturn']->id);
$items_list = '';
foreach ($returned_products as $id_details) {
$order_details = new OrderDetail($id_details['id_order_detail']);
$items_list .= $this->l('Reference').' : '.$order_details->product_reference.'
'.$this->l('Product').' : '.$order_details->product_name.'
'.$this->l('Quantity').' : '.$order_details->product_quantity_return;
}
$items_table = '<table>
<thead>
<tr>
<th>'.$this->l('Reference').'</th>
<th>'.$this->l('Product').'</th>
<th>'.$this->l('Quantity').'</th>
</tr>
</thead>
<tbody>';
foreach ($returned_products as $id_details) {
$order_details = new OrderDetail($id_details['id_order_detail']);
$items_table .= '
<tr>
<td>'.$order_details->product_reference.'</td>
<td>'.$order_details->product_name.'</td>
<td>'.$order_details->product_quantity_return.'</td>
</tr>';
}
$items_table .= '</tbody></table>';
// Filling-in vars for email
$template = 'returned_product';
$template_vars = array(
'{firstname}' => $customer->firstname,
'{lastname}' => $customer->lastname,
'{email}' => $customer->email,
'{order_name}' => sprintf('%06d', $order->id),
'{shop_name}' => Configuration::get('PS_SHOP_NAME'),
'{date}' => $params['orderReturn']->date_add,
'{items}' => $items_table,
'{items_list}' => $items_list,
'{message}' => $this->l('A new return')
);
if (file_exists(dirname(__FILE__).'/mails/fr/returned_product.html')) {
Mail::Send(
Configuration::get('PS_LANG_DEFAULT'),
$template,
sprintf($this->l('Returned Order - #%06d'), $params['orderReturn']->id),
$template_vars,
Configuration::get('PS_SHOP_EMAIL'),
null,
Configuration::get('PS_SHOP_EMAIL'),
Configuration::get('PS_SHOP_NAME'),
null,
null,
dirname(__FILE__).'/mails/'
);
}
return (true);
}
public function hookDisplayAdminOrder($params)
{
$module_conf = unserialize(Configuration::get('ETIQUETAGE_RETURN_CONF'));
$already_returned = false;
$still_some = false;
$return_detail = array();
$this->context->smarty->assign('ps16x', $this->ps16x);
if ($this->ps15x) {
$order = new Order($params['id_order']);
if (!Validate::isLoadedObject($order)) {
return (false);
}
$address_delivery = new Address($order->id_address_delivery);
if (!Validate::isLoadedObject($address_delivery)) {
return (false);
}
} else {
if (!isset($params['id_order'])) {
return (false);
}
$order = new Order((int)$params['id_order']);
if (!Validate::isLoadedObject($order)) {
return (false);
}
$cart = new Cart($order->id_cart);
if (!Validate::isLoadedObject($cart)) {
return (false);
}
$address_delivery = new Address($cart->id_address_delivery);
if (!Validate::isLoadedObject($address_delivery)) {
return (false);
}
}
/* Check if return is available in the country */
// $order_country = Tools::strtolower(Country::getIsoById($address_delivery->id_country));
// if (!in_array($order_country, $this->available_countries)) {
// return (false);
// }
/* Check if order is in a proper state to be returned */
if ($this->ps15x && !$order->isPaidAndShipped()) {
return (false);
} elseif (!$order->hasBeenDelivered()) {
return (false);
}
$order_return = Db::getInstance()->executeS('
SELECT *
FROM `'._DB_PREFIX_.'order_return`
WHERE `id_customer` = '.(int)$order->id_customer.'
AND `id_order` = '.(int)$order->id.'
ORDER BY `id_order_return` ASC
');
$order_details = array();
$product_left_list = null;
if (is_array($order_return) && count($order_return)) {
$already_returned = true;
$product_returned_list = array();
foreach ($order_return as $key => $return) {
$return_details = OrderReturn::getOrdersReturnDetail((int)$return['id_order_return']);
foreach ($return_details as $detail) {
$product_returned_list['return'][$key][$detail['id_order_detail']] = $detail;
$product_returned_list['product'][$detail['id_order_detail']] = $detail['product_quantity'];
}
$order_details = $order->getProductsDetail();
foreach ($order_details as $order_detail) {
$to_minus = isset($product_returned_list['product'][$order_detail['id_order_detail']])
? $product_returned_list['product'][$order_detail['id_order_detail']]
: 0;
$product_left_list[$order_detail['id_order_detail']] =
(int)$order_detail['product_quantity'] - (int)$to_minus;
$return_detail[$key]['date'] = isset($return) ? $return['date_add'] : null;
// Get PDF, state, color
$state = null;
$state = new OrderReturnState((int)$return['state'], $this->id_lang);
if (Validate::isLoadedObject($state)) {
$return_detail[$key]['pdf'] = Db::getInstance()->getValue(
'SELECT `id_coliposte`
FROM `'._DB_PREFIX_.'so_return_label`
WHERE `id_return` = '.(int)$order_return[$key]['id_order_return']
);
$return_detail[$key]['state'] = $state->name;
$return_detail[$key]['color'] = $state->color;
} else {
$return_detail[$key]['pdf'] = $this->l('Unknown');
$return_detail[$key]['state'] = $this->l('Unknown');
$return_detail[$key]['color'] = 'red';
}
$return_detail[$key]['id_order_return'] = $return['id_order_return'];
$return_detail[$key]['metadata'] = array(
'id_order_return' => $return['id_order_return'],
// OCARAT ajout du motif du retour
'question' => $return['question'],
'pdf' => $return_detail[$key]['pdf'],
'state' => $return_detail[$key]['state'],
'color' => $return_detail[$key]['color']
);
}
}
$this->context->smarty->assign(array(
'sonice_retour_returnedProduct' => $product_returned_list,
'sonice_retour_productLeft' => $product_left_list,
// OCARAT ajout du lien pour afficher le retour dans AdminReturn
'sonice_retour_returnDetail_link' =>
$this->context->link->getAdminLink('AdminReturn') . '&updateorder_return&id_order_return=',
'sonice_retour_returnDetail' => $return_detail,
'sonice_retour_tracking_url' =>
'http://www.colissimo.fr/portail_colissimo/suivreResultat.do?parcelnumber='
));
// still some
$total_product_order = 0;
foreach ($order_details as $detail) {
$total_product_order += $detail['product_quantity'];
}
$total_product_returned = 0;
foreach ($product_returned_list['return'] as $returned_part) {
foreach ($returned_part as $product_returned) {
$total_product_returned += $product_returned['product_quantity'];
}
}
$still_some = $total_product_order - $total_product_returned;
} else {
// no product returned yet
$order_details = $order->getProductsDetail();
foreach ($order_details as $order_detail) {
$product_left_list[$order_detail['id_order_detail']] =
(int)$order_detail['product_quantity'] - (int)$order_detail['product_quantity_return'];
}
}
$token = '?token='.md5(_COOKIE_IV_);
/* Return begins */
$this->context->smarty->assign(
array(
'imgUrl' => $this->url.'views/img/',
'sonice_retour_alreadyChoseReturnProduct' => $already_returned,
'sonice_retour_stillSome' => $still_some,
'sonice_retour_id_order' => $params['id_order'],
'sonice_retour_id_customer' => $this->ps15x ? $params['cart']->id_customer : $order->id_customer,
'sonice_retour_id_delivery' => $this->ps15x ?
$params['cart']->id_address_delivery : $order->id_address_delivery,
'change_return_state_url' => $this->change_return_state_url.$token,
'action_merchandise_return_url' => $this->action_merchandise_return_url.$token,
'get_label_url' => $this->get_label_url.$token,
'sonice_retour_function_folder' => $this->function_folder,
'sonice_retour_http_download_folder' => $this->http_download_folder,
'sonice_retour_baseURL' => _PS_BASE_URL_,
'sonice_retour_productLeft' => $product_left_list,
'sonice_retour_stateList' => OrderReturnState::getOrderReturnStates($this->id_lang),
'sonice_retour_returnDetail' => $return_detail,
'sonice_retour_demo' => (isset($module_conf['demo']) && $module_conf['demo']) ?
$module_conf['demo'] : false,
'sonice_retour_printing_type' => isset($module_conf['printingType']) ?
$module_conf['printingType'] : 'tab'
)
);
$this->myAddCSS($this->url.'views/css/sonice_retour.css', 'all');
$this->myAddJS($this->url.'views/js/orderReturn.js');
$this->myAddJS($this->url.'views/js/plug.js');
// For "return all" button
$this->myAddJS($this->url.'views/js/jquery-simulate.js');
if ($this->ps15x) {
$this->myAddJQueryUI('ui.droppable');
$this->myAddJQueryUI('ui.draggable');
} else {
$this->myAddJQueryUI();
}
if (version_compare(_PS_VERSION_, '1.5', '>=')) {
return ($this->context->smarty->fetch(dirname(__FILE__).'/views/templates/admin/hook/orderReturn16.tpl'));
}
return ($this->context->smarty->fetch(dirname(__FILE__).'/views/templates/admin/hook/orderReturn.tpl'));
}
public function hookAdminOrder($params)
{
return ($this->hookDisplayAdminOrder($params));
}
public function hookOrderReturn($params)
{
return ($this->hookActionOrderReturn($params));
}
}

View File

@@ -0,0 +1,379 @@
/**
* NOTICE OF LICENSE
*
* This source file is subject to a commercial license from Common-Services Co., Ltd.
* Use, copy, modification or distribution of this source file without written
* license agreement from the SARL SMC is strictly forbidden.
* In order to obtain a license, please contact us: contact@common-services.com
* ...........................................................................
* INFORMATION SUR LA LICENCE D'UTILISATION
*
* L'utilisation de ce fichier source est soumise a une licence commerciale
* concedee par la societe Common-Services Co., Ltd.
* Toute utilisation, reproduction, modification ou distribution du present
* fichier source sans contrat de licence ecrit de la part de la Common-Services Co. Ltd. est
* expressement interdite.
* Pour obtenir une licence, veuillez contacter Common-Services Co., Ltd. a l'adresse: contact@common-services.com
* ...........................................................................
*
* @package SoNice Retour
* @author Alexandre D.
* @copyright Copyright (c) 2011-2015 Common Services Co Ltd - 90/25 Sukhumvit 81 - 10260 Bangkok - Thailand
* @license Commercial license
* Support by mail : support.sonice@common-services.com
*/
hr {
border-bottom: 1px solid silver;
background-color: transparent;
height: 1px;
width: 30%;
margin-bottom: 20px;
}
#conf-account td {
text-align: center;
font-weight: bold;
padding-left: 50px;
}
form p {
margin: 0;
}
fieldset, .margin-form, p {
color: black;
}
.sne_licenceContact a {
color: #ff502d;
}
.clean {
clear: both;
margin: 0;
padding: 0;
height: 0;
}
.cleaner {
clear:both;
margin:5px;
}
.sohint {
min-height: 32px;
background: #BDE5F8 url(../img/icon-info.png) no-repeat 6px 6px;
border: 1px solid #00529B;
padding: 8px 5px 5px 50px;
border-radius: 3px;
color: black;
}
.sohint a {
font-weight: bold;
}
.font-red {
color: red;
}
.im_cmd_input {
font-family: "Lucida Console", Monaco, monospace;
width: 75%;
height: 20px;
}
table tbody tr td p {
height: 15px;
}
.sne_licence {
color: #ff502d;
font-weight: bold;
}
.sne_licenceContact {
font-weight: bold;
}
.sne_logo {
margin: 40px 0;
}
.sne_module_name {
font-size: 4em;
}
.sne_orange {
color: #ff502d;
}
.sne_grey {
color: #8c8c8c;
}
.sne_black {
color: black;
}
.sne_typo {
font-size: 1em;
margin-top: -4px;
}
.sne_typo_conftab {
font-size: 1em;
}
.sne_typo_conftab table tbody tr td p span, .sne_typo_conftab p span {
color: red;
font-size: 2em;
vertical-align: -7px;
margin-left: 5px;
}
.sne_typo_conftab table {
margin-top: -6px;
}
.sne_typo_conftab table td {
padding-right: 15px;
}
.sne_typo_conftab table td input, .sne_typo_conftab .connectParam {
width: 300px;
padding: 5px;
border: 1px solid #DDDDDD;
/*Applying CSS3 gradient*/
background: -moz-linear-gradient(center top , #FFFFFF, #EEEEEE 1px, #FFFFFF 20px);
background: -webkit-gradient(linear, left top, left 20, from(#FFFFFF), color-stop(5%, #EEEEEE) to(#FFFFFF));
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FBFBFB', endColorstr='#FFFFFF');
/*Applying CSS 3radius*/
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
/*Applying CSS3 box shadow*/
-moz-box-shadow: 0 0 2px #DDDDDD;
-webkit-box-shadow: 0 0 2px #DDDDDD;
box-shadow: 0 0 2px #DDDDDD;
}
.sne_typo_conftab .connectParam {
width: 100px;
}
.sne_documentation_list {
margin-left: 50px;
margin-bottom: 20px;
text-align: center;
}
.sne_documentation_list td {
width: 50px;
}
.sne_documentation_list img {
cursor: pointer;
}
.sne_documentation_warning {
width: 100% !important;
float: left;
cursor: default !important;
margin-top: 5px;
}
.sne_documentation_warning span {
font-size: 1.2em;
}
.submitconf {
float: right;
margin: 20px;
width: 150px;
}
.sne-info p
{
font-size:1.1em;
}
.add-weight img, .remove-weight img
{
position: relative;
top: -3px;
border:1px solid gainsboro;
padding: 2px;
cursor:pointer;
background-color:whitesmoke;
border-radius:2px;
-webkit-opacity: 0.7;
-moz-opacity: 0.7;
opacity: 0.7;
}
.add-weight img:hover, .remove-weight img:hover
{
border:1px solid lavender;
background-color: lightgray;
}
.arrow-next {
width: 15px;
vertical-align: -5px;
margin: 0 10px;
}
.sne-info-level-error
{
min-height: 32px;
background: #FFBABA url('../../img/icon-cancel.png') no-repeat 6px 6px;
border: 1px solid #CC0000;
padding: 8px 5px 5px 50px;
border-radius: 3px;
}
.sne-info-level-warn
{
min-height: 32px;
background: #FEEFB3 url('../../img/icon-attention.png') no-repeat 6px 6px;
border: 1px solid #9e6014;
padding: 8px 5px 5px 50px;
border-radius: 3px;
}
.sne-info-level-ok
{
min-height: 32px;
background: #DFF2BF url('../img/icon-valid.png') no-repeat 6px 6px;
border: 1px solid #4F8A10;
padding: 8px 5px 5px 50px;
border-radius: 3px;
}
.sne-info-text-error
{
color:red;
font-weight:bold;
}
.sne-info-text-warn
{
color:#9e6014;
font-weight:bold;
}
.sne-info-text-ok {
color: #4F8A10;
}
.so-warning {
font-size: 12px;
margin-top: 5px;
display: block;
color: navy;
}
#sne_configuration_div hr {
border-top: 1px solid #ccc !important;
margin: 20px;
}
#conf-carrier_mapping img {
height: 20px;
vertical-align: -5px;
}
#conf-tare input {
margin: 0 5px;
}
#sneTab {
margin-bottom: 51px;
}
#menuTab {
float: left;
padding: 0;
margin: 0;
text-align: left;
background-color: #efefef;
padding: 10px;
border-top: 1px solid gainsboro;
border-left: 1px solid gainsboro;
border-right: 1px solid gainsboro;
}
#menuTab li {
float: left;
text-align: left;
min-width: 145px;
height: 35px;
display: inline;
margin: 3px;
padding: 0 10px 15px 15px;
background: #EFEFEF;
font-weight: bold;
cursor: pointer;
}
#menuTab li span {
position: relative;
top: 10px;
font-weight: bold;
}
#menuTab li.menuTabButton.selected {
border-bottom: 3px solid #6495ED;
padding-bottom: 12px;
}
#menuTab li.menuTabButton:hover {
cursor: pointer;
background: #6495ED;
opacity: 0.7;
}
#fieldset_2 select {
margin: 0 5px;
padding: 2px;
}
.sne_multi_select {
width: 250px;
height: 250px;
}
.sne_multi_select_heading {
width: 560px;
text-align: center;
letter-spacing: 300px;
}
.sne_move {
cursor: pointer;
padding:5px;
border:1px solid transparent;
}
.sne_move:hover {
padding:5px;
border:1px solid silver;
background-color:#ffe1d3;
}
.sne_sep {
margin: 100px 20px 0 20px;
}
.float-left {
float: left;
}
.float-right {
float: right;
}

View File

@@ -0,0 +1,219 @@
/**
* NOTICE OF LICENSE
*
* This source file is subject to a commercial license from Common-Services Co., Ltd.
* Use, copy, modification or distribution of this source file without written
* license agreement from the SARL SMC is strictly forbidden.
* In order to obtain a license, please contact us: contact@common-services.com
* ...........................................................................
* INFORMATION SUR LA LICENCE D'UTILISATION
*
* L'utilisation de ce fichier source est soumise a une licence commerciale
* concedee par la societe Common-Services Co., Ltd.
* Toute utilisation, reproduction, modification ou distribution du present
* fichier source sans contrat de licence ecrit de la part de la Common-Services Co. Ltd. est
* expressement interdite.
* Pour obtenir une licence, veuillez contacter Common-Services Co., Ltd. a l'adresse: contact@common-services.com
* ...........................................................................
*
* @package SoNice Retour
* @author Alexandre D.
* @copyright Copyright (c) 2011-2015 Common Services Co Ltd - 90/25 Sukhumvit 81 - 10260 Bangkok - Thailand
* @license Commercial license
* Support by mail : support.sonice@common-services.com
*/
/* QTIP */
#sonice_configuration label.tip span {
text-decoration: none;
font-style: inherit;
border-bottom: 1px dashed rgba(255, 150, 0, 0.40);
padding-bottom: 2px;
cursor: pointer;
}
/* PS15x */
.hint {
display: block !important;
}
.col-lg-8 {
width: 66.66667%;
float: left;
}
#_form input[type="text"],
#_form input[type="tel"],
#_form input[type="email"],
#_form input[type="search"],
#_form input[type="password"],
#_form textarea,
#_form select {
/*display: block;*/
/*width: 100%;*/
/*height: 27px;*/
padding: 4px 8px;
font-size: 12px;
/*line-height: 1.42857;*/
color: #555;
background-color: #fff;
background-image: none;
border: 1px solid #ccc;
border-radius: 3px;
-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,0.075);
box-shadow: inset 0 1px 1px rgba(0,0,0,0.075);
-webkit-transition: border-color ease-in-out 0.15s,box-shadow ease-in-out 0.15s;
-o-transition: border-color ease-in-out 0.15s,box-shadow ease-in-out 0.15s;
transition: border-color ease-in-out 0.15s,box-shadow ease-in-out 0.15s;
}
/* PS16x */
#conf-carrier_mapping select {
display: inline;
width: 60%;
}
#conf-carrier_mapping img {
height: 20px;
vertical-align: -5px;
}
#conf-tare .col-lg-9 input {
width: 60px;
display: inline;
}
#conf-tare img {
height: 20px;
}
#conf-address .input-group-addon, #conf-address p span {
color: red;
font-weight: bold;
font-size: 14px;
}
.help-block {
color: #00aff0 !important;
}
.sne_orange {
color: #ff502d;
}
.sne_grey {
color: #8c8c8c;
}
.sne_black {
color: black;
}
.sne_documentation_list {
margin-left: 50px;
margin-bottom: 20px;
text-align: center;
}
.sne_documentation_list td {
width: 50px;
}
.sne_documentation_list img {
cursor: pointer;
}
.sne_documentation_warning {
width: 100% !important;
float: left;
cursor: default !important;
margin-top: 5px;
}
.sne_documentation_warning span {
font-size: 1.2em;
}
.connectParam {
/*width: 150px !important;*/
}
.add-weight img, .remove-weight img
{
position: relative;
top: -3px;
border:1px solid gainsboro;
padding: 2px;
cursor:pointer;
background-color:whitesmoke;
border-radius:2px;
-webkit-opacity: 0.7;
-moz-opacity: 0.7;
opacity: 0.7;
margin-left: 10px;
}
.add-weight img:hover, .remove-weight img:hover
{
border:1px solid lavender;
background-color: lightgray;
}
.im_cmd_input {
font-family: "Lucida Console", Monaco, monospace !important;
display: inline !important;
width: 70% !important;
height: 27px !important;
}
.arrow-next {
width: 15px;
vertical-align: -5px;
margin: 0 10px;
}
.sne_multi_select {
width: 250px !important;
height: 250px !important;
}
.sne_multi_select_heading {
width: 560px;
text-align: center;
letter-spacing: 300px;
}
.sne_move {
cursor: pointer;
padding:5px;
border:1px solid transparent;
}
.sne_move:hover {
padding:5px;
border:1px solid silver;
background-color: whitesmoke;
}
.sne_sep {
margin: 80px 20px 0 20px;
}
.float-left {
float: left;
}
.float-right {
float: right;
}
.alert.alert-info {
line-height: 1.6em;
border: 1px solid transparent !important;
border-left: 3px solid #81cfe6 !important;
}
.alert.alert-info a {
font-weight: bold;
}

View File

@@ -0,0 +1,11 @@
<?php
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

View File

@@ -0,0 +1,432 @@
/**
* NOTICE OF LICENSE
*
* This source file is subject to a commercial license from Common-Services Co., Ltd.
* Use, copy, modification or distribution of this source file without written
* license agreement from the SARL SMC is strictly forbidden.
* In order to obtain a license, please contact us: contact@common-services.com
* ...........................................................................
* INFORMATION SUR LA LICENCE D'UTILISATION
*
* L'utilisation de ce fichier source est soumise a une licence commerciale
* concedee par la societe Common-Services Co., Ltd.
* Toute utilisation, reproduction, modification ou distribution du present
* fichier source sans contrat de licence ecrit de la part de la Common-Services Co. Ltd. est
* expressement interdite.
* Pour obtenir une licence, veuillez contacter Common-Services Co., Ltd. a l'adresse: contact@common-services.com
* ...........................................................................
*
* @package SoNice Retour
* @author Alexandre D.
* @copyright Copyright (c) 2011-2015 Common Services Co Ltd - 90/25 Sukhumvit 81 - 10260 Bangkok - Thailand
* @license Commercial license
* Support by mail : support.sonice@common-services.com
*/
hr {
border: 1px solid gainsboro;
}
.hint {
display: block !important;
}
.sne_table_split {
margin: 30px 0 40px;
}
.sne_douchette {
vertical-align: middle;
margin-right: 5px;
}
.session_btn_slip {
background-color: #F8F8F8;
border: 1px solid #CCCCCC;
margin-bottom: 10px;
padding: 5px 0;
border-radius: 3px;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
-o-border-radius: 3px;
width: 150px;
text-align: center;
cursor: pointer;
float: right;
}
.session_btn_slip:hover {
background-color: #fff;
border: 1px inset #ccc;
border-radius: 3px;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
-o-border-radius: 3px;
}
.pageTitle button {
font-size: 16px;
padding: 5px;
}
.send_exp {
border: 1px solid gray;
padding: 1px;
background-color: #DFF2BF;
cursor: pointer;
}
.send_exp:hover {
background-color: #EFF8DF;
}
.etq_selector {
height: 30px;
width: 200px;
}
.edit {
cursor: pointer;
}
.weight input, .weight_product input {
text-align: right;
}
#sne_labels_session tbody input {
border: 1px solid transparent;
background-color: transparent;
box-shadow: none;
width: 95%;
}
#sne_labels_session tbody input:focus {
border: 1px solid green;
background-color: white;
}
#sne_labels_session tbody .weight input:focus, #sne_labels_session tbody .weight_product input:focus {
text-align: left;
}
#sne_labels_availables tbody tr:nth-child(even) {
background-color: whitesmoke;
}
.edit_on {
border: 1px solid green !important;
background-color: white !important;
}
table tr th:nth-child(2) {
width: 50px;
}
table tbody tr:hover {
background-color: lemonchiffon !important;
}
#tab-listing table tr th:nth-child(3) {
width: 95px;
}
#tab-listing table tr th:nth-child(4) {
width: 85px;
}
#tab-listing table tr th:nth-child(5) {
width: 140px;
}
#tab-listing table tr th:nth-child(6) {
width: 220px;
}
#tab-listing table tr th:nth-child(7) {
width: 160px;
}
#tab-listing table tr th:nth-child(9) {
width: 50px;
}
#tab-listing table tr th:nth-child(10) {
width: 50px;
}
#table_exp th:nth-child(2), #table_exp th:nth-child(3) {
width: 100px;
}
thead tr th img {
vertical-align: baseline;
cursor: pointer;
}
.send_package {
text-align: center;
}
.send_package img {
top: -3px;
border:1px solid gainsboro;
padding: 2px;
cursor:pointer;
background-color:whitesmoke;
border-radius:2px;
-webkit-opacity: 0.7;
-moz-opacity: 0.7;
opacity: 0.7;
}
.barcode-div {
height: 50px;
float: right;
}
.barcode-div span {
font-size: 18px;
margin-right: 10px;
vertical-align: middle;
}
.barcode-input {
width: 200px;
height: 30px;
}
.send_package img:hover {
border:1px solid lavender;
background-color: lightgray;
}
.validated_row {
background-color: #EFF8DF;
}
.validated_row2 {
background-color: #DFF2BF;
}
.label span, .label a {
color: navy;
}
.id_order:hover, .id_order a:hover {
color: blue;
text-decoration: underline;
}
.no_orders {
text-align: center;
}
#sneTab {
margin-top: 20px;
}
#menuTab {
float: left;
padding: 0;
margin: 0;
text-align: left;
background-color: #efefef;
padding: 10px;
border-top: 1px solid gainsboro;
border-left: 1px solid gainsboro;
border-right: 1px solid gainsboro;
}
#menuTab li {
float: left;
text-align: left;
min-width: 150px;
height: 35px;
display: inline;
margin: 3px;
padding: 0 10px 15px 15px;
background: #EFEFEF;
font-weight: bold;
cursor: pointer;
}
#menuTab li span {
position: relative;
top: 10px;
font-weight: bold;
}
#menuTab li.menuTabButton.selected {
border-bottom: 3px solid #6495ED;
padding-bottom: 12px;
}
#menuTab li.menuTabButton:hover {
cursor: pointer;
background: #6495ED;
opacity: 0.7;
}
.clean {
clear: both;
margin: 0;
padding: 0;
height: 0;
}
.cleaner {
clear: both;
margin: 10px 0;
padding: 0;
height: 0;
}
.sne_logo {
margin: 40px 0;
}
.product_list {
background-color: whitesmoke;
}
.product_list > :first-child {
background-color: white;
border-right: 1px solid gainsboro;
}
.product_list > :first-child:hover {
background-color: white;
}
.product_list > :last-child {
background-color: whitesmoke;
}
.product_list > :last-child:hover {
background-color: whitesmoke;
}
.product_list table {
background-color: whitesmoke;
border: none;
}
.product_list table td:nth-child(1) {
width: 50px;
}
.product_list table td:nth-child(2) {
width: 120px;
}
.product_list table td:nth-child(3) {
width: 50%;
}
.product_list table td:nth-child(4) {
width: 50px;
}
.product_list table td:nth-child(5) {
width: 50px;
}
.error_detected {
background-color: lightcoral;
}
.ta img {
cursor: pointer;
}
.product_list table td {
border-bottom: none;
}
.product_list td table tr:nth-child(1) td {
border-bottom: 1px solid gainsboro;
}
.sne_logo > img {
margin-top: -30px;
}
.float-left {
float: left;
}
.float-right {
float: right;
}
.page {
color: black;
margin-right: 5px;
}
.page img {
vertical-align: initial;
cursor: pointer;
}
#listing_orders tbody tr td > img {
height: 32px;
}
#listing_orders tbody tr:nth-child(even) {
background-color: #EFF8DF;
}
#listing_orders tbody tr:nth-child(odd) {
background-color: #DFF2BF;
}
.pageTitle h3 input {
font-size: 18px;
margin-top: 15px;
float: right;
width: 350px;
}
.button_disabled {
opacity: 0.5;
-moz-opacity: 0.5;
-khtml-opacity: 0.5;
filter: alpha(opacity=50);
}
.container {
height: 50px;
border: 1px solid gainsboro;
background-color: #ccc;
margin-bottom: 15px;
background-color: #F8F8F8;
border: 1px solid #CCCCCC;
border-radius: 3px;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
-o-border-radius: 3px;
text-align: center;
}
.container div {
margin-top: 8px;
}
#session_selection select, #session_fusion select {
margin-top: 10px;
height: 30px;
font-size: 16px;
}
#session_selection select {
vertical-align: 2px;
}
#new_sesseion_name {
width: 200px;
height: 30px;
}
.toolbar_btn .separator {
height: 40px;
border-left: 3px solid gray;
width: 3px;
margin-left: 20px;
}
.sne_sep {
width: 1px;
height: 100%;
background-color: gainsboro;
margin: 0 10px;
}

View File

@@ -0,0 +1,177 @@
/**
* NOTICE OF LICENSE
*
* This source file is subject to a commercial license from Common-Services Co., Ltd.
* Use, copy, modification or distribution of this source file without written
* license agreement from the SARL SMC is strictly forbidden.
* In order to obtain a license, please contact us: contact@common-services.com
* ...........................................................................
* INFORMATION SUR LA LICENCE D'UTILISATION
*
* L'utilisation de ce fichier source est soumise a une licence commerciale
* concedee par la societe Common-Services Co., Ltd.
* Toute utilisation, reproduction, modification ou distribution du present
* fichier source sans contrat de licence ecrit de la part de la Common-Services Co. Ltd. est
* expressement interdite.
* Pour obtenir une licence, veuillez contacter Common-Services Co., Ltd. a l'adresse: contact@common-services.com
* ...........................................................................
*
* @package SoNice Retour
* @author Alexandre D.
* @copyright Copyright (c) 2011-2015 Common Services Co Ltd - 90/25 Sukhumvit 81 - 10260 Bangkok - Thailand
* @license Commercial license
* Support by mail : support.sonice@common-services.com
*/
#tab-orders .divider:hover {
background-color: transparent;
border: none;
cursor: default;
}
.bootstrap code {
background-color: transparent;
}
.sne_table_split {
margin: 30px 0 40px;
}
thead tr th img {
vertical-align: baseline;
cursor: pointer;
}
#tab-session .well {
text-align: center;
}
#sne_labels_session tbody input {
border: 1px solid transparent;
background-color: transparent;
box-shadow: none;
width: 95%;
}
#sne_labels_session tbody input:focus {
border: 1px solid green;
background-color: white;
}
#sne_labels_session tbody .weight input:focus, #sne_labels_session tbody .weight_product input:focus {
text-align: left;
}
.float-left {
float: left;
}
.float-right {
float: right;
}
.current_obj {
font-weight: bold;
font-size: 18px;
}
.page input, .page select {
display: inline;
width: 100px;
}
.edit_on {
border: 1px solid green !important;
background-color: white !important;
}
.product_list {
background-color: whitesmoke;
}
.product_list > :first-child {
background-color: white;
border-right: 1px solid gainsboro;
}
.product_list table td:nth-child(1) {
width: 50px;
}
.product_list table td:nth-child(2) {
width: 120px;
}
.product_list table td:nth-child(3) {
width: 50%;
}
.product_list table td:nth-child(4) {
width: 50px;
}
.product_list table td:nth-child(5) {
width: 50px;
}
.ta img {
cursor: pointer;
}
.product_list table td {
border-bottom: none;
}
.product_list td table tr:nth-child(1) td {
border-bottom: 1px solid gainsboro;
}
.sne_douchette {
vertical-align: middle;
margin-right: 5px;
}
.send_package {
text-align: center;
}
.send_exp {
border: 1px solid gray;
padding: 1px;
background-color: #DFF2BF;
cursor: pointer;
}
.send_exp:hover {
background-color: #EFF8DF;
}
.navbar-header a {
cursor: default;
}
.navbar-right li {
border: 1px solid #f8f8f8;
min-width: 50px;
border-width: 1px;
font-size: 11px;
cursor: pointer;
display: block;
float: left;
padding: 3px 5px;
white-space: nowrap;
text-shadow: 0 1px 0 #ffffff;
}
.navbar-right li:hover {
background-color: #fff;
border: 1px inset #ccc;
border-radius: 3px;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
-o-border-radius: 3px;
}
.validated_row {
background-color: #DFF2BF;
}
.validated_row2 {
background-color: #EFF8DF;
}

View File

@@ -0,0 +1,114 @@
/**
* NOTICE OF LICENSE
*
* This source file is subject to a commercial license from Common-Services Co., Ltd.
* Use, copy, modification or distribution of this source file without written
* license agreement from the SARL SMC is strictly forbidden.
* In order to obtain a license, please contact us: contact@common-services.com
* ...........................................................................
* INFORMATION SUR LA LICENCE D'UTILISATION
*
* L'utilisation de ce fichier source est soumise a une licence commerciale
* concedee par la societe Common-Services Co., Ltd.
* Toute utilisation, reproduction, modification ou distribution du present
* fichier source sans contrat de licence ecrit de la part de la Common-Services Co. Ltd. est
* expressement interdite.
* Pour obtenir une licence, veuillez contacter Common-Services Co., Ltd. a l'adresse: contact@common-services.com
* ...........................................................................
*
* @package SoNice Retour
* @author Alexandre D.
* @copyright Copyright (c) 2011-2015 Common Services Co Ltd - 90/25 Sukhumvit 81 - 10260 Bangkok - Thailand
* @license Commercial license
* Support by mail : support.sonice@common-services.com
*/
#container {
width: 1100px;
}
.toolbar-placeholder {
position: relative;
}
.toolbarBox {
background-color: #F8F8F8;
border: 1px solid #CCCCCC;
margin-bottom: 10px;
padding: 5px 0;
border-radius: 3px;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
-o-border-radius: 3px;
position: relative;
}
.toolbarBox ul.cc_button {
float: right;
margin: 0 5px 0 0;
padding: 0;
}
.toolbarBox ul.cc_button li {
color: #666666;
float: left;
height: 48px;
list-style: none outside none;
padding: 1px 1px 3px 4px;
text-align: center;
}
.toolbarBox a.toolbar_btn {
border: 1px solid #f8f8f8;
min-width: 50px;
border-width: 1px;
font-size: 11px;
cursor: pointer;
display: block;
float: left;
padding: 3px 5px;
white-space: nowrap;
text-shadow: 0 1px 0 #ffffff;
}
.toolbarBox a.toolbar_btn:hover {
background-color: #fff;
border: 1px inset #ccc;
border-radius: 3px;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
-o-border-radius: 3px;
}
.toolbarBox .pageTitle {
margin-left: 10px;
line-height: 48px;
}
.toolbarBox .pageTitle h3 {
font-size: 1.6em;
font-weight: normal;
line-height: 52px;
margin: 0;
padding: 0;
text-shadow: 0 1px 0 #fff;
}
.table_grid {
width: 100%;
}
.table td span.color_field {
font-size: 11px;
padding: 2px 5px;
border-radius: 3px;
text-transform: uppercase;
color: #fff;
border-radius: 3px;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
}
.listing_order, #sne_labels_availables tr {
background-color: white;
}

View File

@@ -0,0 +1,11 @@
<?php
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,99 @@
h2 {
font-size: 1.3em;
text-align: start;
}
.label-checkbox {
text-align: left;
float: none;
font-size: 1.2em;
color: navy;
opacity: 0.8;
padding: 5px;
}
#menuTab {
float: left;
margin: 0;
text-align: left;
background-color: #efefef;
padding: 10px;
border-top: 1px solid #CCC;
border-right: 1px solid #CCC;
border-left: 1px solid #CCC;
}
#menuTab li {
text-align: left;
float: left;
min-width: 150px;
height: 35px;
display: inline;
padding: 0 10px 15px 15px;
margin: 5px;
background: #EFEFEF;
font-weight: bold;
cursor: pointer;
}
#menuTab li span {
position: relative;
top: 10px;
font-weight: bold;
letter-spacing: 1px;
color: gray;
}
#menuTab li.menuTabButton.selected {
border-bottom: 3px solid #6495ED;
margin-bottom: 2px;
}
#menuTab li.menuTabButton:hover {
cursor: pointer;
background: #6495ED;
opacity: 0.7;
}
#ps16_tabs_separator {
clear:both;
}
#tabList div:first-child ul {
list-style-type: disc;
margin: 0 0 0 20px;
padding: 1em;
}
#tabList div:first-child hr {
width: 30%;
}
.row {
background: none;
}
div.col-lg-1 {
width: 8.33333%;
float: left;
text-align: center;
}
div.col-lg-11 {
width: 91.66667%;
float: left;
margin-bottom: 15px;
}
.form-group {
margin-bottom: 15px;
}
/* info class for PS 14x */
body:not([style]) .info {
font-weight: 700;
margin: 0 0 10px 0;
line-height: 20px;
}

View File

@@ -0,0 +1,26 @@
#menuTab li {
max-width: 210px;
min-width: 160px;
display: inline-block !important;
border-bottom: 3px solid transparent;
margin-right: 20px;
height: 55px;
}
#menuTab li.menuTabButton.selected {
border-bottom: 3px solid #6495ED;
}
#menuTab li a:focus, #menuTab li a:visited {
background: none;
}
#ps16_tabs_separator {
clear:both;
border-bottom: 4px solid whitesmoke;
margin: 10px 0;
}
div.col-lg-1 {
text-align: center;
}

View File

@@ -0,0 +1,212 @@
/**
* NOTICE OF LICENSE
*
* This source file is subject to a commercial license from Common-Services Co., Ltd.
* Use, copy, modification or distribution of this source file without written
* license agreement from the SARL SMC is strictly forbidden.
* In order to obtain a license, please contact us: contact@common-services.com
* ...........................................................................
* INFORMATION SUR LA LICENCE D'UTILISATION
*
* L'utilisation de ce fichier source est soumise a une licence commerciale
* concedee par la societe Common-Services Co., Ltd.
* Toute utilisation, reproduction, modification ou distribution du present
* fichier source sans contrat de licence ecrit de la part de la Common-Services Co. Ltd. est
* expressement interdite.
* Pour obtenir une licence, veuillez contacter Common-Services Co., Ltd. a l'adresse: contact@common-services.com
* ...........................................................................
*
* @package SoNice Retour
* @author Alexandre D.
* @copyright Copyright (c) 2011-2015 Common Services Co Ltd - 90/25 Sukhumvit 81 - 10260 Bangkok - Thailand
* @license Commercial license
* Support by mail : support.sonice@common-services.com
*/
#sonice_retour_env {
margin-top: 10px;
}
#product_drop {
background-color: white;
}
#actionButton {
display: inline;
text-align: center;
list-style: none;
}
#actionButton li {
/*width: 70px;*/
margin-left: 10px;
float: right;
cursor: pointer;
}
#sonice_retour_return {
margin-bottom: 10px;
}
#sonice_retour_return a {
font-size: 24px;
font-weight: bold;
padding: 10px;
}
#sonice_retour_landing_area tr td {
background-color: white;
border: 1px dashed black;
}
#sonice_retour_landing_area div {
display: table-cell;
vertical-align: middle;
text-align: center;
width: 10000px;
}
#sonice_retour_loader {
text-align: center;
display: none;
border: 1px solid gray;
border-radius: 3px;
background-color: white;
font-size: 12px;
font-weight: normal;
margin: 0 0 10px 0;
line-height: 20px;
padding: 13px 5px 5px 40px;
min-height: 28px;
color: gray;
clear: both;
margin-top: 40px;
}
#sonice_retour_loader img {
width: 35px;
}
.bootstrap .toolbar_btn {
height: 55px;
}
.bootstrap .toolbar_btn:hover {
color: black;
border-color: white;
background-color: white !important;
text-decoration: none;
}
.cen
.float-right {
float: right;
}
.sohint {
min-height: 32px;
background: #BDE5F8 url(../img/icon-info.png) no-repeat 6px 6px;
border: 1px solid #00529B;
padding: 8px 5px 5px 50px;
border-radius: 3px;
color: black;
}
.sonice_retour_unselectedTable {
outline: none;
}
.sonice_retour_unselectedTable tbody tr td {
text-align: center;
}
.sonice_retour_selectedTable {
outline: 2px solid #739334;
}
.sonice_retour_desc {
width: 60%;
display: block;
}
.metadata-command dl dt select {
height: 30px;
}
/*
* Design Action Button
*/
.etg_action_button {
float: right;
/*margin: 0 30px 0 0;*/
padding: 0;
}
.etg_action_button li {
color: #666666;
float: left;
height: 48px;
list-style: none outside none;
padding: 1px 1px 3px 4px;
text-align: center;
}
.etg_action_button a.toolbar_btn {
color: black;
border: 1px solid transparent;
min-width: 60px;
font-size: 11px;
cursor: pointer;
display: block;
float: left;
padding: 3px 5px;
white-space: nowrap;
text-shadow: 0 1px 0 #ffffff;
}
.etg_action_button a.toolbar_btn:hover {
background-color: #fff;
border: 1px inset #ccc;
border-radius: 3px;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
-o-border-radius: 3px;
}
/*
* From PS 1.5
*/
dl {
display: block;
-webkit-margin-before: 1em;
-webkit-margin-after: 1em;
-webkit-margin-start: 0px;
-webkit-margin-end: 0px;
}
.metadata-command {
background-color: transparent;
}
.metadata-command dl {
float: left;
margin-left: 10px;
}
.metadata-command dl dt, .metadata-command dl dd {
color: #585A69;
float: left;
margin: 0;
padding-right: 10px;
}
.metadata-command dl dd {
font-weight: bold;
}
@media (max-width: 860px) {
.sonice_retour_desc {
display: none;
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 570 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 371 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 363 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 877 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 444 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 513 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 321 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Some files were not shown because too many files have changed in this diff Show More