push prod

This commit is contained in:
ToutPratique 2016-06-23 10:23:03 +02:00
parent 1d1a2def5f
commit 731a03a487
112 changed files with 12374 additions and 24 deletions

View File

@ -22,7 +22,7 @@
* @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
*/
*/
require(dirname(__FILE__).'/config/config.inc.php');
Dispatcher::getInstance()->dispatch();

View File

@ -0,0 +1,349 @@
<?php
/*
* 2007-2013 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-2013 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 bool|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')
&& !self::getContext()->cookie->no_mobile;
}
/**
* Get a singleton context.
*
* @return Context
*/
public static function getContext()
{
if (!isset(self::$instance)) {
self::$instance = new self();
}
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 self::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
*/
public function addJS($js_uri)
{
Tools::addJS($js_uri);
}
/**
* @param $css_uri
* @param string $css_media_type
*/
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 bool $with_guest
*
* @return bool 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-2013 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-2013 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 @@
version = 0.4

View File

@ -0,0 +1,56 @@
<?php
/*
* 2007-2013 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-2013 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,20 @@
<?php
/**
* Module Criteo Tag et Flux Web In Color
*
* @author Web In Color - addons@webincolor.fr
* @uses Prestashop modules
* @package criteo
* @copyright Copyright &copy; 2014, Web In Color
* @license http://www.webincolor.fr
*/
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header("Location: ../");
exit;

12
modules/criteo/config.xml Normal file
View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<module>
<name>criteo</name>
<displayName><![CDATA[Criteo]]></displayName>
<version><![CDATA[2.7.7]]></version>
<description><![CDATA[Criteo product export and tag display.]]></description>
<author><![CDATA[Web In Color]]></author>
<tab><![CDATA[advertising_marketing]]></tab>
<is_configurable>1</is_configurable>
<need_instance>0</need_instance>
<limited_countries></limited_countries>
</module>

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<module>
<name>criteo</name>
<displayName><![CDATA[Criteo]]></displayName>
<version><![CDATA[2.7.7]]></version>
<description><![CDATA[Export produits Criteo et affichage des tags Criteo.]]></description>
<author><![CDATA[Web In Color]]></author>
<tab><![CDATA[advertising_marketing]]></tab>
<is_configurable>1</is_configurable>
<need_instance>0</need_instance>
<limited_countries></limited_countries>
</module>

View File

@ -0,0 +1,42 @@
<?php
/**
* Module Criteo Tag et Flux Web In Color.
*
* @author Web In Color - addons@webincolor.fr
*
* @version 2.7.1
*
* @uses Prestashop modules
*
* @since 2.7.1 - 18 nov. 2015
*
* @copyright Copyright &copy; 2014, Web In Color
* @license http://www.webincolor.fr
*/
class CriteoExportModuleFrontController extends ModuleFrontController
{
public function displayAjaxXML()
{
$keys = array('ajax', 'action', 'id_shop');
$query = array();
foreach ($keys as $key) {
$query[$key] = Tools::getValue($key);
}
if (Tools::getValue('token') !== $this->module->getFrontToken($query)) {
die(Tools::displayError('The token is invalid, please check the export url in your module configuration.'));
}
try {
header('Content-Type: text/xml');
ob_start();
ob_end_clean();
$xml = $this->module->buildXML($query['id_shop']);
die($xml);
} catch (Exception $e) {
die(Tools::displayError($e->getMessage()));
}
}
}

View File

@ -0,0 +1,20 @@
<?php
/**
* Module Criteo Tag et Flux Web In Color
*
* @author Web In Color - addons@webincolor.fr
* @uses Prestashop modules
* @package criteo
* @copyright Copyright &copy; 2014, Web In Color
* @license http://www.webincolor.fr
*/
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,20 @@
<?php
/**
* Module Criteo Tag et Flux Web In Color
*
* @author Web In Color - addons@webincolor.fr
* @uses Prestashop modules
* @package criteo
* @copyright Copyright &copy; 2014, Web In Color
* @license http://www.webincolor.fr
*/
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;

628
modules/criteo/criteo.php Normal file
View File

@ -0,0 +1,628 @@
<?php
/**
* Module Criteo Tag et Flux Web In Color.
*
* @author Web In Color - addons@webincolor.fr
*
* @version 2.7.3
*
* @uses Prestashop modules
*
* @since 1.0 - 22 juillet 2013
*
* @copyright Copyright &copy; 2014, Web In Color
* @license http://www.webincolor.fr
*/
if (!defined('_PS_VERSION_')) {
exit;
}
class Criteo extends Module
{
public function __construct()
{
$this->name = 'criteo';
$this->tab = 'advertising_marketing';
$this->version = '2.7.7';
$this->need_instance = 0;
$this->module_key = '231ae9b8e1dd846cbffc2f59c326acef';
$this->author = 'Web In Color';
parent::__construct();
$this->displayName = $this->l('Criteo');
$this->description = $this->l('Criteo product export and tag display.');
/* Backward compatibility */
if (version_compare(_PS_VERSION_, '1.5', '<')) {
require _PS_MODULE_DIR_.$this->name.'/backward_compatibility/backward.php';
}
}
public function install()
{
return parent::install()
&& $this->registerHook('header')
&& $this->registerHook('productfooter')
&& $this->registerHook('home')
&& $this->registerHook('shoppingCartExtra')
&& $this->registerHook('footer')
&& $this->registerHook('orderConfirmation');
}
private function postProcess()
{
if (Tools::isSubmit('submitCriteo')) {
if (!Tools::getValue('id_criteo_account')) {
return $this->displayError($this->l('All fields required'));
}
Configuration::updateValue('WIC_CRITEO_ID_ACCOUNT', pSQL(Tools::getValue('id_criteo_account')));
Configuration::updateValue('WIC_CRITEO_SITE_TYPE', pSQL(Tools::getValue('site_type_criteo')));
$categories = (Tools::getValue('category') ? implode(',', Tools::getValue('category')) : '');
Configuration::updateValue('WIC_CRITEO_CATEGORY', $categories);
Configuration::updateValue('WIC_CRITEO_DISPLAY_CAT', Tools::getValue('display_category_criteo'));
return $this->displayConfirmation($this->l('Settings updated successfully'));
}
return false;
}
public function getContent()
{
if (version_compare(_PS_VERSION_, '1.4', '>=')) {
$this->_html = '<link type="text/css" rel="stylesheet" href="'.$this->_path.'views/css/admin.css" />';
} else {
$this->_html = '<link type="text/css" rel="stylesheet" href="'.$this->_path.'views/css/admin_backward.css" />';
}
$this->_html .= '<div class="toolbar-placeholder"><div class="toolbarBox toolbarHead"><div class="pageTitle"><h3> <span id="current_obj" style="font-weight: normal;"> <span class="breadcrumb item-0 "><img src="'.$this->_path.'views/img/logo_webincolor_L260.png" width="260" height="70"/>'.$this->l('Expertise e-commerce Prestashop').'</span> </span></h3><span class="readme"><img src="'.$this->_path.'views/img/PDF.png" width="32" height="32"/><a href="http://www.webincolor.fr/addons_prestashop/'.$this->l('criteo_en.pdf').'" target="_blank">'.$this->l('Download the documentation').'</a></span></div></div><div class="leadin"></div></div>';
if (version_compare(_PS_VERSION_, '1.5', '<=')) {
$this->_html .= '<script type="text/javascript" src="'.$this->_path.'views/js/toolbar.js"></script>';
}
$this->_html .= $this->postProcess();
$this->_html .= '
<fieldset>
<legend><img src="'.$this->_path.'views/img/logo.gif" alt="" title=""/> '.$this->l('Criteo Export').'</legend>
<form method="post" action="" name="criteoForm" id="criteo-wrapper">
<div class="warn alert alert-warning">
<span style="float:right">
<a id="hideWarn" href=""><img alt="X" src="../img/admin/close.png"></a>
</span>'
.$this->l('URL to communicate to Criteo:').'
<ul style="margin-top: 3px">';
$use_ssl = (bool) Configuration::get('PS_SSL_ENABLED');
$url_query = array(
'ajax' => true,
'action' => 'XML',
);
if (version_compare(_PS_VERSION_, '1.5', '>=')) {
$shops = Shop::getShops();
foreach ($shops as $shop) {
$url_query['id_shop'] = $shop['id_shop'];
$url_query['token'] = $this->getFrontToken($url_query);
$url = $this->context->link->getModuleLink($this->name, 'export', $url_query, $use_ssl);
$this->_html .= '<li><a href="'.$url.'">'.$url.'</a></li>';
}
} else {
$token = sha1(_COOKIE_KEY_.'exportCriteo');
$this->_html .= ' <a href="'.Tools::getProtocol().$_SERVER['HTTP_HOST'].__PS_BASE_URI__.'modules/'.$this->name.'/tools/export_xml.php?token='.$token.'">'.Tools::getProtocol().$_SERVER['HTTP_HOST'].__PS_BASE_URI__.'modules/'.$this->name.'/tools/export_xml.php?token='.$token.'</a></li>';
}
$this->_html .= '</ul>
</div>
<label for="id_normal_criteo">'.$this->l('Criteo ID account').' :</label>
<input type="text" value="'.(Configuration::get('WIC_CRITEO_ID_ACCOUNT') ? Configuration::get('WIC_CRITEO_ID_ACCOUNT') : '').'" name="id_criteo_account" /><br /><br />
<label for="site_type_criteo">'.$this->l('Site type').' :</label>
<select name="site_type_criteo">
<option value="d" '.(Configuration::get('WIC_CRITEO_SITE_TYPE') == 'd' ? 'selected=selected' : '').'>'.$this->l('Classic website').'</option>
<option value="m" '.(Configuration::get('WIC_CRITEO_SITE_TYPE') == 'm' ? 'selected=selected' : '').'>'.$this->l('Mobile website').'</option>
<option value="t" '.(Configuration::get('WIC_CRITEO_SITE_TYPE') == 't' ? 'selected=selected' : '').'>'.$this->l('tablet website').'</option>
</select><br/><br/>
<label for="display_category_criteo">'.$this->l('Display Category produt in XML flow').' :</label>
<input type="radio" value="0" name="display_category_criteo" '.(Configuration::get('WIC_CRITEO_DISPLAY_CAT') ? '' : 'checked=checked').' />&nbsp;&nbsp;No&nbsp;&nbsp;&nbsp;&nbsp;
<input type="radio" value="1" name="display_category_criteo" '.(Configuration::get('WIC_CRITEO_DISPLAY_CAT') ? 'checked=checked' : '').' />&nbsp;&nbsp;Yes
<br/><br/>
<div class="row">
<div class="warn alert alert-warning">
<ul style="margin-top: 3px">
<li>'.$this->l('You can exclude categories, so that the products are not present.').'</li>
<li><strong>'.$this->l('Warning !').'</strong> '.$this->l('Products with the default category is selected below will not be exported.').'</li>
</ul>
</div>
<table style="width: 32em;float:left;"><tr><td>
<h4>'.$this->l('Category filter').'</h4>
<table cellspacing="0" cellpadding="0" class="table" style="width: 29.5em;">
<tr>
<th><input type="checkbox" name="checkme" class="noborder" onclick="checkDelBoxes(this.form, \'category[]\', this.checked)" /></th>
<th>'.$this->l('ID').'</th>
<th>'.$this->l('Name').'</th>
</tr>';
$done = array();
$index = array();
$indexed_categories = explode(',', Configuration::get('WIC_CRITEO_CATEGORY'));
$categories = Category::getCategories((int) $this->context->language->id, false);
foreach ($indexed_categories as $k => $row) {
$index[] = $row;
}
$this->recurseCategoryForInclude($index, $categories, $categories[0][1], 1, null, $done);
$this->_html .= '</table>
<p style="padding:0px; margin:0px 0px 10px 0px; color: #7F7F7F;font-size: 0.85em;"><i>'.$this->l('Mark all checkbox(es) of categories to which the product are not in data XML flow').'<sup> *</sup></i></p>
</td></tr>
</table>
</div>
<br clear="all" />
<div class="row">
<center class="submit"><input type="submit" class="button" name="submitCriteo" value="'.$this->l('Submit').'" class="button" /></center>
</div>
</form>
</fieldset>';
$this->_html .= '<iframe src="http://www.webincolor.fr/addons_prestashop.html" width="670" height="430" border="0"></iframe>';
return $this->_html;
}
/* Build a categories tree
*
* @param array $indexed_categories Array with categories where product is indexed (in order to check checkbox)
* @param array $categories Categories to list
* @param array $current Current category
* @param integer $id_category Current category id
*/
private function recurseCategoryForInclude($indexed_categories, $categories, $current, $id_category = 1, $id_category_default = null, $has_suite = array(), $done = array())
{
static $irow;
if (!isset($done[$current['infos']['id_parent']])) {
$done[$current['infos']['id_parent']] = 0;
}
$done[$current['infos']['id_parent']] += 1;
$todo = count($categories[$current['infos']['id_parent']]);
$done_c = $done[$current['infos']['id_parent']];
$level = $current['infos']['level_depth'] + 1;
$this->_html .= '
<tr class="'.($irow++ % 2 ? 'alt_row' : '').'">
<td>
<input type="checkbox" name="category[]" class="categoryBox'.($id_category_default != null ? ' id_category_default' : '').'" id="category_'.$id_category.'" value="'.$id_category.'"'.(((in_array($id_category, $indexed_categories) || ((int) Tools::getValue('id_category') == $id_category)) || Tools::getIsset('adddiscount')) ? ' checked="checked"' : '').' />
</td>
<td>
'.$id_category.'
</td>
<td>';
if (version_compare(_PS_VERSION_, '1.4', '>=')) {
for ($i = 2; $i < $level; ++$i) {
$this->_html .= '<img src="../img/admin/lvl_'.(isset($has_suite[$i - 2]) ? '' : '1').'.gif" alt="" style="vertical-align:middle!important;" />';
}
$this->_html .= '<img src="../img/admin/'.($level == 1 ? 'lv1.gif' : 'lv2_'.($todo == $done_c ? 'f' : 'b').'.gif').'" alt="" style="vertical-align:middle!important;" /> &nbsp;
<label for="category_'.$id_category.'" class="t">'.$current['infos']['name'].'</label>';
} else {
$img = $level == 1 ? 'lv1.gif' : 'lv'.$level.'_'.($todo == $done_c ? 'f' : 'b').'.gif';
$this->_html .= '<img src="../img/admin/'.$img.'" alt="" style="vertical-align:middle!important;" /> &nbsp;<label for="category_'.$id_category.'" class="t">'.$current['infos']['name'].'</label>';
}
$this->_html .= '</td>
</tr>';
if ($level > 1) {
$has_suite[] = ($todo == $done_c ? 0 : 1);
}
if (isset($categories[$id_category])) {
foreach ($categories[$id_category] as $key => $row) {
if ($key != 'infos') {
$this->recurseCategoryForInclude($indexed_categories, $categories, $categories[$id_category][$key], $key, $has_suite, $done);
}
}
}
}
public function buildXML($id_shop)
{
$cache_key = sprintf('criteo_feed_%d', $id_shop);
$cache = Cache::getInstance();
$legacy_images = defined('PS_LEGACY_IMAGES') && PS_LEGACY_IMAGES;
if ($cache->exists($cache_key)) {
if ($xml = gzdecode($cache->get($cache_key))) {
return $xml;
}
}
$sxe = new SimpleXMLElement('<?xml version="1.0" encoding="UTF-8"?>'."\n".'<products></products>');
/* First line, columns */
$columns = array('id', 'name', 'smallimage', 'bigimage', 'producturl', 'description', 'price', 'retailprice', 'discount', 'recommendable', 'instock');
/* Setting parameters */
$conf = Configuration::getMultiple(array(
'PS_LANG_DEFAULT', ));
/* Searching for products */
$sql = 'SELECT DISTINCT p.`id_product`, i.`id_image`
FROM `'._DB_PREFIX_.'product` p
JOIN `'._DB_PREFIX_.'category_product` cp ON (cp.id_product = p.id_product)
LEFT JOIN `'._DB_PREFIX_.'image` i ON (i.id_product = p.id_product)
WHERE p.`active` = 1 AND i.id_image IS NOT NULL';
if (version_compare(_PS_VERSION_, '1.5', '>=') && $id_shop) {
$sql .= ' AND p.`id_product` IN (SELECT ps.`id_product` FROM `'._DB_PREFIX_.'product_shop` ps WHERE ps.`id_shop` = '.(int) $id_shop.')';
}
if (Configuration::get('WIC_CRITEO_CATEGORY')) {
$array_category = explode(',', Configuration::get('WIC_CRITEO_CATEGORY'));
$array_category = array_map('intval', $array_category);
$sql .= ' AND p.`id_category_default` NOT IN ('.implode(',', $array_category).')';
}
$display_cat = Configuration::get('WIC_CRITEO_DISPLAY_CAT');
$sql .= ' GROUP BY p.id_product';
$result = Db::getInstance()->executeS($sql);
foreach (array_values($result) as $row) {
if (Pack::isPack((int) $row['id_product'])) {
continue;
}
$product = new Product((int) $row['id_product'], true);
if (Validate::isLoadedObject($product)) {
$imageObj = Product::getCover((int) $product->id);
$line = array();
$line[] = (($product->manufacturer_name) ? $product->manufacturer_name.' - ' : '').$product->name[(int) $conf['PS_LANG_DEFAULT']];
$line[] = $this->context->link->getImageLink($product->link_rewrite[(int) $conf['PS_LANG_DEFAULT']], (!$legacy_images ? $imageObj['id_image'] : $product->id.'-'.$imageObj['id_image']), (version_compare(_PS_VERSION_, '1.5', '>=') ? ImageType::getFormatedName('small') : 'small'));
$line[] = $this->context->link->getImageLink($product->link_rewrite[(int) $conf['PS_LANG_DEFAULT']], (!$legacy_images ? $imageObj['id_image'] : $product->id.'-'.$imageObj['id_image']), (version_compare(_PS_VERSION_, '1.5', '>=') ? ImageType::getFormatedName('thickbox') : 'thickbox'));
$line[] = $this->context->link->getProductLink((int) $product->id, $product->link_rewrite[(int) $conf['PS_LANG_DEFAULT']], $product->ean13).'?utm_source=criteo&aff=criteo';
$line[] = str_replace(array("\n", "\r", "\t", '|'), '', strip_tags(html_entity_decode($product->description_short[(int) $conf['PS_LANG_DEFAULT']], ENT_COMPAT, 'UTF-8')));
unset($imageObj);
$price = $product->getPrice(true, (int) Product::getDefaultAttribute($product->id));
if ($product->getPrice(true, (int) Product::getDefaultAttribute((int) $product->id), 6, null, false, false)) {
$val = $product->getPrice(true, (int) Product::getDefaultAttribute((int) $product->id), 6, null, false, false);
} else {
$val = 1;
}
$line[] = number_format($price, 2, '.', '');
$line[] = number_format($product->getPrice(true, (int) Product::getDefaultAttribute((int) $product->id), 6, null, false, false), 2, '.', '');
$line[] = number_format($product->getPrice(true, null, 2, null, true) * 100 / $val, 2, '.', '');
$line[] = '1';
$line[] = $product->quantity > 0 ? '1' : '0';
$cpt_xml = 1;
$product_xml = $sxe->addChild('product');
$product_xml->addAttribute('id', $product->id);
foreach ($line as $column) {
$product_xml->addChild($columns[$cpt_xml], htmlspecialchars($column));
++$cpt_xml;
}
if ($display_cat) {
$categories = Product::getProductCategoriesFull((int) $product->id, $conf['PS_LANG_DEFAULT']);
if ($categories) {
$i = 1;
foreach ($categories as $category) {
$product_xml->addChild('category_'.$i, htmlspecialchars($category['name']));
++$i;
}
}
}
unset($product, $product_xml, $cpt_xml, $i);
}
}
// One day in seconds
$ttl = 86400;
$cache->set($cache_key, gzencode($sxe->asXML()), $ttl);
return $sxe->asXML();
}
public function fetchTemplate($path, $name, $extension = false)
{
return $this->display(__FILE__, $path.$name.'.'.($extension ? $extension : 'tpl'));
}
public function hookShoppingCartExtra($params)
{
if (!Configuration::get('WIC_CRITEO_ID_ACCOUNT') || !Configuration::get('WIC_CRITEO_SITE_TYPE')) {
return false;
}
$product_list = array();
foreach ($params['products'] as $product) {
$product_obj = new Product((int) $product['id_product']);
$price = $product_obj->getPrice(true, ($product['id_product_attribute'] ? $product['id_product_attribute'] : (int) Product::getDefaultAttribute($product_obj->id)), 2);
$product_list[] = array(
'id' => (int) $product['id_product'],
'price' => (float) $price,
'quantity' => (int) $product['quantity'],
);
unset($product_obj);
}
if ($this->context->customer->id) {
$customer = new Customer($this->context->customer->id);
if (Validate::isLoadedObject($customer)) {
$email = $customer->email;
} else {
$email = '';
}
} else {
$email = '';
}
$this->context->smarty->assign(array(
'wic_criteo_account' => Configuration::get('WIC_CRITEO_ID_ACCOUNT'),
'wic_criteo_site_type' => Configuration::get('WIC_CRITEO_SITE_TYPE'),
'wic_product_list' => $product_list,
'wic_action' => 'shoppingCart',
'id_customer' => $this->context->customer->id,
'customer_email' => ($email) ? md5($email) : '',
'currency' => $this->context->currency->iso_code,
));
return $this->fetchTemplate('/views/templates/hooks/', 'criteo');
}
public function hookOrderConfirmation($params)
{
if (!Configuration::get('WIC_CRITEO_ID_ACCOUNT') || !Configuration::get('WIC_CRITEO_SITE_TYPE')) {
return false;
}
$cart = new Cart((int) $params['objOrder']->id_cart);
// Use refresh option to avoid differences with shopping cart tag.
$products = $cart->getProducts(true);
$product_list = array();
foreach ($products as $product) {
$product_obj = new Product((int) $product['id_product']);
$price = $product_obj->getPrice(true, ($product['id_product_attribute'] ? $product['id_product_attribute'] : (int) Product::getDefaultAttribute($product_obj->id)), 2);
$product_list[] = array(
'id' => (int) $product['id_product'],
'price' => (float) $price,
'quantity' => (int) $product['quantity'],
);
unset($product_obj);
}
$customer = new Customer($this->context->customer->id);
$new = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue('
SELECT COUNT(`id_order`) FROM `'._DB_PREFIX_.'orders` o
WHERE o.valid = 1 AND o.`id_customer` = '.(int) $customer->id);
$this->context->smarty->assign(array(
'wic_criteo_account' => Configuration::get('WIC_CRITEO_ID_ACCOUNT'),
'wic_criteo_site_type' => Configuration::get('WIC_CRITEO_SITE_TYPE'),
'wic_product_list' => $product_list,
'wic_action' => 'orderConfirmation',
'wic_id_order' => (int) $params['objOrder']->id,
'id_customer' => $this->context->customer->id,
'old_customer' => (($new > 1) ? '1' : '0'),
'customer_email' => ($customer->email) ? md5($customer->email) : '',
'currency' => $this->context->currency->iso_code,
));
return $this->fetchTemplate('/views/templates/hooks/', 'criteo');
}
public function hookHeader($params)
{
if (!Configuration::get('WIC_CRITEO_ID_ACCOUNT') || !Configuration::get('WIC_CRITEO_SITE_TYPE')) {
return false;
}
return '<script type="text/javascript" src="//static.criteo.com/js/ld/ld.js" async="true"></script>';
}
public function hookHome($params)
{
if (!Configuration::get('WIC_CRITEO_ID_ACCOUNT') || !Configuration::get('WIC_CRITEO_SITE_TYPE')) {
return false;
}
if ($this->context->customer->id) {
$customer = new Customer($this->context->customer->id);
if (Validate::isLoadedObject($customer)) {
$email = $customer->email;
} else {
$email = '';
}
} else {
$email = '';
}
$this->context->smarty->assign(array(
'wic_criteo_account' => Configuration::get('WIC_CRITEO_ID_ACCOUNT'),
'wic_criteo_site_type' => Configuration::get('WIC_CRITEO_SITE_TYPE'),
'wic_action' => 'home',
'id_customer' => $this->context->customer->id,
'customer_email' => ($email) ? md5($email) : '',
));
return $this->fetchTemplate('/views/templates/hooks/', 'criteo');
}
public function hookFooter($params)
{
if (!Configuration::get('WIC_CRITEO_ID_ACCOUNT') || !Configuration::get('WIC_CRITEO_SITE_TYPE')) {
return false;
}
$step = Tools::getValue('step', 0);
if (Context::getContext()->controller->php_self == 'order' && $step == 0) {
$cart = Context::getContext()->cart;
$products = $cart->getProducts();
$product_list = array();
foreach ($products as $product) {
$product_obj = new Product((int) $product['id_product']);
$price = $product_obj->getPrice(true, ($product['id_product_attribute'] ? $product['id_product_attribute'] : (int) Product::getDefaultAttribute($product_obj->id)), 2);
$product_list[] = array(
'id' => (int) $product['id_product'],
'price' => (float) $price,
'quantity' => (int) $product['quantity'],
);
unset($product_obj);
}
if ($this->context->customer->id) {
$customer = new Customer($this->context->customer->id);
if (Validate::isLoadedObject($customer)) {
$email = $customer->email;
} else {
$email = '';
}
} else {
$email = '';
}
$this->context->smarty->assign(array(
'wic_criteo_account' => Configuration::get('WIC_CRITEO_ID_ACCOUNT'),
'wic_criteo_site_type' => Configuration::get('WIC_CRITEO_SITE_TYPE'),
'wic_product_list' => $product_list,
'wic_action' => 'shoppingCart',
'id_customer' => $this->context->customer->id,
'customer_email' => ($email) ? md5($email) : '',
'currency' => $this->context->currency->iso_code,
));
return $this->fetchTemplate('/views/templates/hooks/', 'criteo');
} elseif (Context::getContext()->controller->php_self == 'product') {
if ($this->context->customer->id) {
$customer = new Customer($this->context->customer->id);
if (Validate::isLoadedObject($customer)) {
$email = $customer->email;
} else {
$email = '';
}
} else {
$email = '';
}
$this->context->smarty->assign(array(
'wic_criteo_account' => Configuration::get('WIC_CRITEO_ID_ACCOUNT'),
'wic_criteo_site_type' => Configuration::get('WIC_CRITEO_SITE_TYPE'),
'wic_product_id' => Tools::getValue('id_product'),
'wic_action' => 'productFooter',
'id_customer' => $this->context->customer->id,
'customer_email' => ($email) ? md5($email) : '',
));
return $this->fetchTemplate('/views/templates/hooks/', 'criteo');
} elseif (Context::getContext()->controller->php_self == 'index') {
if ($this->context->customer->id) {
$customer = new Customer($this->context->customer->id);
if (Validate::isLoadedObject($customer)) {
$email = $customer->email;
} else {
$email = '';
}
} else {
$email = '';
}
$this->context->smarty->assign(array(
'wic_criteo_account' => Configuration::get('WIC_CRITEO_ID_ACCOUNT'),
'wic_criteo_site_type' => Configuration::get('WIC_CRITEO_SITE_TYPE'),
'wic_action' => 'home',
'id_customer' => $this->context->customer->id,
'customer_email' => ($email) ? md5($email) : '',
));
return $this->fetchTemplate('/views/templates/hooks/', 'criteo');
} elseif (Tools::getValue('id_category')) {
$products = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('
SELECT cp.`id_product`
FROM `'._DB_PREFIX_.'product` p
LEFT JOIN `'._DB_PREFIX_.'category_product` cp ON p.`id_product` = cp.`id_product`
WHERE cp.`id_category` = '.(int) Tools::getValue('id_category').' AND p.`active` = 1 ORDER BY cp.`position` LIMIT 3');
if ($this->context->customer->id) {
$customer = new Customer($this->context->customer->id);
if (Validate::isLoadedObject($customer)) {
$email = $customer->email;
} else {
$email = '';
}
} else {
$email = '';
}
$this->context->smarty->assign(array(
'wic_criteo_account' => Configuration::get('WIC_CRITEO_ID_ACCOUNT'),
'wic_criteo_site_type' => Configuration::get('WIC_CRITEO_SITE_TYPE'),
'wic_action' => 'productList',
'id_customer' => $this->context->customer->id,
'customer_email' => ($email) ? md5($email) : '',
));
if (isset($products)) {
$products_data = array();
foreach ($products as $product) {
$products_data[] = (int) $product['id_product'];
}
$this->context->smarty->assign(array('products_data' => implode(',', $products_data)));
}
return $this->fetchTemplate('/views/templates/hooks/', 'criteo');
} elseif (Tools::getValue('search_query')) {
if ($this->context->customer->id) {
$customer = new Customer($this->context->customer->id);
if (Validate::isLoadedObject($customer)) {
$email = $customer->email;
} else {
$email = '';
}
} else {
$email = '';
}
$this->context->smarty->assign(array(
'wic_criteo_account' => Configuration::get('WIC_CRITEO_ID_ACCOUNT'),
'wic_criteo_site_type' => Configuration::get('WIC_CRITEO_SITE_TYPE'),
'wic_action' => 'search',
'id_customer' => $this->context->customer->id,
'customer_email' => ($email) ? md5($email) : '',
'searchQuery' => Tools::getValue('search_query'),
));
return $this->fetchTemplate('/views/templates/hooks/', 'criteo');
} else {
return false;
}
}
public function getFrontToken($query)
{
if (!empty($query['token'])) {
unset($query['token']);
}
ksort($query);
$query_string = http_build_query($query);
return Tools::encrypt($query_string);
}
}

19
modules/criteo/es.php Normal file
View File

@ -0,0 +1,19 @@
<?php
global $_MODULE;
$_MODULE = array();
$_MODULE['<{criteo}prestashop>criteo_0c90fc1c188056486dbb210f25023b8a'] = 'Criteo';
$_MODULE['<{criteo}prestashop>criteo_dfa5d522cd54e1ef0f94ec2ed4a61419'] = 'Etiquetas de integración Criteo catálogo de exportación ';
$_MODULE['<{criteo}prestashop>criteo_af5314ecb1403feaf3ab13ed3512469a'] = 'Todos los campos son obligatorios ';
$_MODULE['<{criteo}prestashop>criteo_462390017ab0938911d2d4e964c0cab7'] = 'Los datos hicieron que nuestro éxito ';
$_MODULE['<{criteo}prestashop>criteo_ba0f1c34f839f38d571c357a57cd7b09'] = 'La experiencia Prestashop e-commerce ';
$_MODULE['<{criteo}prestashop>criteo_7f180095f2e237f88930494bb955597b'] = 'criteo_en.pdf';
$_MODULE['<{criteo}prestashop>criteo_78913420d3ede25b0463d047daa5913d'] = 'Descargar la documentación';
$_MODULE['<{criteo}prestashop>criteo_2667504f82250eacbd377f121b5c57e0'] = 'Exportación Criteo ';
$_MODULE['<{criteo}prestashop>criteo_c452f9f8ae244baf28588108f83e0a8a'] = 'URL para comunicar a Criteo';
$_MODULE['<{criteo}prestashop>criteo_e812c9ec2c4d99227d353cbf1778d2c3'] = 'Id Criteo ';
$_MODULE['<{criteo}prestashop>criteo_0b8ae75ff4e6c5dc59aeb17990365d9a'] = 'Tipo de sitio';
$_MODULE['<{criteo}prestashop>criteo_369e99ab0d524e8467b14339a8838997'] = 'sitio clásico';
$_MODULE['<{criteo}prestashop>criteo_3e9f2053778a2917c16cb9226d4b273b'] = 'sitio móvil ';
$_MODULE['<{criteo}prestashop>criteo_23ae197f6047b151c71172732ee59581'] = 'tableta del sitio';
$_MODULE['<{criteo}prestashop>criteo_a4d3b161ce1309df1c4e25df28694b7b'] = 'Guardar';

43
modules/criteo/fr.php Normal file
View File

@ -0,0 +1,43 @@
<?php
global $_MODULE;
$_MODULE = array();
$_MODULE['<{wic_pushproductcms}prestashop>ajax_b718adec73e04ce3ec720dd11a06a308'] = 'ID';
$_MODULE['<{wic_pushproductcms}prestashop>ajax_49ee3087348e8d44e1feda1917443987'] = 'Nom';
$_MODULE['<{wic_pushproductcms}prestashop>ajax_8ae5811be1a55b9b8447ad2dbdadbf6e'] = 'Photo';
$_MODULE['<{wic_pushproductcms}prestashop>ajax_c0bd7654d5b278e65f21cf4e9153fdb4'] = 'Fabricant';
$_MODULE['<{wic_pushproductcms}prestashop>ajax_ad0d28cdd9113d3ce911bc064b137cde'] = 'Prix de base';
$_MODULE['<{wic_pushproductcms}prestashop>ajax_bbdb13db09a6e1ad1e651c04aaad29f0'] = 'Réduction';
$_MODULE['<{wic_pushproductcms}prestashop>ajax_ed26f5ba7a0f0f6ca8b16c3886eb68ad'] = 'Prix final';
$_MODULE['<{wic_pushproductcms}prestashop>ajax_394f44818f990662a566f59f2e04696d'] = 'Aucun produit';
$_MODULE['<{wic_pushproductcms}prestashop>wic_pushproductcms_1c3ba2cb127b3b46749535111dcaa7e9'] = 'Mise en avant produit sur les pages CMS';
$_MODULE['<{wic_pushproductcms}prestashop>wic_pushproductcms_5061150ab358732446bd181523063e44'] = 'Afficher les produits que vous souhaitez mettre en avant dans les pages CMS !';
$_MODULE['<{wic_pushproductcms}prestashop>wic_pushproductcms_d6f47e627cb8b9186caa435aba1c32ae'] = 'Etes-vous sûr de vouloir supprimer ce module ?';
$_MODULE['<{wic_pushproductcms}prestashop>wic_pushproductcms_f4d1ea475eaa85102e2b4e6d95da84bd'] = 'Confirmation';
$_MODULE['<{wic_pushproductcms}prestashop>wic_pushproductcms_c888438d14855d7d96a2724ee9c306bd'] = 'Données mises à jour';
$_MODULE['<{wic_pushproductcms}prestashop>wic_pushproductcms_ba0f1c34f839f38d571c357a57cd7b09'] = 'Expertise e-commerce';
$_MODULE['<{wic_pushproductcms}prestashop>wic_pushproductcms_78d5b5d346779d083f096a51fca65275'] = 'Besoin d\'aide ? Vous avez un besoin spécifique ?';
$_MODULE['<{wic_pushproductcms}prestashop>wic_pushproductcms_56d22c91f2838214164c233e7d4659a3'] = 'Contacter notre support technique';
$_MODULE['<{wic_pushproductcms}prestashop>wic_pushproductcms_654a5a8f6e0cf0260e03ad9b88cc8d46'] = 'par email : addons@webincolor.fr';
$_MODULE['<{wic_pushproductcms}prestashop>wic_pushproductcms_d09eb2b6f2843c31e21e63122a32a3f7'] = 'par téléphone : +33.184171540';
$_MODULE['<{wic_pushproductcms}prestashop>wic_pushproductcms_dd2c5e78ef701b983a340ad37ce4bd2d'] = 'pushproductcms_fr.pdf';
$_MODULE['<{wic_pushproductcms}prestashop>wic_pushproductcms_78913420d3ede25b0463d047daa5913d'] = 'Télécharger la documentation';
$_MODULE['<{wic_pushproductcms}prestashop>wic_pushproductcms_14384a82ee6fe4e5a5a0624878b8fa5d'] = 'Liste des pages CMS étant associées à des produits';
$_MODULE['<{wic_pushproductcms}prestashop>wic_pushproductcms_b718adec73e04ce3ec720dd11a06a308'] = 'ID';
$_MODULE['<{wic_pushproductcms}prestashop>wic_pushproductcms_99fb48ddce014d8ad24810eeb3bfde68'] = 'Titre de la page CMS';
$_MODULE['<{wic_pushproductcms}prestashop>wic_pushproductcms_e170446e4fa634b695db462b9099e4eb'] = 'Nombre de produits associés à la page';
$_MODULE['<{wic_pushproductcms}prestashop>wic_pushproductcms_004bf6c9a40003140292e97330236c53'] = 'Action';
$_MODULE['<{wic_pushproductcms}prestashop>wic_pushproductcms_2ebd2f437e74b649679883c569299d29'] = 'Voir la liste des produits';
$_MODULE['<{wic_pushproductcms}prestashop>wic_pushproductcms_7f090bbab1cc7f9c08bf4e54d932d3c0'] = 'Modifier';
$_MODULE['<{wic_pushproductcms}prestashop>wic_pushproductcms_f2a6c498fb90ee345d997f888fce3b18'] = 'Supprimer';
$_MODULE['<{wic_pushproductcms}prestashop>wic_pushproductcms_bf32849685365981724051bab1128fe1'] = 'Etes-vous sûr de vouloir supprimer cette association ?';
$_MODULE['<{wic_pushproductcms}prestashop>configure_f4f70727dc34561dfde1a3c529b6205c'] = 'Paramétrage';
$_MODULE['<{wic_pushproductcms}prestashop>configure_7f0a9369ba66b91f342d5a2db90547c3'] = 'Sélectionner une page CMS';
$_MODULE['<{wic_pushproductcms}prestashop>configure_9fc0899b66e9e848d074a352bc10314f'] = 'Sélectionner vos produits par catégorie';
$_MODULE['<{wic_pushproductcms}prestashop>configure_af1b98adf7f686b84cd0b443e022b7a0'] = 'Catégories';
$_MODULE['<{wic_pushproductcms}prestashop>configure_b718adec73e04ce3ec720dd11a06a308'] = 'ID';
$_MODULE['<{wic_pushproductcms}prestashop>configure_49ee3087348e8d44e1feda1917443987'] = 'Nom';
$_MODULE['<{wic_pushproductcms}prestashop>configure_068f80c7519d0528fb08e82137a72131'] = 'Produits';
$_MODULE['<{wic_pushproductcms}prestashop>configure_2818e3cbb132afacf9f7a0856b1c6690'] = 'Merci de sélectionner une catégorie';
$_MODULE['<{wic_pushproductcms}prestashop>configure_ad3d06d03d94223fa652babc913de686'] = 'Valider';
$_MODULE['<{wic_pushproductcms}prestashop>default_70d4a329d37dc2df41466a420e983966'] = 'A voir !';

20
modules/criteo/index.php Normal file
View File

@ -0,0 +1,20 @@
<?php
/**
* Module Criteo Tag et Flux Web In Color
*
* @author Web In Color - addons@webincolor.fr
* @uses Prestashop modules
* @package criteo
* @copyright Copyright &copy; 2014, Web In Color
* @license http://www.webincolor.fr
*/
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;

BIN
modules/criteo/logo.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 259 B

BIN
modules/criteo/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

View File

@ -0,0 +1,34 @@
[08-Jan-2014 16:13:00 Europe/Moscow] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20100525/suhosin.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20100525/suhosin.so: cannot open shared object file: No such file or directory in Unknown on line 0
[08-Jan-2014 13:13:00 Europe/Paris] PHP Fatal error: Call to a member function getProductLink() on a non-object in /home/chloedes/public_html/modules/criteo/criteo.php on line 175
[08-Jan-2014 20:32:10 Europe/Moscow] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20100525/suhosin.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20100525/suhosin.so: cannot open shared object file: No such file or directory in Unknown on line 0
[08-Jan-2014 17:32:10 Europe/Paris] PHP Fatal error: Call to a member function getProductLink() on a non-object in /home/chloedes/public_html/modules/criteo/criteo.php on line 175
[08-Jan-2014 20:35:11 Europe/Moscow] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20100525/suhosin.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20100525/suhosin.so: cannot open shared object file: No such file or directory in Unknown on line 0
[08-Jan-2014 17:35:22 Europe/Paris] PHP Warning: Division by zero in /home/chloedes/public_html/modules/criteo/criteo.php on line 184
[08-Jan-2014 17:35:22 Europe/Paris] PHP Warning: Division by zero in /home/chloedes/public_html/modules/criteo/criteo.php on line 239
[08-Jan-2014 17:35:22 Europe/Paris] PHP Warning: Division by zero in /home/chloedes/public_html/modules/criteo/criteo.php on line 239
[08-Jan-2014 17:35:22 Europe/Paris] PHP Warning: Division by zero in /home/chloedes/public_html/modules/criteo/criteo.php on line 239
[08-Jan-2014 17:35:22 Europe/Paris] PHP Warning: Division by zero in /home/chloedes/public_html/modules/criteo/criteo.php on line 239
[08-Jan-2014 20:37:17 Europe/Moscow] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20100525/suhosin.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20100525/suhosin.so: cannot open shared object file: No such file or directory in Unknown on line 0
[08-Jan-2014 17:37:18 Europe/Paris] PHP Parse error: syntax error, unexpected ':' in /home/chloedes/public_html/modules/criteo/criteo.php on line 239
[08-Jan-2014 20:37:20 Europe/Moscow] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20100525/suhosin.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20100525/suhosin.so: cannot open shared object file: No such file or directory in Unknown on line 0
[08-Jan-2014 17:37:21 Europe/Paris] PHP Parse error: syntax error, unexpected ':' in /home/chloedes/public_html/modules/criteo/criteo.php on line 239
[08-Jan-2014 20:37:56 Europe/Moscow] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20100525/suhosin.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20100525/suhosin.so: cannot open shared object file: No such file or directory in Unknown on line 0
[08-Jan-2014 17:37:56 Europe/Paris] PHP Parse error: syntax error, unexpected ':' in /home/chloedes/public_html/modules/criteo/criteo.php on line 239
[08-Jan-2014 20:38:34 Europe/Moscow] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20100525/suhosin.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20100525/suhosin.so: cannot open shared object file: No such file or directory in Unknown on line 0
[08-Jan-2014 17:38:34 Europe/Paris] PHP Parse error: syntax error, unexpected ':' in /home/chloedes/public_html/modules/criteo/criteo.php on line 239
[08-Jan-2014 20:38:37 Europe/Moscow] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20100525/suhosin.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20100525/suhosin.so: cannot open shared object file: No such file or directory in Unknown on line 0
[08-Jan-2014 17:38:37 Europe/Paris] PHP Parse error: syntax error, unexpected ':' in /home/chloedes/public_html/modules/criteo/criteo.php on line 239
[08-Jan-2014 20:39:29 Europe/Moscow] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20100525/suhosin.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20100525/suhosin.so: cannot open shared object file: No such file or directory in Unknown on line 0
[08-Jan-2014 17:39:30 Europe/Paris] PHP Parse error: syntax error, unexpected '$val' (T_VARIABLE) in /home/chloedes/public_html/modules/criteo/criteo.php on line 237
[08-Jan-2014 20:40:01 Europe/Moscow] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20100525/suhosin.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20100525/suhosin.so: cannot open shared object file: No such file or directory in Unknown on line 0
[08-Jan-2014 17:40:02 Europe/Paris] PHP Parse error: syntax error, unexpected '$val' (T_VARIABLE) in /home/chloedes/public_html/modules/criteo/criteo.php on line 237
[08-Jan-2014 20:41:02 Europe/Moscow] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20100525/suhosin.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20100525/suhosin.so: cannot open shared object file: No such file or directory in Unknown on line 0
[08-Jan-2014 17:41:03 Europe/Paris] PHP Parse error: syntax error, unexpected ';' in /home/chloedes/public_html/modules/criteo/criteo.php on line 238
[08-Jan-2014 20:41:27 Europe/Moscow] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20100525/suhosin.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20100525/suhosin.so: cannot open shared object file: No such file or directory in Unknown on line 0
[08-Jan-2014 17:41:27 Europe/Paris] PHP Parse error: syntax error, unexpected ',' in /home/chloedes/public_html/modules/criteo/criteo.php on line 243
[08-Jan-2014 20:43:48 Europe/Moscow] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20100525/suhosin.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20100525/suhosin.so: cannot open shared object file: No such file or directory in Unknown on line 0
[08-Jan-2014 17:44:11 Europe/Paris] PHP Warning: Division by zero in /home/chloedes/public_html/modules/criteo/criteo.php on line 184
[08-Jan-2014 20:45:36 Europe/Moscow] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20100525/suhosin.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20100525/suhosin.so: cannot open shared object file: No such file or directory in Unknown on line 0
[08-Jan-2014 21:26:55 Europe/Moscow] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20100525/suhosin.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20100525/suhosin.so: cannot open shared object file: No such file or directory in Unknown on line 0
[08-Jan-2014 23:49:19 Europe/Moscow] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20100525/suhosin.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20100525/suhosin.so: cannot open shared object file: No such file or directory in Unknown on line 0
[09-Jan-2014 12:58:26 Europe/Moscow] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20100525/suhosin.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20100525/suhosin.so: cannot open shared object file: No such file or directory in Unknown on line 0

View File

@ -0,0 +1,22 @@
<?php
/**
* Module Criteo Tag et Flux Web In Color.
*
* @author Web In Color - addons@webincolor.fr
*
* @uses Prestashop modules
*
* @copyright Copyright &copy; 2014, Web In Color
* @license http://www.webincolor.fr
*/
include_once dirname(__FILE__).'/../../../config/config.inc.php';
include_once dirname(__FILE__).'/../../../init.php';
include_once dirname(__FILE__).'/../criteo.php';
$criteo = new Criteo();
if (Tools::getValue('token') != sha1(_COOKIE_KEY_.'exportCriteo')) {
die(Tools::displayError('The token is invalid, please check the export url in your module configuration.'));
}
$criteo->buildCSV(Tools::getValue('id_shop'));

View File

@ -0,0 +1,23 @@
<?php
/**
* Module Criteo Tag et Flux Web In Color.
*
* @author Web In Color - addons@webincolor.fr
*
* @uses Prestashop modules
*
* @copyright Copyright &copy; 2014, Web In Color
* @license http://www.webincolor.fr
*/
include_once dirname(__FILE__).'/../../../config/config.inc.php';
include_once dirname(__FILE__).'/../../../init.php';
include_once dirname(__FILE__).'/../criteo.php';
$criteo = new Criteo();
if (Tools::getValue('token') != sha1(_COOKIE_KEY_.'exportCriteo')) {
die(Tools::displayError('The token is invalid, please check the export url in your module configuration.'));
}
$xml = $criteo->buildXML(Tools::getValue('id_shop'));
die($xml);

View File

@ -0,0 +1,20 @@
<?php
/**
* Module Criteo Tag et Flux Web In Color
*
* @author Web In Color - addons@webincolor.fr
* @uses Prestashop modules
* @package criteo
* @copyright Copyright &copy; 2014, Web In Color
* @license http://www.webincolor.fr
*/
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,19 @@
<?php
global $_MODULE;
$_MODULE = array();
$_MODULE['<{criteo}prestashop>criteo_0c90fc1c188056486dbb210f25023b8a'] = 'Criteo';
$_MODULE['<{criteo}prestashop>criteo_dfa5d522cd54e1ef0f94ec2ed4a61419'] = 'Etiquetas de integración Criteo catálogo de exportación ';
$_MODULE['<{criteo}prestashop>criteo_af5314ecb1403feaf3ab13ed3512469a'] = 'Todos los campos son obligatorios ';
$_MODULE['<{criteo}prestashop>criteo_462390017ab0938911d2d4e964c0cab7'] = 'Los datos hicieron que nuestro éxito ';
$_MODULE['<{criteo}prestashop>criteo_ba0f1c34f839f38d571c357a57cd7b09'] = 'La experiencia Prestashop e-commerce ';
$_MODULE['<{criteo}prestashop>criteo_7f180095f2e237f88930494bb955597b'] = 'criteo_en.pdf';
$_MODULE['<{criteo}prestashop>criteo_78913420d3ede25b0463d047daa5913d'] = 'Descargar la documentación';
$_MODULE['<{criteo}prestashop>criteo_2667504f82250eacbd377f121b5c57e0'] = 'Exportación Criteo ';
$_MODULE['<{criteo}prestashop>criteo_c452f9f8ae244baf28588108f83e0a8a'] = 'URL para comunicar a Criteo';
$_MODULE['<{criteo}prestashop>criteo_e812c9ec2c4d99227d353cbf1778d2c3'] = 'Id Criteo ';
$_MODULE['<{criteo}prestashop>criteo_0b8ae75ff4e6c5dc59aeb17990365d9a'] = 'Tipo de sitio';
$_MODULE['<{criteo}prestashop>criteo_369e99ab0d524e8467b14339a8838997'] = 'sitio clásico';
$_MODULE['<{criteo}prestashop>criteo_3e9f2053778a2917c16cb9226d4b273b'] = 'sitio móvil ';
$_MODULE['<{criteo}prestashop>criteo_23ae197f6047b151c71172732ee59581'] = 'tableta del sitio';
$_MODULE['<{criteo}prestashop>criteo_a4d3b161ce1309df1c4e25df28694b7b'] = 'Guardar';

View File

@ -0,0 +1,27 @@
<?php
global $_MODULE;
$_MODULE = array();
$_MODULE['<{criteo}prestashop>criteo_0c90fc1c188056486dbb210f25023b8a'] = 'Criteo';
$_MODULE['<{criteo}prestashop>criteo_dfa5d522cd54e1ef0f94ec2ed4a61419'] = 'Export produits Criteo et affichage des tags Criteo.';
$_MODULE['<{criteo}prestashop>criteo_af5314ecb1403feaf3ab13ed3512469a'] = 'Tous les champs sont obligatoires.';
$_MODULE['<{criteo}prestashop>criteo_462390017ab0938911d2d4e964c0cab7'] = 'Configuration sauvegardée';
$_MODULE['<{criteo}prestashop>criteo_ba0f1c34f839f38d571c357a57cd7b09'] = 'L\'expertise e-commerce Prestashop';
$_MODULE['<{criteo}prestashop>criteo_7f180095f2e237f88930494bb955597b'] = 'criteo_fr.pdf';
$_MODULE['<{criteo}prestashop>criteo_78913420d3ede25b0463d047daa5913d'] = 'Télécharger la documentation';
$_MODULE['<{criteo}prestashop>criteo_2667504f82250eacbd377f121b5c57e0'] = 'Export Criteo';
$_MODULE['<{criteo}prestashop>criteo_c452f9f8ae244baf28588108f83e0a8a'] = 'URL à communiquer à Criteo';
$_MODULE['<{criteo}prestashop>criteo_e812c9ec2c4d99227d353cbf1778d2c3'] = 'Identifiant Criteo';
$_MODULE['<{criteo}prestashop>criteo_0b8ae75ff4e6c5dc59aeb17990365d9a'] = 'Type de site';
$_MODULE['<{criteo}prestashop>criteo_369e99ab0d524e8467b14339a8838997'] = 'Site classique';
$_MODULE['<{criteo}prestashop>criteo_3e9f2053778a2917c16cb9226d4b273b'] = 'Site mobile';
$_MODULE['<{criteo}prestashop>criteo_23ae197f6047b151c71172732ee59581'] = 'Site tablette';
$_MODULE['<{criteo}prestashop>criteo_c8aa75a4327f59f70829e3cabfb5c3b1'] = 'Afficher les catégories dans le flux XML';
$_MODULE['<{criteo}prestashop>criteo_9b5539c34ec19fa77e2b13a7116fc53d'] = 'Vous pouvez exclure des catégories, les produits appartenant à ces catégories ne seront pas présents dans e flux XML';
$_MODULE['<{criteo}prestashop>criteo_6080d9c0474bc71acd3f254be9cae0f5'] = 'Attention ! ';
$_MODULE['<{criteo}prestashop>criteo_dee58b862c8be7ccd68cc3eae7996725'] = 'Les produits dont la catégorie par défaut est sélectionnée ne seront pas exportés.';
$_MODULE['<{criteo}prestashop>criteo_65c32e72fe2972bbeb1c91f26b874504'] = 'Filtre catégories';
$_MODULE['<{criteo}prestashop>criteo_b718adec73e04ce3ec720dd11a06a308'] = 'ID';
$_MODULE['<{criteo}prestashop>criteo_49ee3087348e8d44e1feda1917443987'] = 'Nom';
$_MODULE['<{criteo}prestashop>criteo_b4fc530e0696622a1d1d3480a4af59b4'] = 'Cocher les cases des catégories pour lesquelles vous ne souhaitez pas que les produits soient présents dans le flux XML.';
$_MODULE['<{criteo}prestashop>criteo_a4d3b161ce1309df1c4e25df28694b7b'] = 'Sauvegarder';

View File

@ -0,0 +1,20 @@
<?php
/**
* Module Criteo Tag et Flux Web In Color
*
* @author Web In Color - addons@webincolor.fr
* @uses Prestashop modules
* @package criteo
* @copyright Copyright &copy; 2014, Web In Color
* @license http://www.webincolor.fr
*/
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header("Location: ../");
exit;

View File

@ -0,0 +1,87 @@
.readme {
float: right;
margin-right: 20px;
margin-top: -60px;
}
.readme a {color:#ce1919;}
.readme a:hover {text-decoration:underline;}
.technical_support{line-height: 15px;display: inline-block;margin-left: 15px;}
.technical_support i{color:#96c11f;}
.technical_support a{color:#1073ba;}
#criteo-wrapper center.submit {
background: none repeat scroll 0 0 #DFDFDF;
border: 5px solid #EFEFEF;
padding: 10px;
}
div#content.nobootstrap .toolbar-placeholder {
background-color: #F8F8F8;
border: 1px solid #CCCCCC;
margin-bottom: 10px;
padding: 10px 0;
border-radius: 3px;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
position:relative;
}
div#content.nobootstrap .toolbar-placeholder .pageTitle h3 {
font-size: 2em;
line-height: 48px;
text-shadow: 0 1px 0 #fff;
}
div#content.nobootstrap .toolbar-placeholder .pageTitle h3 img {
float:left;
margin-top:-10px;
margin-right:10px;
}
.tab-row .tab {
float:none!important;
}
.tab-page {z-index:0;}
.toolbarBox {z-index:10!important;}
iframe {
margin-top: 20px;
margin-bottom: 30px;
padding:10px;
-moz-border-radius: 12px;
-webkit-border-radius: 12px;
border-radius: 12px;
-moz-box-shadow: 2px 2px 8px #000;
-webkit-box-shadow: 2px 2px 8px #000;
box-shadow: 2px 2px 8px #000;
border:1px;
margin: 20px auto;
display:block;
}
.nobootstrap {
width: 78%!important;
min-width: 78%;
}
.alert.alert-warning{
padding-left: 50px;
position: relative;
border: none;
border-left: solid 3px #f4c178;
}
.alert-warning {
background-color: #fcf8e3;
border-color: #faebcc;
color: #8a6d3b;
}
.alert {
padding: 15px;
margin-bottom: 17px;
}

View File

@ -0,0 +1,34 @@
.readme {
float: right;
margin-right: 20px;
margin-top: -60px;
}
.readme a {color:#ce1919;}
.readme a:hover {text-decoration:underline;}
.technical_support{line-height: 15px;display: inline-block;margin-left: 15px;}
.technical_support i{color:#96c11f;}
.technical_support a{color:#1073ba;}
.toolbarBox {
background-color: #F8F8F8;
border: 1px solid #CCCCCC;
margin-bottom: 10px;
padding: 10px 0;
border-radius: 3px;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
}
div.fix-toolbar {
border-bottom: 1px solid #E0E0E0;
position: fixed;
top: 0;
opacity: 0.9;
z-index: 1;
}
#criteo-wrapper center.submit {
background: none repeat scroll 0 0 #DFDFDF;
border: 5px solid #EFEFEF;
padding: 10px;
}

View File

@ -0,0 +1,20 @@
<?php
/**
* Module Criteo Tag et Flux Web In Color
*
* @author Web In Color - addons@webincolor.fr
* @uses Prestashop modules
* @package criteo
* @copyright Copyright &copy; 2014, Web In Color
* @license http://www.webincolor.fr
*/
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: 4.6 KiB

View File

@ -0,0 +1,20 @@
<?php
/**
* Module Criteo Tag et Flux Web In Color
*
* @author Web In Color - addons@webincolor.fr
* @uses Prestashop modules
* @package criteo
* @copyright Copyright &copy; 2014, Web In Color
* @license http://www.webincolor.fr
*/
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: 4.1 KiB

View File

@ -0,0 +1,20 @@
<?php
/**
* Module Criteo Tag et Flux Web In Color
*
* @author Web In Color - addons@webincolor.fr
* @uses Prestashop modules
* @package criteo
* @copyright Copyright &copy; 2014, Web In Color
* @license http://www.webincolor.fr
*/
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,20 @@
<?php
/**
* Module Criteo Tag et Flux Web In Color
*
* @author Web In Color - addons@webincolor.fr
* @uses Prestashop modules
* @package criteo
* @copyright Copyright &copy; 2014, Web In Color
* @license http://www.webincolor.fr
*/
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,80 @@
/**
* Module Criteo Tag et Flux Web In Color
*
* @author Web In Color - addons@webincolor.fr
* @uses Prestashop modules
* @package criteo
* @copyright Copyright &copy; 2014, Web In Color
* @license http://www.webincolor.fr
*/
$(document).ready(function(){
var message = $('.toolbarHead');
var view = $(window);
// bind only if message exists. placeholder will be its parent
view.bind("scroll resize", function(e)
{
message.each(function(el){
if (message.length)
{
placeholder = $(this).parent();
if(e.type == 'resize')
$(this).css('width', $(this).parent().width());
placeholderTop = placeholder.offset().top;
var viewTop = view.scrollTop() + 15;
// here we force the toolbar to be "not fixed" when
// the height of the window is really small (toolbar hiding the page is not cool)
window_is_more_than_twice_the_toolbar = view.height() > message.parent().height() * 2;
if (!$(this).hasClass("fix-toolbar") && (window_is_more_than_twice_the_toolbar && (viewTop > placeholderTop)))
{
$(this).css('width', $(this).width());
// fixing parent height will prevent that annoying "pagequake" thing
// the order is important : this has to be set before adding class fix-toolbar
$(this).parent().css('height', $(this).parent().height());
$(this).addClass("fix-toolbar");
}
else if ($(this).hasClass("fix-toolbar") && (!window_is_more_than_twice_the_toolbar || (viewTop <= placeholderTop)) )
{
$(this).removeClass("fix-toolbar");
$(this).removeAttr('style');
$(this).parent().removeAttr('style');
}
}
});
}); // end bind
// if count errors
$('#hideError').live('click', function(e)
{
e.preventDefault();
$('.error').hide('slow', function (){
$('.error').remove();
});
return false;
});
// if count warnings
$('#linkSeeMore').live('click', function(e){
e.preventDefault();
$('.warn #seeMore').show();
$(this).hide();
$('.warn #linkHide').show();
return false;
});
$('#linkHide').live('click', function(e){
e.preventDefault();
$('.warn #seeMore').hide();
$(this).hide();
$('.warn #linkSeeMore').show();
return false;
});
$('#hideWarn').live('click', function(e){
e.preventDefault();
$('.warn').hide('slow', function (){
$('.warn').remove();
});
return false;
});
});

View File

@ -0,0 +1,41 @@
{*
* @author Web In Color - addons@webincolor.fr
* @version 2.5
* @uses Prestashop modules
* @since 1.0 - 22 juillet 2013
* @package criteo
* @copyright Copyright &copy; 2013, Web In Color
*}
<!-- MODULE Criteo -->
<script type="text/javascript">
window.criteo_q = window.criteo_q || [];
window.criteo_q.push(
{ldelim} event: "setAccount", account:{$wic_criteo_account|intval}{rdelim},
{if $id_customer}
{ldelim} event: "setCustomerId", id: "{$id_customer|intval}"{rdelim},
{/if}
{if $customer_email}
{ldelim} event: "setHashedEmail", email:["{$customer_email|escape:'htmlall':'UTF-8'}"]{rdelim},
{/if}
{ldelim} event: "setSiteType", type: "{$wic_criteo_site_type|escape:'html':'UTF-8'}"{rdelim},
{if $wic_action == 'productFooter'}
{ldelim} event: "viewItem", product: "{$wic_product_id|intval}" {rdelim}
{elseif $wic_action == 'productList'}
{ldelim} event: "viewList", product: [{$products_data|escape:'html':'UTF-8'}]{rdelim}
{elseif $wic_action == 'shoppingCart'}
{ldelim} event: "viewBasket", currency: "{$currency|escape:'html':'UTF-8'}", product: [{include file="./product_list.tpl"}]{rdelim}
{elseif $wic_action == 'search'}
{if isset($search_products)}
{ldelim} event: "viewList", product: [{foreach from=$search_products item=product name=search_products}{if $smarty.foreach.search_products.index < 3}{$product.id_product|intval}{if !$smarty.foreach.search_products.last && $smarty.foreach.search_products.index < 2},{/if}{/if}{/foreach}], keywords: "{$searchQuery|escape:'html':'UTF-8'}"{rdelim}
{/if}
{elseif $wic_action == 'orderConfirmation'}
{ldelim} event: "trackTransaction" , id: "{$wic_id_order|intval}", currency: "{$currency|escape:'html':'UTF-8'}", new_customer: {$old_customer|intval}, product: [
{include file="./product_list.tpl"}
]{rdelim}
{elseif $wic_action == 'home'}
{ldelim} event: "viewHome" {rdelim}
{/if}
);
</script>
<!-- /MODULE Criteo -->

View File

@ -0,0 +1,21 @@
<?php
/**
* Module Criteo Tag et Flux Web In Color.
*
* @author Web In Color - addons@webincolor.fr
*
* @uses Prestashop modules
*
* @copyright Copyright &copy; 2014, Web In Color
* @license http://www.webincolor.fr
*/
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,16 @@
{*
* @author Web In Color - addons@webincolor.fr
* @version 2.5
* @uses Prestashop modules
* @since 1.0 - 22 juillet 2013
* @package criteo
* @copyright Copyright &copy; 2013, Web In Color
*}
{foreach from=$wic_product_list item=product name=wic_product_list}
{ldelim}
id: "{$product['id']|intval}",
price: {$product['price']|floatval},
quantity: {$product['quantity']|intval}
{rdelim}{if !$smarty.foreach.wic_product_list.last},{/if}
{/foreach}

View File

@ -0,0 +1,20 @@
<?php
/**
* Module Criteo Tag et Flux Web In Color
*
* @author Web In Color - addons@webincolor.fr
* @uses Prestashop modules
* @package criteo
* @copyright Copyright &copy; 2014, Web In Color
* @license http://www.webincolor.fr
*/
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,9 @@
[07/01/2013] - Modification de la méthode getByOrder() afin d'éviter les notices
- Modification de la méthode statut() afin d'éviter les notices : check de la variable $ganalyticscom
[08/04/2013] - Modification de l'affichage des logs
- Modification de la durée de vie du cookie permettant de tracker les visites Adwords
- Insertion du script de suivi standard Analytics
- Modification de la classe X_GoogleAnalyticsMobile pour un meilleur suivi du referer
- Suppression des 0 inutiles devant le numéro de commande pour l'affichage dans l'interface Analytics
- Ajout de la variable utmcu pour communiquer la devise de la transaction à Analytics

View File

@ -0,0 +1,37 @@
<?php
class GanalyticsComs extends ObjectModel
{
public $id;
public $commande;
public $referer;
public $gclid;
public $ga_statut;
protected $fieldsRequired = array();
protected $fieldsValidate = array(
'id' => 'isUnsignedId', 'commande' => 'isUnsignedId', 'referer' => 'isMessage', 'gclid' => 'isMessage', 'ga_statut' => 'isUnsignedId');
protected $table = 'ganalyticscoms';
protected $identifier = 'id';
public function getFields()
{
$fields = array();
parent::validateFields(false);
$fields['commande'] = (int)$this->commande;
$fields['referer'] = pSQL($this->referer);
$fields['gclid'] = pSQL($this->gclid);
$fields['ga_statut'] = (int)$this->ga_statut;
return ($fields);
}
public function getByOrder($id_order)
{
if (!Validate::isUnsignedId($id_order))
die(Tools::displayError());
$result = Db::getInstance()->ExecuteS('
SELECT * FROM `'._DB_PREFIX_.'ganalyticscoms`
WHERE `commande` = '.(int)($id_order));
if (isset($result[0])) return $result[0];
else return false;
}
}

View File

View File

@ -0,0 +1,213 @@
<?php
/*
* 2007-2012 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-2012 PrestaShop SA
* @version Release: $Revision: 7723 $
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
// 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 function __construct()
{
}
public static function getShops()
{
return array(
array('id_shop' => 1, 'name' => 'Default shop')
);
}
public static function getCurrentShop()
{
return 1;
}
}
}
// 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;
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();
$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->shop = new ShopBackwardModule();
$this->customer = new Customer((int)$cookie->id_customer);
$this->employee = new Employee((int)$cookie->id_employee);
}
/**
* 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 function getContextType()
{
return ShopBackwardModule::CONTEXT_ALL;
}
}
/**
* 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);
}
}

View File

@ -0,0 +1,55 @@
<?php
/*
* 2007-2012 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-2012 PrestaShop SA
* @version Release: $Revision: 7723 $
* @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');
// If not under an object we don't have to set the context
if (!isset($this))
return;
else if (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)
{
global $currentIndex;
$currentIndex = AdminController::$currentIndex;
}
return;
}
$this->context = Context::getContext();
$this->smarty = $this->context->smarty;

View File

@ -0,0 +1,36 @@
<?php
/*
* 2007-2011 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-2011 PrestaShop SA
* @version Release: $Revision: 7776 $
* @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,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<module>
<name>ganalyticscom</name>
<displayName><![CDATA[Google Analytics E-Commerce PHP]]></displayName>
<version><![CDATA[1.6]]></version>
<description><![CDATA[Insertion commands in Google Analytics with PHP]]></description>
<author><![CDATA[Speedyweb]]></author>
<tab><![CDATA[analytics_stats]]></tab>
<is_configurable>1</is_configurable>
<need_instance>0</need_instance>
<limited_countries></limited_countries>
</module>

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<module>
<name>ganalyticscom</name>
<displayName><![CDATA[Google Analytics E-Commerce PHP Ultimate]]></displayName>
<version><![CDATA[1.6.1]]></version>
<description><![CDATA[Insertion des commandes dans Google Analytics en PHP]]></description>
<author><![CDATA[Speedyweb]]></author>
<tab><![CDATA[analytics_stats]]></tab>
<is_configurable>1</is_configurable>
<need_instance>0</need_instance>
<limited_countries></limited_countries>
</module>

View File

View File

@ -0,0 +1,7 @@
<?php
require_once(dirname(__FILE__).'/../../../config/config.inc.php');
require_once(dirname(__FILE__).'/../ganalyticscom.php');
$ganalyticscom = new Ganalyticscom();
$ganalyticscom->purgeDB();

View File

@ -0,0 +1,4 @@
<?php
global $_MODULE;
$_MODULE = array();

View File

@ -0,0 +1 @@
[Informational 1xx] 100="Continue" 101="Switching Protocols" [Successful 2xx] 200="OK" 201="Created" 202="Accepted" 203="Non-Authoritative Information" 204="No Content" 205="Reset Content" 206="Partial Content" [Redirection 3xx] 300="Multiple Choices" 301="Moved Permanently" 302="Found" 303="See Other" 304="Not Modified" 305="Use Proxy" 306="(Unused)" 307="Temporary Redirect" [Client Error 4xx] 400="Bad Request" 401="Unauthorized" 402="Payment Required" 403="Forbidden" 404="Not Found" 405="Method Not Allowed" 406="Not Acceptable" 407="Proxy Authentication Required" 408="Request Timeout" 409="Conflict" 410="Gone" 411="Length Required" 412="Precondition Failed" 413="Request Entity Too Large" 414="Request-URI Too Long" 415="Unsupported Media Type" 416="Requested Range Not Satisfiable" 417="Expectation Failed" [Server Error 5xx] 500="Internal Server Error" 501="Not Implemented" 502="Bad Gateway" 503="Service Unavailable" 504="Gateway Timeout" 505="HTTP Version Not Supported"

View File

View File

View File

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,35 @@
<?php
global $_MODULE;
$_MODULE = array();
$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_3a9b11492656524c81fd835eda4ded3f'] = 'Google Analytics E-Commerce PHP';
$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_7947c0f9e25dddd3ba00b78ca496e5c3'] = 'Insertion commands in Google Analytics with PHP';
$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_f2a70637e555c137dfb2e5c1053c3782'] = 'The cURL extension must be enabled to use this module.';
$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_393d4b30284b0fd8c1e2ec3ad03a0312'] = 'Google Analytics E-commerce Statistic Module - Manage your revenue income and conversion rate !';
$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_620bc018bf80308f682f91df6b816e67'] = 'Credit : ';
$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_e7785de91330713fc2d12404bb6bd556'] = 'Settings';
$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_73732af11836e1d28382c85553794bfd'] = 'Tracking ID';
$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_740b57fb19eeca4ffd4c612065a31e41'] = '(UA-xxxxxxx-xx)';
$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_c077fc5a77dd325a9a2a67714c250b82'] = 'Dynamically inform the name of the visited page';
$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_22b04f2ba0813829df7227be18b109f1'] = 'If this option is enabled, the name of the visited page will be sent to Google Analytics in the manner of \"ganalytics\" module developed by Prestashop, which keeps the existing goals (eg: for the purchase tunnel).';
$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_c5cf7d1c18773cf0f580cf41f1cbf57b'] = 'This feature posing some problem on multilingual sites, it is possible to disable it.';
$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_dd8afbd38b01a7b4eb27f45fc036b881'] = 'logs';
$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_8af3b4001502204f3923c3b1c48f02e5'] = 'Order status insertion in Analytics';
$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_38af7f0de896d75a1d94a178e2a3e481'] = 'Status indicating order insertion in to Google Analytics.';
$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_aa7fd053fc4e2ce5fe38ee70b9994bf4'] = 'Cancelling order status in Analytics';
$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_eba84e0392b6e5b32224e698d5b917f6'] = 'Status indicating cancellation of the order in Google Analytics.';
$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_7898516eeaa2516be31596614058bd1d'] = 'Minimum time before selecting a new referer';
$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_03c7c0ace395d80182db07ae2c30f034'] = 's';
$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_894608ff381bebb55a0533d90a4a9ec4'] = 'Here is how GA updates the campaign tracking cookie based on referrer:';
$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_0fdce1d5346e778941201452ecea5296'] = 'Direct traffic is always overwritten by referrals, organic and tagged campaigns and does not overwrite existing campaign information';
$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_995a3c85f2b8598d7ce9b87383f4bd65'] = 'New campaign, referral or organic link that brings a visitor to the site always overrides the existing campaign cookie';
$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_1732453fd119a6599f7668dc1d21a2a8'] = 'For tracking transactions, the module creates a cookie different from that posed by Google Analytics, to retain the referer for a period of time that you can adjust.';
$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_419d2b3db15fc52e4a163dfb10ae8ff4'] = 'If you wish to obtain statistics as close as possible to those of Google, we recommend that you leave the default value, 18 000 second (5 hours).';
$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_a2b6146f88b81e19b707d3543aa90496'] = 'If you want to retain the referer more time to analyze your conversion sources differently, it is possible to define the cookie lifetime greater.';
$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_3c331e5c32b8c59a670fdf4964f6e41a'] = 'eg 5 hours = 18000s, 1 week = 604800s, 1 month = 2629800s';
$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_aed88202e2432ee2a613f9120ef7486b'] = 'Save';
$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_685c17e33c1f0268b39ef7a1491de281'] = 'Purge the database';
$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_22e0461ba9931f162f3c80d8c4c0621d'] = 'Add this URL to your crontab to automate purging the database:';
$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_e6eca1fc76fbcfc06a6081e6c9fe2c33'] = 'Purge';
$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_25a8f154ef990606468a39ab26b5f70c'] = 'The purge was successful.';
$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_e9762da7ba70222119eb2439a81505e2'] = 'An error has occurred, the purge was not performed correctly.';

View File

@ -0,0 +1,17 @@
<?php
global $_MODULE;
$_MODULE = array();
$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_3a9b11492656524c81fd835eda4ded3f'] = 'Google Analytics E-Commerce PHP';
$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_7947c0f9e25dddd3ba00b78ca496e5c3'] = 'Inserción de ordenes en Google Analytics';
$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_393d4b30284b0fd8c1e2ec3ad03a0312'] = 'Módulo Google Analytics E-commerce - Impulse sus ventas y su tasa de conversión!';
$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_620bc018bf80308f682f91df6b816e67'] = 'Realización';
$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_e7785de91330713fc2d12404bb6bd556'] = 'Configuración';
$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_73732af11836e1d28382c85553794bfd'] = 'ID de seguimiento';
$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_740b57fb19eeca4ffd4c612065a31e41'] = '(UA-xxxxxxx-xx)';
$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_dd8afbd38b01a7b4eb27f45fc036b881'] = 'logs';
$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_8af3b4001502204f3923c3b1c48f02e5'] = 'Inserción Analytics estado de la orden';
$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_38af7f0de896d75a1d94a178e2a3e481'] = 'Estatutos de la activación de insertar un comando en Google Analytics.';
$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_aa7fd053fc4e2ce5fe38ee70b9994bf4'] = 'Cancelaciones Analytics estado de la orden';
$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_eba84e0392b6e5b32224e698d5b917f6'] = 'Estatutos de la activación anulación de un pedido de Google Analytics.';
$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_aed88202e2432ee2a613f9120ef7486b'] = 'Aplicar';

View File

@ -0,0 +1,40 @@
<?php
global $_MODULE;
$_MODULE = array();
$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_4b446e07fdbe435b562e51749f010949'] = 'Google Analytics E-Commerce PHP Ultimate';
$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_7947c0f9e25dddd3ba00b78ca496e5c3'] = 'Insertion des commandes dans Google Analytics en PHP';
$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_f2a70637e555c137dfb2e5c1053c3782'] = 'L\'extension cURL doit être activée pour utiliser ce module.';
$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_393d4b30284b0fd8c1e2ec3ad03a0312'] = 'Module de statistiques Google Analytics E-commerce - Pilotez votre CA et votre taux de conversion !';
$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_f0d090649f6fefb11c06e651345f4927'] = 'Attention, ce module n\'insère pas le code de suivi standard, mais vous permet d\'insérer les transactions dans Google Analytics.';
$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_83dcfde9d6a6cb43244b252419abac5c'] = 'Ainsi, vous devez passer par un autre module pour effectuer votre suivi.';
$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_8db8d788f9538a1f45b6ed7b958443b3'] = 'Si vous souhaitez utiliser les fonctionnalités de « Enhanced Ecommerce », le module est compatible, mais c\'est le module avec lequel vous mettez le suivi standard qu\'il vous faudra configurer.';
$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_a143fcc6cb63c6853b13bbce5c75fa91'] = 'Si vous avez le module Google Analytique développé par Prestashop, nous vous recommandons de désactiver le hook « OrderConfirmation » pour ne pas insérer des commandes en double.';
$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_e7785de91330713fc2d12404bb6bd556'] = 'Paramètres';
$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_1daeade18f3218db95e1545a0408bcef'] = 'ID de suivi Analytics';
$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_740b57fb19eeca4ffd4c612065a31e41'] = '(UA-xxxxxxx-xx)';
$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_dadb15dcc7e0e73a3668c460820e22ef'] = 'Le code de suivi est configurable par langue, n\'oubliez pas de le configurer pour chaque langue, si vous avez plusieurs activées.';
$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_dd8afbd38b01a7b4eb27f45fc036b881'] = 'Activer le fichier de logs';
$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_8af3b4001502204f3923c3b1c48f02e5'] = 'Statuts insertion commande Analytics';
$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_38af7f0de896d75a1d94a178e2a3e481'] = 'Statuts déclenchant l\'insertion d\'une commande dans Google Analytics.';
$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_aa7fd053fc4e2ce5fe38ee70b9994bf4'] = 'Statuts annulation commande Analytics';
$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_eba84e0392b6e5b32224e698d5b917f6'] = 'Statuts déclenchant l\'annulation d\'une commande dans Google Analytics.';
$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_7898516eeaa2516be31596614058bd1d'] = 'Temps minimum avant de retenir un nouveau referer';
$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_03c7c0ace395d80182db07ae2c30f034'] = 's';
$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_894608ff381bebb55a0533d90a4a9ec4'] = 'Voici comment GA met à jour le cookie de suivi de campagne basée sur referrer:';
$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_0fdce1d5346e778941201452ecea5296'] = 'Le trafic direct est toujours écrasé par les sites référents, le search (organic), les campagnes payantes (adwords), et n\'écrase pas les informations de la campagne existante.';
$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_995a3c85f2b8598d7ce9b87383f4bd65'] = 'Une nouvelle campagne, referer ou lien organique qui apporte un visiteur sur le site est toujours prioritaire sur le cookie et écrase les informations de la campagne existante.';
$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_1732453fd119a6599f7668dc1d21a2a8'] = 'Pour tracker les transactions, le module pose un cookie différent de celui posé par Google Analytics, permettant de retenir le referer pendant un laps de temps que vous pouvez régler.';
$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_419d2b3db15fc52e4a163dfb10ae8ff4'] = 'Pour se rapprocher au maximum des statistiques de Google, nous vous conseillons de laisser la valeur par défaut, c\'est à dire 18 000s soit 5h.';
$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_a2b6146f88b81e19b707d3543aa90496'] = 'Si vous souhaitez retenir le referer plus de temps pour analyser différemment vos sources de conversion, il est donc possible de définir une durée de vie du cookie plus importante. ';
$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_3c331e5c32b8c59a670fdf4964f6e41a'] = 'ex: 18000s = 5h, 604800s = 1 semaine, 2629800s = 1 mois';
$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_aed88202e2432ee2a613f9120ef7486b'] = 'Enregistrer';
$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_685c17e33c1f0268b39ef7a1491de281'] = 'Purger la base de données';
$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_22e0461ba9931f162f3c80d8c4c0621d'] = 'Ajoutez cette URL à votre crontab pour automatiser la purge de la base de données:';
$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_7c109a950b85afcbfbd124aad6e4ef70'] = 'Le système de purge concerne toutes les sources de trafic qui sont enregistrées en BDD.';
$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_d108452ff4a1ac81842301efd09123e7'] = '- Le fait de purger cette table efface toutes les sources enregistrées depuis plus dun mois.';
$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_9c628c37c65d61b649d16a9082ceb6ee'] = '(Normalement toutes les commandes de plus dun mois sont déjà insérées dans Google Analytics)';
$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_68bb606cb0fab3be3add19694c3b3a94'] = '- Enfin le système de purge n\'efface pas les statistiques Google Analytics, cela n\'a aucune répercussion sur GooGle Analytics ni sur l\'affichage des stats dans le Back-Office.';
$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_e6eca1fc76fbcfc06a6081e6c9fe2c33'] = 'Purger';
$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_25a8f154ef990606468a39ab26b5f70c'] = 'La purge a été correctement effectuée.';
$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_e9762da7ba70222119eb2439a81505e2'] = 'Une erreur est survenue, la purge ne s\'est pas effectuée correctement.';

View File

@ -0,0 +1,605 @@
<?php
if (!defined('_PS_VERSION_'))
exit;
class Ganalyticscom extends Module
{
private $_html = '';
private $_postErrors = array();
var $_logFile = 'debug/logs.txt';
var $_httpCodesFile = 'debug/http_codes.txt';
public function __construct()
{
$this->name = 'ganalyticscom';
$this->tab = 'analytics_stats';
$this->version = '1.6.1';
$this->author = 'Speedyweb';
$this->module_key = '90bbcd281e12778f64c01db88277a43c';
$this->need_instance = 0;
parent::__construct();
$this->displayName = $this->l('Google Analytics E-Commerce PHP Ultimate');
$this->description = $this->l('Insertion des commandes dans Google Analytics en PHP');
/** Backward compatibility */
require(_PS_MODULE_DIR_.$this->name.'/backward_compatibility/backward.php');
if (!function_exists('curl_init'))
$this->warning = $this->l('The cURL extension must be enabled to use this module.');
}
public function install()
{
$languages = Language::getLanguages(false);
$aCodeGA = array();
foreach ($languages as $language) $aCodeGA[(int)($language['id_lang'])] = '';
if (!parent::install()
|| !$this->registerHook('top')
|| !$this->registerHook('header')
|| ($this->checkVersion('is_1.4') && !$this->registerHook('cart'))
|| ($this->checkVersion('is_1.5') && !$this->registerHook('actionCartSave'))
|| !$this->registerHook('postUpdateOrderStatus')
|| !$this->registerHook('newOrder')
|| !$this->registerHook('backOfficeHeader')
|| !Configuration::updateValue('codeGA', $aCodeGA)
|| !Configuration::updateValue('ga_insert_statuts', '2')
|| !Configuration::updateValue('ga_annul_statuts', '6')
|| !Configuration::updateValue('ga_logs', 0)
|| !Configuration::updateValue('cookie_min_time', 18000))
return false;
return Db::getInstance()->Execute('
CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'ganalyticscoms`(
`id` int(11) NOT NULL auto_increment,
`id_cart` int(11) DEFAULT \'0\' NOT NULL,
`commande` int(11) NOT NULL,
`referer` text NOT NULL,
`gclid` text NOT NULL,
`utm_params` VARCHAR( 255 ) NOT NULL,
`user_agent` TEXT NOT NULL,
`extra_params` VARCHAR( 255 ) NOT NULL,
`ga_statut` smallint(6) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8');
}
public function uninstall()
{
Configuration::deleteByName('codeGA');
Configuration::deleteByName('ga_insert_statuts');
Configuration::deleteByName('ga_annul_statuts');
Configuration::deleteByName('ga_logs');
Configuration::deleteByName('cookie_min_time');
Db::getInstance()->Execute('DROP TABLE IF EXISTS `'._DB_PREFIX_.'ganalyticscoms`');
return parent::uninstall();
}
/***************************************************************************************************************/
public function getContent()
{
if (Tools::isSubmit('submitAnalytics'))
{
$this->_postValidation();
if (!count($this->_postErrors)) $this->_postProcess();
else $this->displayErrors();
}
elseif (Tools::isSubmit('submitPurgeDB'))
{
$this->PurgeDB();
if (!count($this->_postErrors)) $this->displayPurgeConf();
else $this->displayErrors();
}
$this->_displayAnalytics();
$this->_displayForm();
return $this->_html;
}
private function _postProcess()
{
if (Tools::isSubmit('submitAnalytics'))
{
$languages = Language::getLanguages(false);
$aCodeGA = array();
foreach ($languages as $language) $aCodeGA[$language['id_lang']] = (string)Tools::getValue('codeGA_'.$language['id_lang']);
Configuration::updateValue('codeGA', $aCodeGA);
Configuration::updateValue('ga_logs', (Tools::isSubmit('ga_logs') && (int)Tools::getValue('ga_logs') != 0) ? 1 : 0);
Configuration::updateValue('ga_insert_statuts', implode(', ', Tools::getValue('ga_insert_statuts')));
Configuration::updateValue('ga_annul_statuts', implode(', ', Tools::getValue('ga_annul_statuts')));
$cookie_min_time = (int)Tools::getValue('cookie_min_time');
Configuration::updateValue('cookie_min_time', ($cookie_min_time > 18000) ? $cookie_min_time : 18000);
}
}
private function _postValidation()
{
// TO DO: Post Validation
}
/****** HOOKS *************************************************************************************************/
public function getDateCookieCreation($cookie)
{
$tab_cookie = explode('__datecookie:', $cookie);
return (isset($tab_cookie[1]) ? $tab_cookie[1] : time());
}
public function cleanRefererFromCookie($cookie)
{
$tab_cookie = explode('__datecookie:', $cookie);
return $tab_cookie[0];
}
public function hookTop($params)
{
include_once(realpath(dirname(__FILE__)).'/lib/X_Tools.php');
$referer = (isset($_SERVER['HTTP_REFERER'])) ? $_SERVER['HTTP_REFERER'] : '';
$query_string = (isset($_SERVER['QUERY_STRING'])) ? $_SERVER['QUERY_STRING'] : '';
$user_agent = (isset($_SERVER['HTTP_USER_AGENT'])) ? $_SERVER['HTTP_USER_AGENT'] : '';
$cookie_min_time_before_overwrite = (int)Configuration::get('cookie_min_time'); // 5h par défaut - Donnée configurable dans l'admin
$cookie_expire_time = time() + 15778800; // 6 mois
if ((!isset($_COOKIE['ganalytics']) || (!empty($referer) && time() > ($this->getDateCookieCreation($_COOKIE['ganalytics']) + $cookie_min_time_before_overwrite)))
&& $this->GetDomain($referer) != str_replace('www.', '', $_SERVER['HTTP_HOST']))
{
setcookie('ganalytics', $referer.'__datecookie:'.time(), $cookie_expire_time, '/');
setcookie('query_string', $query_string, $cookie_expire_time, '/');
setcookie('user_agent', $user_agent, $cookie_expire_time, '/');
}
}
public function hookActionCartSave($params)
{
$this->hookCart($params);
}
public function hookCart($params)
{
include_once(realpath(dirname(__FILE__)).'/lib/X_Tools.php');
$referer = isset($_COOKIE['ganalytics']) ? $this->cleanRefererFromCookie($_COOKIE['ganalytics']) : '';
$query_string = isset($_COOKIE['query_string']) ? $_COOKIE['query_string'] : '';
$user_agent = isset($_COOKIE['user_agent']) ? $_COOKIE['user_agent'] : '';
$extra_params = isset($_COOKIE['ga_extra_params']) ? $_COOKIE['ga_extra_params'] : '';
$query_params = $this->query2tab($query_string);
$gclid = isset($query_params['gclid']) ? $query_params['gclid'] : '';
$utm_params = $this->getUtmParams($query_params);
if (isset($params['cart']) && (int)$params['cart']->id > 0)
{
$row = Db::getInstance()->getRow('SELECT * FROM `'._DB_PREFIX_.'ganalyticscoms` WHERE `id_cart` = '.$params['cart']->id);
if (!$row)
{
//if (Configuration::get('ga_logs')) $this->writeLogs($this->_logFile, "");
//if (Configuration::get('ga_logs')) $this->writeLogs($this->_logFile, "## ".date('d-m-Y H:i:s')." #############################################");
//if (Configuration::get('ga_logs')) $this->writeLogs($this->_logFile, "#Function - hookCart | query_string = ".$query_string." | referer = ".$referer." | user_agent = ".$user_agent." | extra params = ".$extra_params);
//if (Configuration::get('ga_logs')) $this->writeLogs($this->_logFile, "# INSERT | ID cart = ".$params['cart']->id);
Db::getInstance()->Execute('
INSERT INTO `'._DB_PREFIX_.'ganalyticscoms` (`id_cart`, `commande`, `referer`, `gclid`, `utm_params`, `user_agent`, `extra_params`)
VALUES('.(int)$params['cart']->id.',0, "'.$referer.'", "'.$gclid.'", "'.$utm_params.'", "'.$user_agent.'", "'.$extra_params.'")');
}
}
}
public function hookHeader($params)
{
return $this->display(__FILE__, '/views/templates/hook/header.tpl');
}
public function hookBackOfficeHeader($params)
{
$return = '';
if (($this->checkVersion('is_1.5')
&& (!Tools::isSubmit('controller') || 'adminhome' == Tools::getValue('controller') || 'ganalyticscom' == Tools::getValue('module_name')
|| 'ganalyticscom' == Tools::getValue('configure')))
|| ($this->checkVersion('is_1.4') && !Tools::isSubmit('tab')))
$return = '<link rel="stylesheet" href="'.__PS_BASE_URI__.'modules/ganalyticscom/views/css/ga.css" type="text/css" media="screen" charset="utf-8"/>';
return $return;
}
public function hookNewOrder($params)
{
$id_order = (isset($params['order'])) ? $params['order']->id : $params['id_order'];
$order = new Order((int)$id_order);
$row = Db::getInstance()->getRow('SELECT * FROM `'._DB_PREFIX_.'ganalyticscoms` WHERE `id_cart` = '.$order->id_cart);
if (!$row)
{
$referer = isset($_COOKIE['ganalytics']) ? $this->cleanRefererFromCookie($_COOKIE['ganalytics']) : '';
$query_string = isset($_COOKIE['query_string']) ? $_COOKIE['query_string'] : '';
$user_agent = isset($_COOKIE['user_agent']) ? $_COOKIE['user_agent'] : '';
$extra_params = isset($_COOKIE['ga_extra_params']) ? $_COOKIE['ga_extra_params'] : '';
$query_params = $this->query2tab($query_string);
$gclid = isset($query_params['gclid']) ? $query_params['gclid'] : '';
$utm_params = $this->getUtmParams($query_params);
Db::getInstance()->Execute('
INSERT INTO `'._DB_PREFIX_.'ganalyticscoms` (`id_cart`, `commande`, `referer`, `gclid`, `utm_params`, `user_agent`, `extra_params`)
VALUES('.$order->id_cart.', '.(int)$id_order.', "'.$referer.'", "'.$gclid.'", "'.$utm_params.'", "'.$user_agent.'", "'.$extra_params.'")');
}
else Db::getInstance()->Execute('UPDATE `'._DB_PREFIX_.'ganalyticscoms` SET `commande` = '.(int)$id_order.' WHERE `id_cart` = '.$order->id_cart);
}
public function hookPostUpdateOrderStatus($params)
{
$this->statut($params);
}
/***************************************************************************************************************/
public function getArrayFromStringVar($nom, $sep = ', ')
{
return explode($sep, Configuration::get($nom));
}
public function getUrlSite()
{
return 'http://'.htmlspecialchars($_SERVER['HTTP_HOST'], ENT_COMPAT, 'UTF-8').__PS_BASE_URI__;
}
public function _displayAnalytics()
{
$this->_html .= '
<div style="border: solid 1px #ccced7; padding: 8px;border-bottom:0">
<img src="../modules/ganalyticscom/views/img/ganalytics.jpg" style="margin-right:15px;float:right" />
<h2>'.$this->l('Module de statistiques Google Analytics E-commerce - Pilotez votre CA et votre taux de conversion !').'</h2><br />
</div>
<div style="border: solid 1px #ccced7;background:#FF0000;color:#FFF; padding: 8px;margin-bottom:30px;">
<b>'.
$this->l('Beware, this module does not insert the standard tracking code, but only allows you to insert transactions in Google Analytics.').'<br />'.
$this->l('So, you must pass by another module to your standard tracking.').'<br />'.
$this->l('If you want to use the "Enhanced Ecommerce" features, this is compatible but it\s the module with which you don the standard tracking that you need to configure.').'<br />'.
$this->l('If you have the Google Analytics module developed by Prestashop, we recommend to disable the "OrderConfirmation" hook to not insert duplicate orders.').'
</b><br />
</div>';
}
public function displayErrors()
{
foreach ($this->_postErrors as $err) $this->_html .= '<div class="alert error">'.$err.'</div>';
}
public function GetDomain($url)
{
$domain = parse_url(preg_replace('`www\.`', '', $url));
return (empty($domain['host'])) ? $domain['path'] : $domain['host'];
}
/***************************************************************************************************************/
public function statut($params)
{
include_once(realpath(dirname(__FILE__)).'/lib/X_Tools.php');
include_once(realpath(dirname(__FILE__)).'/GanalyticsComs.php');
$id_order = (isset($params['order'])) ? $params['order']->id : $params['id_order'];
$new_order_status = (isset($params['orderStatus'])) ? $params['orderStatus'] : $params['newOrderStatus'];
$order = new Order((int)$id_order);
if ($this->checkVersion('is_1.5')) $logs = Configuration::get('ga_logs', null, $order->id_shop_group, $order->id_shop);
elseif ($this->checkVersion('is_1.4')) $logs = Configuration::get('ga_logs');
if ($logs) $this->writeLogs($this->_logFile, '');
if ($logs) $this->writeLogs($this->_logFile, '## '.date('d-m-Y H:i:s').' #############################################');
if ($logs) $this->writeLogs($this->_logFile, '#Function - statut serialyze:'.serialize($new_order_status));
if ($logs) $this->writeLogs($this->_logFile, '#Function - statut | id_order = '.$id_order.' | new_order_status = '.$new_order_status->name.' id:'.$new_order_status->id);
$ganalyticscom = new GanalyticsComs();
$ganalyticscom = $ganalyticscom->getByOrder($id_order);
if ($ganalyticscom)
{
if ($logs) $this->writeLogs($this->_logFile, 'ganalyticscom ok');
$ga_insert_statuts = $this->getArrayFromStringVar('ga_insert_statuts');
$ga_annul_statuts = $this->getArrayFromStringVar('ga_annul_statuts');
if (in_array($new_order_status->id, $ga_insert_statuts) && $ganalyticscom['ga_statut'] == 0)
{
$this->GanalyticsUpdate($id_order, $new_order_status);
Db::getInstance()->Execute('
UPDATE `'._DB_PREFIX_.'ganalyticscoms`
SET `ga_statut` = 1 WHERE `commande` = '.(int)$id_order);
}
elseif (in_array($new_order_status->id, $ga_annul_statuts) && $ganalyticscom['ga_statut'] == 1)
{
$this->GanalyticsUpdate($id_order, $new_order_status, -1);
Db::getInstance()->Execute('
UPDATE `'._DB_PREFIX_.'ganalyticscoms`
SET `ga_statut` = 0 WHERE `commande` = '.(int)$id_order);
}
}
}
public function GanalyticsUpdate($id_order, $order_state, $sens = 1)
{
include_once(realpath(dirname(__FILE__)).'/lib/X_Tools.php');
$http_codes = (is_readable(realpath(dirname(__FILE__)).'/'.$this->_httpCodesFile)) ? parse_ini_file(realpath(dirname(__FILE__)).'/'.$this->_httpCodesFile) : array();
$commande_infos = $this->getTransaction($id_order, $sens);
$commande_order = $commande_infos['order'];
if ($this->checkVersion('is_1.5')) $logs = Configuration::get('ga_logs', null, $commande_order['id_shop_group'], $commande_order['id_shop']);
elseif ($this->checkVersion('is_1.4')) $logs = Configuration::get('ga_logs');
if ($logs) $this->writeLogs($this->_logFile, '#Function - GanalyticsUpdate | order = '.$id_order.' | sens = '.$sens);
if ($logs) $this->writeLogs($this->_logFile, '#COMMANDE INFOS => '.serialize($commande_infos));
if ($this->checkVersion('is_1.5')) $_codeGA = Configuration::get('codeGA', $commande_order['id_lang'], $commande_order['id_shop_group'], $commande_order['id_shop']);
elseif ($this->checkVersion('is_1.4')) $_codeGA = Configuration::get('codeGA', $commande_order['id_lang']);
$ganalyticscom = new GanalyticsComs();
$ganalyticscom = $ganalyticscom->getByOrder($id_order);
$referer = $ganalyticscom['referer'];
$gclid = $ganalyticscom['gclid'];
$utm_params = $ganalyticscom['utm_params'];
$user_agent = $ganalyticscom['user_agent'];
$ga_params = $this->query2tab($ganalyticscom['extra_params']);
if ($logs) $this->writeLogs($this->_logFile, '#gclid => '.$gclid.' | REFERER => '.$referer);
if ($logs) $this->writeLogs($this->_logFile, '#PAYMENT => '.$commande_order['payment'].' | '.'#STATUT => '.$order_state->name);
// Si $commande_order['id_shop'] -> ShopCore::getShop($id_shop) ['domain']
// Sinon str_replace('www.', '', $_SERVER['HTTP_HOST'])
$host = str_replace('www.', '', $_SERVER['HTTP_HOST']);
if (isset($commande_order['id_shop']))
{
$shop = Shop::getShop($commande_order['id_shop']);
$host = $shop['domain'];
}
include_once(realpath(dirname(__FILE__)).'/lib/X_GoogleAnalyticsMobile.class.php');
$ga = new X_GoogleAnalyticsMobile($_codeGA, $host, $referer, $gclid, $utm_params, null, $ga_params);
$ga->SetTransaction($id_order, $commande_order['total'], $commande_order['port'], $commande_order['tva'], $commande_order['city'], $commande_order['region'], $commande_order['country'], $commande_order['currency']);
if (count($commande_infos['products']) > 0)
foreach ($commande_infos['products'] as $product)
$ga->SetTransactionItem($id_order, $product['ref'], $product['category'], $product['name'], $product['price'], $product['quantity'], $commande_order['currency']);
if ($logs) $this->writeLogs($this->_logFile, '#TrafficSource => '.serialize($ga->GetTrafficSource()));
$tracking_codes = $ga->GetTrackingCode();
if (count($tracking_codes) > 0)
{
$http_codes = (is_readable(realpath(dirname(__FILE__)).'/'.$this->_httpCodesFile)) ? parse_ini_file(realpath(dirname(__FILE__)).'/'.$this->_httpCodesFile) : array();
foreach ($tracking_codes as $tracking_code)
{
$ch = @curl_init($tracking_code);
if ($ch)
{
@curl_setopt($ch, CURLOPT_TIMEOUT, 30);
@curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30);
@curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
@curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
@curl_setopt($ch, CURLOPT_USERAGENT, $user_agent); // Set the User-Agent
@curl_exec($ch);
$http_code = @curl_getinfo($ch, CURLINFO_HTTP_CODE);
if ($logs)
$this->writeLogs($this->_logFile, (array_key_exists($http_code, $http_codes) ? $http_code.' : '.$http_codes[$http_code] : 'Aucun code HTTP retourné' ).' ** '.$tracking_code);
@curl_close($ch);
}
}
}
}
public function getTransaction($id_order, $sens = 1)
{
$return = array();
$order = new Order((int)$id_order);
$address = new Address((int)$order->id_address_invoice);
$currency = new Currency((int)$order->id_currency);
$products = $order->getProducts();
$customizedDatas = Product::getAllCustomizedDatas((int)($order->id_cart));
Product::addCustomizationPrice($products, $customizedDatas);
$i = 0;
$tva = 0;
foreach ($products as $product)
{
$result = Db::getInstance()->getRow('
SELECT `name` FROM `'._DB_PREFIX_.'product`
LEFT JOIN `'._DB_PREFIX_.'category_lang` ON `'._DB_PREFIX_.'product`.`id_category_default` = `'._DB_PREFIX_.'category_lang`.`id_category`
WHERE `'._DB_PREFIX_.'product`.`id_product` = '.(int)$product['product_id'].'
AND `'._DB_PREFIX_.'category_lang`.`id_lang` = '.(int)$order->id_lang);
$total_produit = $product['product_price_wt'] * $product['product_quantity'];
$total_produit_ht = ($product['product_price'] + $product['ecotax']) * $product['product_quantity'];
$tva += round($total_produit - $total_produit_ht, 2);
$return['products']['product'.$i]['order_id'] = sprintf('%06d', (int)$order->id);
$return['products']['product'.$i]['ref'] = (null != $product['product_reference']) ? $product['product_reference'] : $product['product_id'];
$return['products']['product'.$i]['category'] = $result['name'];
$return['products']['product'.$i]['name'] = $product['product_name'];
$return['products']['product'.$i]['price'] = $sens * ($product['product_price'] + $product['ecotax']);
$return['products']['product'.$i]['quantity'] = $sens * $product['product_quantity'];
$i++;
}
$return['order']['id'] = sprintf('%06d', (int)$order->id);
$return['order']['total'] = $sens * $order->total_paid;
$return['order']['port'] = $sens * $order->total_shipping;
$return['order']['tva'] = $sens * $tva;
$return['order']['city'] = $address->city;
$return['order']['region'] = '';
$return['order']['country'] = $address->country;
$return['order']['currency'] = $currency->iso_code;
$return['order']['payment'] = $order->payment;
$return['order']['id_lang'] = $order->id_lang;
$return['order']['id_shop'] = (isset($order->id_shop) ? $order->id_shop : null);
$return['order']['id_shop_group'] = (isset($order->id_shop_group) ? $order->id_shop_group : null);
return $return;
}
/***************************************************************************************************************/
public function _displayForm()
{
$defaultLanguage = (int)(Configuration::get('PS_LANG_DEFAULT'));
$languages = Language::getLanguages(false);
$divLangName = 'div_codeGA';
$ga_insert_statuts = $this->getArrayFromStringVar('ga_insert_statuts');
$ga_annul_statuts = $this->getArrayFromStringVar('ga_annul_statuts');
$ga_logs = Configuration::get('ga_logs');
$cookie_min_time = Configuration::get('cookie_min_time');
$checked = 'checked="checked"';
$isGaLogsChecked = ($ga_logs) ? $checked : '';
$orderStates = OrderState::getOrderStates(Context::getContext()->cookie->id_lang);
$this->_html .= '
<script type="text/javascript">
var id_language = '.$defaultLanguage.';
</script>
<form action="'.$_SERVER['REQUEST_URI'].'" method="post" style="clear: both;">
<fieldset>
<legend><img src="../img/admin/contact.gif" />'.$this->l('Paramètres').'&nbsp;<img src="'._PS_ADMIN_IMG_.'up.gif" alt="" /></legend></legend>
<label>'.$this->l('Tracking ID Analytics').'</label>
<div class="margin-form">';
foreach ($languages as $language)
$this->_html .= '
<div id="div_codeGA_'.$language['id_lang'].'" style="display: '.($language['id_lang'] == $defaultLanguage ? 'block' : 'none').';float: left;">
<input type="text" size="20" name="codeGA_'.$language['id_lang'].'" id="codeGA_'.$language['id_lang'].'" value="'.(Tools::getValue('codeGA_'.$language['id_lang']) ? Tools::getValue('codeGA_'.$language['id_lang']) : (Configuration::get('codeGA', $language['id_lang']) ? Configuration::get('codeGA', $language['id_lang']) : '')).'" />
</div>';
$this->_html .= $this->displayFlags($languages, $defaultLanguage, $divLangName, 'div_codeGA', true);
$this->_html .= '
<br /><p class="clear" style="display: block; width: 550px;background:#FFF;border:2px solid #555;padding:10px;color:#585a69;font-size:12px">'.
$this->l('(UA-xxxxxxx-xx)').'<br /><b>'.
$this->l('The tracking code is configurable by language, do not forget to configure it for each language if you have several of activated.').'</b>
</p>
<div class="clear"></div>
</div>
<label>'.$this->l('Activer le fichier de logs').'</label>
<div class="margin-form">
<input type="checkbox" name="ga_logs" value="1" '.$isGaLogsChecked.'/>
</div>
<label>'.$this->l('Statuts insertion commande Analytics').'</label>
<div class="margin-form">
<select name="ga_insert_statuts[]" multiple="true" style="height:200px;width:360px;">';
foreach ($orderStates as $orderState)
$this->_html .= '
<option value="'.(int)$orderState['id_order_state'].'" '.(in_array($orderState['id_order_state'], $ga_insert_statuts) ? 'selected="selected" ' : '').'>'.$orderState['name'].'</option>';
$this->_html .= '
</select>
<p class="clear" style="display: block; width: 550px;background:#FFF;border:2px solid #555;padding:10px;color:#585a69;font-size:12px">'.
$this->l('Statuts d&eacute;clenchant l\'insertion d\'une commande dans Google Analytics.').'
</p>
<div class="clear"></div>
</div>
<label>'.$this->l('Statuts annulation commande Analytics').'</label>
<div class="margin-form">
<select name="ga_annul_statuts[]" multiple="true" style="height:200px;width:360px;">';
foreach ($orderStates as $orderState)
$this->_html .= '
<option value="'.(int)$orderState['id_order_state'].'" '.(in_array($orderState['id_order_state'], $ga_annul_statuts) ? 'selected="selected" ' : '').'>'.$orderState['name'].'</option>';
$this->_html .= '
</select>
<p class="clear" style="display: block; width: 550px;background:#FFF;border:2px solid #555;padding:10px;color:#585a69;font-size:12px">'.
$this->l('Statuts d&eacute;clenchant l\'annulation d\'une commande dans Google Analytics.').'
</p>
<div class="clear"></div>
</div>
<label>'.$this->l('Referer time minimum before overwrite').'</label>
<div class="margin-form">
<input type="text" size="20" name="cookie_min_time" value="'.$cookie_min_time.'" /> '.$this->l('s').'
<p class="clear" style="display: block; width: 550px;background:#FFF;border:2px solid #555;padding:10px;color:#585a69;font-size:12px">'.
$this->l('Here is how GA updates the campaign tracking cookie based on referrer:').'<br />'.
$this->l('Direct traffic is always overwritten by referrals, organic and tagged campaigns and does not overwrite existing campaign information').'<br />'.
$this->l('New campaign, referral or organic link that brings a visitor to the site always overrides the existing campaign cookie').'<br /><br />'.
$this->l('For tracking transactions, the module creates a cookie different from that posed by Google Analytics, to retain the referer for a period of time that you can adjust.').'<br />'.
$this->l('If you wish to obtain statistics as close as possible to those of Google, we recommend that you leave the default value, 18 000 second (5 hours).').'<br />'.
$this->l('If you want to retain the referer more time to analyze your conversion sources differently, it is possible to define the cookie lifetime greater.').'<br />'.
$this->l('eg 5 hours = 18000s, 1 week = 604800s, 1 month = 2629800s').'
</p>
<div class="clear"></div>
</div>
<br /><br />
<center>
<input type="submit" name="submitAnalytics" value="'.$this->l('Enregistrer').'" class="button" />
</center>
</fieldset>
</form><br />
<form action="'.$_SERVER['REQUEST_URI'].'" method="post" style="clear: both;">
<fieldset>
<legend><img src="../img/admin/contact.gif" />'.$this->l('Purger la base de données').'&nbsp;</legend>
<p>'.$this->l('Ajoutez cette URL &agrave votre crontab pour automatiser la purge de la base de données:').'<br />
<b>'.$this->getShopDomain(true, true).__PS_BASE_URI__.'modules/'.$this->name.'/cron/purge.php</b></p>
<p class="clear" style="display: block; width: 550px;background:#FFF;border:2px solid #555;padding:10px;color:#585a69;font-size:12px">'.
$this->l('The purge system concerns all traffic sources that are recorded in BDD.').'<br />'.
$this->l('- Purge this table clears all sources registered for more than one month.').'<br />'.
$this->l('(Normally all orders over a month are already inserted in Google Analytics)').'<br />'.
$this->l('- Finally the purge system does not erase the Google Analytics statistics, this has no effect on GooGle Analytics or stats display in the Back-Office.').'<br />'.'
</p>
<center><input type="submit" name="submitPurgeDB" value="'.$this->l('Purger').'" class="button" /></center>
</fieldset>
</form><br />';
}
/***************************************************************************************************************/
public function getshopDomain($http = false, $entities = false)
{
if (method_exists('Tools', 'getShopDomain')) return Tools::getShopDomain($http, $entities);
else return Tools::getHttpHost($http, $entities);
}
public function displayPurgeConf()
{
$this->_html .= '
<div class="conf confirm">'.$this->l('La purge a été correctement effectuée.').'</div>';
}
public function purgeDB()
{
$table = 'ganalyticscoms';
$carts = Db::getInstance()->ExecuteS('SELECT `id_cart` FROM `'._DB_PREFIX_.'cart` WHERE DATE(date_add) < (CURDATE() - INTERVAL 1 MONTH)');
if (count($carts))
{
$list = '';
foreach ($carts as $cart)
$list .= (int)$cart['id_cart'].', ';
$list = rtrim($list, ', ');
if (!Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.$table.'` WHERE `id_cart` IN ('.$list.')'))
$this->_postErrors[] = $this->l('Une erreur est survenue, la purge ne s\'est pas effectuée correctement.');
}
}
public function checkVersion($type)
{
$version = Tools::substr(_PS_VERSION_, 0, 3);
if ('is_1.3' == $type) return ($version < 1.4) ? true : false;
elseif ('is_1.4' == $type) return ($version < 1.5) ? true : false;
elseif ('is_1.5' == $type) return ($version >= 1.5) ? true : false;
}
public function query2tab($query)
{
$tab_params = array();
$query_params = explode('&', $query);
foreach ($query_params as $param)
{
$explode_param = explode('=', $param);
$tab_params[$explode_param[0]] = isset($explode_param[1]) ? $explode_param[1] : '';
}
return $tab_params;
}
public function getUtmParams($params)
{
$utm_params = $sep = '';
$utm_list = array('utm_source', 'utm_medium', 'utm_campaign', 'utm_content', 'utm_term');
foreach ($params as $k_param => $param)
if (in_array($k_param, $utm_list))
{
$utm_params .= $sep.$k_param.'='.$param;
$sep = '&';
}
return $utm_params;
}
public function writeLogs($file, $logs)
{
if (is_array($logs))
foreach ($logs as $log)
$this->writeLogs($file, $log);
else
@file_put_contents(realpath(dirname(__FILE__)).'/'.$file, $logs."\n", FILE_APPEND);
}
}

View File

@ -0,0 +1,36 @@
<?php
/*
* 2007-2011 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-2011 PrestaShop SA
* @version Release: $Revision: 7233 $
* @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,46 @@
<?php
global $_MODULE;
$_MODULE = array();
$_MODULE['<{ganalyticsreport}prestashop>ga-results_f37c41ea897ac9887ace853cbe21ff56'] = 'Visite';
$_MODULE['<{ganalyticsreport}prestashop>ga-results_a92a79b1e5e6f52ee3bcc75983525e93'] = 'Visualizzazioni di pagina';
$_MODULE['<{ganalyticsreport}prestashop>ga-results_010e26794a601bfb982adb0ca084a1f6'] = 'Pagine/visita';
$_MODULE['<{ganalyticsreport}prestashop>ga-results_05fb406703640ed24cc72aca2cf7f79b'] = 'Frequenza di rimbalzo';
$_MODULE['<{ganalyticsreport}prestashop>ga-results_2fef3057e2d679a65b84e386a91bfb78'] = 'Durata media visita';
$_MODULE['<{ganalyticsreport}prestashop>ga-results_4ee10ad2789b2938e8ba49bc2a8b46f5'] = 'Nuove visite';
$_MODULE['<{ganalyticsreport}prestashop>ga-results_3bb1503332637805beddb73a2dd1fe1b'] = 'Conversione';
$_MODULE['<{ganalyticsreport}prestashop>ga-results_31112aca11d0e9e6eb7db96f317dda49'] = 'Transazioni';
$_MODULE['<{ganalyticsreport}prestashop>ga-results_697bde7ec4cb068417d4c5e745df89ee'] = 'Entrate';
$_MODULE['<{ganalyticsreport}prestashop>ga-results_cd065fe1ed0512f2a632c79c535905c1'] = 'Valore medio';
$_MODULE['<{ganalyticsreport}prestashop>ga-results_15_f37c41ea897ac9887ace853cbe21ff56'] = 'Visite';
$_MODULE['<{ganalyticsreport}prestashop>ga-results_15_a92a79b1e5e6f52ee3bcc75983525e93'] = 'Visualizzazioni di pagina';
$_MODULE['<{ganalyticsreport}prestashop>ga-results_15_010e26794a601bfb982adb0ca084a1f6'] = 'Pagine / visita';
$_MODULE['<{ganalyticsreport}prestashop>ga-results_15_05fb406703640ed24cc72aca2cf7f79b'] = 'Frequenza di rimbalzo';
$_MODULE['<{ganalyticsreport}prestashop>ga-results_15_2fef3057e2d679a65b84e386a91bfb78'] = 'Durata media visita';
$_MODULE['<{ganalyticsreport}prestashop>ga-results_15_4ee10ad2789b2938e8ba49bc2a8b46f5'] = 'Nuove visite';
$_MODULE['<{ganalyticsreport}prestashop>ga-results_15_3bb1503332637805beddb73a2dd1fe1b'] = 'Conversione';
$_MODULE['<{ganalyticsreport}prestashop>ga-results_15_31112aca11d0e9e6eb7db96f317dda49'] = 'Transazioni';
$_MODULE['<{ganalyticsreport}prestashop>ga-results_15_697bde7ec4cb068417d4c5e745df89ee'] = 'Entrate';
$_MODULE['<{ganalyticsreport}prestashop>ga-results_15_cd065fe1ed0512f2a632c79c535905c1'] = 'Valore medio';
$_MODULE['<{ganalyticsreport}prestashop>ganalyticsreport_e5c483950bfe8990756c63f78e338d35'] = 'Google Analytics Report';
$_MODULE['<{ganalyticsreport}prestashop>ganalyticsreport_620bc018bf80308f682f91df6b816e67'] = 'Realizzazione';
$_MODULE['<{ganalyticsreport}prestashop>ganalyticsreport_e7785de91330713fc2d12404bb6bd556'] = 'Impostazioni';
$_MODULE['<{ganalyticsreport}prestashop>ganalyticsreport_73732af11836e1d28382c85553794bfd'] = 'ID monitoraggio';
$_MODULE['<{ganalyticsreport}prestashop>ganalyticsreport_740b57fb19eeca4ffd4c612065a31e41'] = '(UA-xxxxxxx-xx)';
$_MODULE['<{ganalyticsreport}prestashop>ganalyticsreport_13b4d4758c868109fd1c91c1948c5cb9'] = 'ID profilo';
$_MODULE['<{ganalyticsreport}prestashop>ganalyticsreport_dd8afbd38b01a7b4eb27f45fc036b881'] = 'logs';
$_MODULE['<{ganalyticsreport}prestashop>ganalyticsreport_aed88202e2432ee2a613f9120ef7486b'] = 'Applica';
$_MODULE['<{ganalyticsreport}prestashop>ganalyticsreport_f37c41ea897ac9887ace853cbe21ff56'] = 'Visite';
$_MODULE['<{ganalyticsreport}prestashop>ganalyticsreport_a92a79b1e5e6f52ee3bcc75983525e93'] = 'Visualizzazioni di pagina';
$_MODULE['<{ganalyticsreport}prestashop>ganalyticsreport_010e26794a601bfb982adb0ca084a1f6'] = 'Pagine / visita';
$_MODULE['<{ganalyticsreport}prestashop>ganalyticsreport_05fb406703640ed24cc72aca2cf7f79b'] = 'Frequenza di rimbalzo';
$_MODULE['<{ganalyticsreport}prestashop>ganalyticsreport_2fef3057e2d679a65b84e386a91bfb78'] = 'Durata media visita';
$_MODULE['<{ganalyticsreport}prestashop>ganalyticsreport_4ee10ad2789b2938e8ba49bc2a8b46f5'] = 'Nuove visite';
$_MODULE['<{ganalyticsreport}prestashop>ganalyticsreport_3bb1503332637805beddb73a2dd1fe1b'] = 'Conversione';
$_MODULE['<{ganalyticsreport}prestashop>ganalyticsreport_31112aca11d0e9e6eb7db96f317dda49'] = 'Transazioni';
$_MODULE['<{ganalyticsreport}prestashop>ganalyticsreport_b10829a23a83471f38cde666afdffc93'] = 'Entrate';
$_MODULE['<{ganalyticsreport}prestashop>ganalyticsreport_cd065fe1ed0512f2a632c79c535905c1'] = 'Valore medio';
$_MODULE['<{ganalyticsreport}prestashop>ganalyticsreport_af75280380b650bcbd39366b7f61cb9d'] = 'Sorgenti di traffico';
$_MODULE['<{ganalyticsreport}prestashop>ganalyticsreport_063d3f237acc3117c27c8da330ca6870'] = 'Sorgenti di entrate';
$_MODULE['<{ganalyticsreport}prestashop>ganalyticsreport_7f5c883c38342a547d997e8d38aa9313'] = 'Valore medio';
$_MODULE['<{ganalyticsreport}prestashop>ganalyticsreport_697bde7ec4cb068417d4c5e745df89ee'] = 'Entrate';

View File

@ -0,0 +1,253 @@
<?php
if (!class_exists('X_GoogleAnalyticsMobile', false))
{
class X_GoogleAnalyticsMobile
{
/** Google Analytics __utma cookie */
private $__utma;
/** 2 years (2 years is the default in Google Analytics) */
private $__utma_c_time = 63072000;
/** Google Analytics __utmb cookie */
private $__utmb;
/** 30 minutes (30 minutes is the default in Google Analytics) */
private $__utmb_c_time = 1800;
/** Google Analytics __utmc cookie */
private $__utmc;
/** Google Analytics __utmz cookie */
private $__utmz;
/** 7 days (6 months is the default in Google Analytics) */
private $__utmz_c_time = 604800;
/** Site host */
private $ga_utmhn;
/** Google Analytics account */
private $ga_utmac;
/** Google Analytics tracking code version (script based on 4.3.1 version at the first dev) */
private $ga_utmwv = '5.4.2';
/** Google Analytics hash for domain */
private $ga_hash;
/** Random number used to link Analytics GIF requests with AdSense */
private $ga_utmhid;
/** Referral, complete URL */
private $ga_utmr;
private $ga_img = 'http://www.google-analytics.com/__utm.gif';
private $ga_search = array(array('google','q'),array('yahoo','p'),array('msn','q'),array('bing','q'),array('aol','query'),
array('aol','encquery'),array('lycos','query'),array('ask','q'),array('altavista','q'),array('netscape','query'),
array('cnn','query'),array('looksmart','qt'),array('about','terms'),array('mamma','query'),array('alltheweb','q'),
array('gigablast','q'),array('voila','rdata'),array('virgilio','qs'),array('live','q'),array('baidu','wd'),
array('alice','qs'),array('yandex','text'),array('najdi','q'),array('aol','q'),array('club-internet','query'),
array('mama','query'),array('seznam','q'),array('search','q'),array('wp','szukaj'),array('onet','qt'),
array('netsprint','q'),array('google.interia','q'),array('szukacz','q'),array('yam','k'),array('pchome','q'),
array('kvasir','searchExpr'),array('sesam','q'),array('ozu','q'),array('terra','query'),array('nostrum','query'),
array('mynet','q'),array('ekolay','q'),array('search.ilse','search_for'));
private $ga_referer;
private $time;
private $ga_set_params;
private $__utmhid;
/** private $store_name; */
private $tracking_codes = array();
public function __construct($ga_utmac, $ga_utmhn, $referer, $gclid, $utm_params = '', $URI = null, $ga_params = array())
{
$this->ga_utmac = $ga_utmac;
$this->ga_utmhn = $ga_utmhn;
$this->ga_hash = $this->Hash($ga_utmhn);
$this->ga_utmhid = rand(1000000000, 2147483647);
$this->ga_utmr = (!empty($referer) ? $referer : 0);
// Rebuild $_GET params (gclid|utm_source|utm_medium|utm_campaign|utm_content|utm_term)
$_GET['gclid'] = (isset($gclid) && !empty($gclid)) ? $gclid : false;
if (!empty($utm_params))
{
$tab_utm_params = $this->UtmParams2tab($utm_params);
foreach ($tab_utm_params as $param_name => $param) $_GET[$param_name] = $param;
}
// Set the time for the request
$this->time = time();
// Set the page URI that is request
if ($URI == null) $URI = $_SERVER['REQUEST_URI'];
// Set the referer page
$this->ga_referer = $referer;
// Set the visitor source
$source = $this->GetTrafficSource();
// Set the new traffic source
if ($source['utmgclid'] != '') $source_str = 'utmgclid='.$source['utmgclid'];
else $source_str = 'utmcsr='.$source['utmcsr'];
$source_str .= '|utmccn='.$source['utmccn'].'|utmcmd='.$source['utmcmd'];
if ($source['utmctr'] != '') $source_str .= '|utmctr='.$source['utmctr'];
if ($source['utmcct'] != '') $source_str .= '|utmcct='.$source['utmcct'];
// Set all extra parameters like screen resolution, color depth
$this->ga_set_params = '';
if (is_array($ga_params)) foreach ($ga_params as $key => $value) $this->ga_set_params .= '&'.$key.'='.rawurlencode($value);
// Check if Google Analytics cookie '__utma' already exists
if (isset($_COOKIE['__utma']))
{
// Save cookies to local variable
$this->__utma = $_COOKIE['__utma'];
$this->__utmb = isset($_COOKIE['__utmb']) ? $_COOKIE['__utmb'] : null;
$this->__utmz = $_COOKIE['__utmz'];
$__utmb = split('\.', $this->__utmb);
if (strpos($this->__utmz, 'utmgclid') > -1) $pos = strpos($this->__utmz, 'utmgclid');
else $pos = strpos($this->__utmz, 'utmcsr');
$__utmz = split('\.', Tools::substr($this->__utmz, 0, $pos));
$__utmz[4] = Tools::substr($this->__utmz, $pos);
$__utma = split('\.', $this->__utma);
// Check if Google Analytics 'session' cookie '__utmc' exists, if not create one and update the number of visits in cookie: '__utma'
if (!isset($_COOKIE['__utmc']))
{
// Increase the number of visits
$__utma[5] = $__utma[5] + 1;
// Update the time of the visit
$__utma[3] = $__utma[4];
$__utma[4] = $this->time;
// Save cookies
$this->__utma = join('.', $__utma);
@setcookie('__utma', $this->__utma, $this->time + $this->__utma_c_time, '/', '.'.$this->ga_utmhn);
@setcookie('__utmc', $__utma[0], 0, '/', '.'.$this->ga_utmhn);
// Update '__utmb' cookie with the number of pageviews or create a new cookie
if (isset($_COOKIE['__utmb'])) $__utmb[1] = 1;
else $__utmb = array($__utma[0], 1, 10, $this->time);
}
else $__utmb[1] = $__utmb[1] + 1; // Increase the number of pageviews in '__utmb' cookie
// Update the traffic source
if ($__utmz[4] != $source_str && $source['utmcsr'] != '(direct)') $__utmz = array($__utmz[0], $this->time, $__utma[5], $__utmz[3] + 1, $source_str);
// Save cookies '__utmb' and '__utmz'
$this->__utmb = join('.', $__utmb);
@setcookie('__utmb', $this->__utmb, $this->time + $this->__utmb_c_time, '/', '.'.$this->ga_utmhn);
$this->__utmz = join('.', $__utmz);
@setcookie('__utmz', $this->__utmz, $this->time + $this->__utmz_c_time, '/', '.'.$this->ga_utmhn);
}
else
{
// No Google Analytics cookies exists, create new ones and save them i local variables
$cookieRandom = rand(1000000000, 2147483647);
$this->__utma = $this->ga_hash.'.'.$cookieRandom.'.'.$this->time.'.'.$this->time.'.'.$this->time.'.1';
$this->__utmb = $this->ga_hash.'.1.10.'.$this->time;
$this->__utmc = $this->ga_hash;
$this->__utmz = $this->ga_hash.'.'.$this->time.'.1.1.'.$source_str;
@setcookie('__utma', $this->__utma, $this->time + $this->__utma_c_time, '/', '.'.$this->ga_utmhn);
@setcookie('__utmb', $this->__utmb, $this->time + $this->__utmb_c_time, '/', '.'.$this->ga_utmhn);
@setcookie('__utmc', $this->__utmc, 0, '/', '.'.$this->ga_utmhn);
@setcookie('__utmz', $this->__utmz, $this->time + $this->__utmz_c_time, '/', '.'.$this->ga_utmhn);
}
}
public function Hash($d)
{
if (!$d || $d == '') return 1;
$h = 0;
$g = 0;
for ($i = Tools::strlen($d) - 1; $i >= 0; $i--)
{
$c = (int)ord($d[$i]);
$h = (($h << 6) & 0xfffffff) + $c + ($c << 14);
$g = ($h & 0xfe00000);
if ($g != 0) $h = ($h ^ ($g >> 21));
}
return $h;
}
/**
Here is how GA updates the campaign tracking cookie based on referrer:
Direct traffic is always overwritten by referrals, organic and tagged campaigns and does not overwrite existing campaign information
New campaign, referral or organic link that brings a visitor to the site always overrides the existing campaign cookie
http://www.fantazia-shop.fr/chemise-ethnique-homme/994-k1086-chemise-mixte-petit-col-mao-noire-tissee-comme-du-lin.html?codesf=30860&utm_medium=cpc&utm_campaign=Shopping-flux&utm_term=Chemise+mixte+petit+col+mao+noire+tissee+comme+du+lin&utm_source=Twenga%28via+Shopping+Flux%29 */
public function GetTrafficSource()
{
if (isset($_GET['utm_source']) && isset($_GET['utm_medium']))
{
// The traffic source i set in the URL
$utmccn = isset($_GET['utm_campaign']) ? $_GET['utm_campaign'] : '(not set)';
$utmcct = isset($_GET['utm_content']) ? $_GET['utm_content'] : '(not set)';
return array('utmgclid'=>'', 'utmcsr'=>$_GET['utm_source'], 'utmccn'=>$utmccn, 'utmcmd'=>$_GET['utm_medium'], 'utmctr'=>$_GET['utm_term'], 'utmcct'=>$utmcct);
}
elseif ($this->ga_referer != '')
{
// The treffic source is from a referral site
$search_engine = $this->GetSearchEngine();
// Check if it's a search engine
if ($search_engine) return $search_engine;
else
{
// It's not a search engine and it's a new visit. Set the referer.
$ref = $this->GetReferer();
if (Tools::substr($ref['host'], 0, 4) == 'www.') $ref['host'] = Tools::substr($ref['host'], 4); // Remove www from URL
return array('utmgclid'=>'', 'utmcsr'=>$ref['host'], 'utmccn'=>'(referral)', 'utmcmd'=>'referral', 'utmctr'=>'', 'utmcct'=>$ref['uri']);
}
}
return array('utmgclid'=>'', 'utmcsr'=>'(direct)', 'utmccn'=>'(direct)', 'utmcmd'=>'(none)', 'utmctr'=>'', 'utmcct'=>'');
}
public function GetSearchEngine()
{
$ref = $this->GetReferer();
$nb_ga_search = count($this->ga_search);
for ($ii = 0; $ii < $nb_ga_search; $ii++)
{
if (strpos(Tools::strtolower($ref['host']), Tools::strtolower($this->ga_search[$ii][0])) > -1)
{
$test1 = strpos($ref['referer'], '?'.$this->ga_search[$ii][1].'=');
$test2 = strpos($ref['referer'], '&'.$this->ga_search[$ii][1].'=');
$i = ($test1 > -1) ? $test1 : $test2;
if ($i > -1)
{
$k = Tools::substr($ref['referer'], $i + Tools::strlen($this->ga_search[$ii][1]) + 2, Tools::strlen($ref['referer']));
$i = strpos($k, '&');
if ($i > -1) $k = Tools::substr($k, 0, $i);
if ($_GET['gclid']) return array('utmgclid'=>$_GET['gclid'], 'utmcsr'=>'', 'utmccn'=>'(not set gclid)', 'utmcmd'=>'(not set)', 'utmctr'=>$k, 'utmcct'=>'');
else return array('utmgclid'=>'', 'utmcsr'=>$this->ga_search[$ii][0], 'utmccn'=>'(organic)', 'utmcmd'=>'organic', 'utmctr'=>$k, 'utmcct'=>'');
}
}
}
return false;
}
public function GetReferer()
{
$referer_tmp = $this->ga_referer;
$pos = strpos($referer_tmp, '://');
if ($pos > 0) $referer_tmp = Tools::substr($referer_tmp, $pos + 3);
$pos = strpos($referer_tmp, '/');
if ($pos > 0) return array('host'=>Tools::substr($referer_tmp, 0, $pos), 'uri'=>Tools::substr($referer_tmp, $pos), 'referer'=>$this->ga_referer);
else return array('host'=>$referer_tmp, 'uri'=>'', 'referer'=>$this->ga_referer);
}
public function UtmParams2tab($query)
{
$tab_params = array();
$query_params = explode('&', $query);
foreach ($query_params as $param)
{
$explode_param = explode('=', $param);
$tab_params[$explode_param[0]] = isset($explode_param[1]) ? $explode_param[1] : '';
}
return $tab_params;
}
public function SetTransaction($order_id, $amount, $shipping, $tax, $city, $region, $country, $currency)
{
// Generate code to set a new transaction in Google Analytics
$this->tracking_codes[] = $this->ga_img.'?utmwv='.$this->ga_utmwv.'&utmn='.rand(1000000000, 9999999999).'&utmhn='.$this->ga_utmhn.'&utmt=tran&utmtid='.$order_id.'&utmtto='.$amount.'&utmttx='.$tax.'&utmtsp='.$shipping.'&utmtci='.rawurlencode($city).'&utmtrg='.rawurlencode($region).'&utmtco='.rawurlencode($country).$this->ga_set_params.'&utmhid='.$this->ga_utmhid.'&utmr='.$this->ga_utmr.'&utmcu='.$currency.'&utmac='.$this->ga_utmac.'&utmcc=__utma%3D'.$this->__utma.'%3B%2B__utmz%3D'.rawurlencode($this->__utmz).'%3B';
}
public function SetTransactionItem($order_id, $item_id, $category, $name, $price, $quantity, $currency)
{
// Generate code to set a new transaction item in Google Analytics, you must call the function SetTransaction before you call this one.
$this->tracking_codes[] = $this->ga_img.'?utmwv='.$this->ga_utmwv.'&utmn='.rand(1000000000, 9999999999).'&utmhn='.$this->ga_utmhn.'&utmt=item&utmtid='.$order_id.'&utmipc='.rawurlencode($item_id).'&utmipn='.rawurlencode($name).'&utmiva='.rawurlencode($category).'&utmipr='.$price.'&utmiqt='.$quantity.$this->ga_set_params.'&utmhid='.$this->ga_utmhid.'&utmr='.$this->ga_utmr.'&utmcu='.$currency.'&utmac='.$this->ga_utmac.'&utmcc=__utma%3D'.$this->__utma.'%3B%2B__utmz%3D'.rawurlencode($this->__utmz).'%3B';
}
public function GetTrackingCode()
{
// Return the Google Analytics code for this request
return $this->tracking_codes;
}
}
}
?>

View File

@ -0,0 +1,126 @@
<?php
if (!function_exists('X_format'))
{
function X_format($val, $typ, $sup = '')
{
$return = $val;
if ('nl2p' === $typ && !strchr($return, '<ul>'))
{
$return = str_replace("\r\n", '</p><p>', $return);
$return = str_replace("\n", '</p><p>', $return);
$return = str_replace("\r", '</p><p>', $return);
$return = '<p>'.$return.'</p>';
}
elseif ('br2nl' === $typ)
{
$return = preg_replace('/<br>/i', "\n", $return);
$return = preg_replace('/<br \/>/i', "\n", $return);
$return = preg_replace('/<br>\//i', "\n", $return);
$return = preg_replace('/<p/i', "\n".'<p', $return);
$return = str_replace("\r", "\n", $return);
$return = preg_replace("/\n{2,}/", "\n", $return);
}
elseif ('var_dump' === $typ)
{
if (!$sup)
$r = '<ul><li>';
if (is_array($val))
{
$r = 'array('.count($val).')<ul>';
foreach ($val as $k => $v)
$r .= '<li><strong>'.$k.'</strong> : '.X_format($v, 'var_dump', 1);
$r .= '</ul>';
}
elseif (is_object($val))
{
$r = 'object('.count(get_object_vars($val)).')<ul>';
foreach ($val as $k => $v)
$r .= '<li><strong>> '.$k.'</strong> : '.X_format($v, 'var_dump', 1);
$r .= '</ul>';
}
else
$r = gettype($val).'('.Tools::strlen($val).') "'.$val.'"</li>';
if (!$sup)
$r .= '</ul>';
$return = $r;
}
elseif ('sql' === $typ)
{
$return = htmlentities($return);
$return = preg_replace('/(from|order by|limit|inner join|left join|where|having|group by)/i', '<br>\\1', $return);
}
return $return;
}
}
if (!function_exists('X_cutHtmlText'))
{
function X_cutHtmlText($text, $length, $ending = '...', $exact = false)
{
if (Tools::strlen(preg_replace('/<.*?>/', '', $text)) <= $length)
return $text;
preg_match_all('/(<.+?>)?([^<>]*)/is', $text, $matches, PREG_SET_ORDER);
$total_length = 0;
$arr_elements = array();
$truncate = '';
foreach ($matches as $element)
{
if (!empty($element[1]))
{
if (preg_match('/^<\s*\/([^\s]+?)\s*>$/s', $element[1], $element2))
{
$pos = array_search($element2[1], $arr_elements);
if ($pos !== false)
unset($arr_elements[$pos]);
}
else if (preg_match('/^<\s*([^\s>!]+).*?>$/s', $element[1], $element2))
{
array_unshift($arr_elements,
Tools::strtolower($element2[1]));
}
$truncate .= $element[1];
}
$content_length = Tools::strlen(preg_replace('/(&[a-z]{1,6};|&#[0-9]+;)/i', ' ', $element[2]));
if ($total_length >= $length)
break;
elseif ($total_length + $content_length > $length)
{
$left = $total_length > $length ? $total_length - $length : $length - $total_length;
$entities_length = 0;
if (preg_match_all('/&[a-z]{1,6};|&#[0-9]+;/i', $element[2], $element3, PREG_OFFSET_CAPTURE))
{
foreach ($element3[0] as $entity)
{
if ($entity[1] + 1 - $entities_length <= $left)
{
$left--;
$entities_length += Tools::strlen($entity[0]);
}
else
break;
}
}
$truncate .= Tools::substr($element[2], 0, $left + $entities_length);
break;
}
else
{
$truncate .= $element[2];
$total_length += $content_length;
}
}
if (!$exact)
{
$spacepos = strrpos($truncate, ' ');
if (isset($spacepos))
$truncate = Tools::substr($truncate, 0, $spacepos);
}
$truncate .= $ending;
foreach ($arr_elements as $element) $truncate .= '</'.$element.'>';
return $truncate;
}
}
?>

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 608 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@ -0,0 +1 @@
.language_flags{display:none}

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 257 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 263 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 286 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 301 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 256 B

View File

View File

@ -0,0 +1,47 @@
function getFlashVersion(){
try {
try {
var axo = new ActiveXObject('ShockwaveFlash.ShockwaveFlash.6');
try { axo.AllowScriptAccess = 'always'; }
catch(e) { return '6.0 r0'; }
} catch(e) {}
return new ActiveXObject('ShockwaveFlash.ShockwaveFlash').GetVariable('$version').replace(/\D+/, '').match(/^,?(.+),?$/)[1];
} catch(e) {
try {
if(navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin){
return (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]).description.replace(/\D+/, '').match(/^,?(.+),?$/)[1];
}
} catch(e) {}
}
return '0.0 r0';
}
function SetCookie (name, value) {
var argv=SetCookie.arguments;
var argc=SetCookie.arguments.length;
var expires=(argc > 2) ? argv[2] : null;
var path=(argc > 3) ? argv[3] : null;
var domain=(argc > 4) ? argv[4] : null;
var secure=(argc > 5) ? argv[5] : false;
document.cookie=name+"="+escape(value)+
((expires==null) ? "" : ("; expires="+expires.toGMTString()))+
((path==null) ? "" : ("; path="+path))+
((domain==null) ? "" : ("; domain="+domain))+
((secure==true) ? "; secure" : "");
}
$('document').ready(function(){
var ga_extra_params = "utmcs=" + (document.inputEncoding ? document.inputEncoding : '-');
ga_extra_params += "&utmsr=" + screen.width + "x" + screen.height;
ga_extra_params += "&utmvp=" + document.documentElement.clientWidth + "x" + document.documentElement.clientHeight;
ga_extra_params += "&utmsc=" + screen.colorDepth + "-bit";
ga_extra_params += "&utmul=" + (navigator.browserLanguage ? navigator.browserLanguage : navigator.language);
ga_extra_params += "&utmje=" + (navigator.javaEnabled() == true ? 1 : 0);
ga_extra_params += "&utmfl=" + getFlashVersion().replace(/,/g,'.');
var date_exp = new Date();
date_exp.setTime(date_exp.getTime()+15778800); // 6 mois
SetCookie("ga_extra_params",ga_extra_params,date_exp,'/');
});

View File

View File

@ -0,0 +1,3 @@
<!-- MODULE ganalyticscom -->
<script type="text/javascript" src="{$module_template_dir}views/js/ganalytics.js"></script>
<!-- /MODULE ganalyticscom -->

View File

@ -1,2 +0,0 @@
IDENTIFIANT;DATE;COLIS;CODE PRODUIT;REFERENCE 1;REF DESTINATAIRE;NOM ou RAISON SOCIALE;NOM DU CONTACT;ADRESSE 1;ADRESSE 2;ADRESSE 3;ZIPCODE;VILLE;CODE PAYS;REFERENCE 2;CHARGEUR;CHARGEUR SECONDAIRE;TRACKID
1;11/05/2016;1000001;FDBP;;TEST;TEST;;TEST;;;93100;TEST;FR;;2504846601;0;009H2388
1 IDENTIFIANT DATE COLIS CODE PRODUIT REFERENCE 1 REF DESTINATAIRE NOM ou RAISON SOCIALE NOM DU CONTACT ADRESSE 1 ADRESSE 2 ADRESSE 3 ZIPCODE VILLE CODE PAYS REFERENCE 2 CHARGEUR CHARGEUR SECONDAIRE TRACKID
2 1 11/05/2016 1000001 FDBP TEST TEST TEST 93100 TEST FR 2504846601 0 009H2388

4
modules/gls/test.log Normal file
View File

@ -0,0 +1,4 @@
array (
'address1' => '<b>Adresse1</b> requis',
'city' => '<b>Ville</b> requis',
)

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 123 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -2612,6 +2612,16 @@ main#categorycms { margin-bottom: 30px }
border-bottom: 1px solid #cccccc;
margin-bottom: 15px;
text-align: center;
}
.content_prices .solde {
background: url('../img/bg_soldes.png') center center no-repeat;
display: block;
font-family: 'pompiere_regular';
font-size: 18px;
margin: 0 auto;
padding: 10px;
text-transform: uppercase;
width: 156px;
}
.our_price_display {
color: #e4535d;

View File

@ -485,6 +485,7 @@ header.page-heading.order-process { padding: 25px 0 0 0 }
overflow: hidden;
padding: 0 5px;
position: relative;
text-align: center;
}
.product-container .border .price-percent-reduction {
position: absolute;
@ -497,10 +498,27 @@ header.page-heading.order-process { padding: 25px 0 0 0 }
text-align: center;
width: 70px;
}
.product-container .product-img img {
border: 1px solid #d6d6d6;
margin: 0 auto;
.product-container .product-img {
display: inline-block;
position: relative;
}
.product-container .product-img img {
border: 1px solid #d6d6d6;
margin: 0 auto;
}
.product-container .product-img .solde {
background: rgba(0, 0, 0, 0.7);
bottom: 0;
color: #6ac5bb;
font-family: 'pompiere_regular';
font-size: 20px;
left: 0;
padding: 5px 0 3px 0;
position: absolute;
right: 0;
text-align: center;
text-transform: uppercase;
}
.product-container .product-infos {
position: relative;
text-align: center;

View File

@ -18,7 +18,11 @@
<glyph unicode="&#xe608;" glyph-name="coins30" d="M1022.863 378.438c-4.098 18.171-18.845 29.613-40.418 34.356-17.976 3.948-49.545 3.859-97.868-18.992-3.37-1.462-226.836-96.814-268.536-114.697-6.426-2.753-8.642-11.845-8.642-11.845-55.393-152.375-213.752-89.197-213.572-87.12 81.842-3.537 140.305 41.332 158.002 76.418 41.328 81.941-51.509 71.225-102.144 71.79-189.655 2.135-186.874-44.364-288.579-78.307l-154.182-59.438c-3.944-1.618-5.755-5.189-6.595-8.971-0.84-3.784-0.052-7.745 2.172-10.918l10.119-14.433c25.223-35.976 55.042-91.378 81.3-127.635 1.691-2.335 4.074-4.083 6.814-4.997 0.606-0.208 1.408-0.44 2.395-0.661 3.532-0.773 7.329-0.847 10.253-0.16l112.765 28.439c5.93 1.408 291.398-86.459 401.036-10.11l337.357 255.803c13.335 10.552 27.122 21.461 40.893 32.147 15.029 11.669 21.351 31.946 17.43 49.328zM626.425 886.062c-75.834 0-140.221-48.819-163.568-116.726 71.827-21.032 124.304-87.36 124.304-165.987 0-19.702-3.34-38.612-9.406-56.255 15.444-4.522 31.766-6.991 48.674-6.991 95.536 0 172.983 77.445 172.983 172.979s-77.449 172.981-172.987 172.981zM661.154 619.423c0-7.076-5.735-12.813-12.811-12.813h-23.599c-7.076 0-12.809 5.735-12.809 12.813v143.781l-14.604-7.884c-3.474-1.876-7.624-2.045-11.236-0.457s-6.298 4.754-7.266 8.581l-4.663 18.377c-1.447 5.707 1.18 11.667 6.372 14.444l40.674 21.771c1.858 0.994 3.935 1.516 6.045 1.516h21.084c7.076 0 12.811-5.733 12.811-12.811v-187.318h0.002zM389.271 757.558c-93.141 0-168.645-75.507-168.645-168.647s75.504-168.647 168.645-168.647c93.143 0 168.651 75.507 168.651 168.647s-75.509 168.647-168.651 168.647zM423.127 497.596c0-6.9-5.594-12.492-12.49-12.492h-23.007c-6.898 0-12.49 5.592-12.49 12.492v140.182l-14.238-7.686c-3.387-1.83-7.431-1.993-10.955-0.446s-6.14 4.635-7.087 8.364l-4.546 17.918c-1.41 5.564 1.152 11.375 6.214 14.082l39.658 21.227c1.813 0.97 3.836 1.479 5.893 1.479h20.558c6.898 0 12.49-5.592 12.49-12.49v-182.63z" />
<glyph unicode="&#xe609;" glyph-name="lock39" d="M512.003 960c-165.121 0-299.462-134.336-299.462-299.462v-171.031c0-1.944-2.398-5.218-4.282-5.845-16.194-5.4-29.346-10.080-41.385-14.721-14.357-5.535-25.186-21.446-25.186-37.011v-392.98c0-15.459 10.759-31.384 25.025-37.038 110.38-43.739 226.552-65.913 345.289-65.913s234.909 22.178 345.294 65.918c14.261 5.652 25.014 21.573 25.014 37.032v392.98c0 15.566-10.827 31.476-25.191 37.017-12.044 4.641-25.194 9.321-41.376 14.721-1.879 0.626-4.277 3.903-4.277 5.846v171.029c-0.009 165.121-134.341 299.457-299.462 299.457zM430.437 312.242c0 45.079 36.518 81.559 81.561 81.559 45.039 0 81.557-36.476 81.557-81.559 0-29.87-16.845-54.879-40.78-69.056v-134.843c0-22.542-18.239-40.78-40.78-40.78-22.542 0-40.78 18.237-40.78 40.78v134.843c-23.933 14.177-40.78 39.186-40.78 69.056zM708.494 660.543v-147.568c-64.436 13.865-130.543 20.887-196.465 20.893-65.892 0-131.985-7.024-196.521-20.877v147.552c0 108.347 88.144 196.489 196.489 196.489 108.344 0.002 196.496-88.142 196.496-196.489z" />
<glyph unicode="&#xe60a;" glyph-name="logistics3" d="M379.422 331.963c-47.266 0-85.464-38.333-85.464-85.601 0-47.127 38.198-85.464 85.464-85.464s85.464 38.336 85.464 85.464c-0.002 47.268-38.198 85.601-85.464 85.601zM379.422 203.63c-23.634 0-42.734 19.238-42.734 42.735 0 23.631 19.1 42.732 42.734 42.732 23.632 0 42.732-19.101 42.732-42.732-0.002-23.497-19.1-42.735-42.732-42.735zM1024 395.192v-91.258c0-22.764-18.454-41.219-41.221-41.219h-44.106c-7.969 54.687-55.097 96.731-111.982 96.731-56.745 0-103.876-42.046-111.845-96.731h-223.552c-7.969 54.687-55.099 96.731-111.845 96.731s-103.876-42.046-111.844-96.731h-55.236c-22.766 0-41.219 18.454-41.219 41.219v91.258h852.85zM826.801 331.963c-47.266 0-85.601-38.333-85.601-85.601 0-47.127 38.336-85.464 85.601-85.464 47.127 0 85.462 38.336 85.462 85.464 0 47.268-38.335 85.601-85.462 85.601zM826.801 203.63c-23.634 0-42.732 19.238-42.732 42.735 0 23.631 19.098 42.732 42.732 42.732 23.495 0 42.732-19.101 42.732-42.732 0-23.497-19.237-42.735-42.732-42.735zM1007.758 487.091l-161.994 160.211c-10.305 10.168-24.183 15.939-38.611 15.939h-81.753v30.641c0 22.807-18.412 41.219-41.219 41.219h-471.84c-22.672 0-41.219-18.414-41.219-41.219v-6.459l-167.273-19.279 296.401-38.597-300.25-29.827 299.192-42.538-299.192-25.941 171.132-32.276-0.012-80.988h852.851v30.093c0 14.702-5.908 28.716-16.213 39.021zM937.134 481.733h-156.774c-3.572 0-6.459 2.885-6.459 6.457v121.051c0 3.572 2.886 6.459 6.459 6.459h29.816c1.648 0 3.298-0.688 4.534-1.787l126.822-121.051c4.257-3.984 1.37-11.128-4.399-11.128z" />
<glyph unicode="&#xe60b;" glyph-name="menu61" d="M91.428 649.145h841.14c50.493 0 91.432 40.935 91.432 91.428s-40.935 91.428-91.432 91.428h-841.14c-50.493-0.004-91.428-40.935-91.428-91.432 0-50.493 40.935-91.424 91.428-91.424zM932.568 539.43h-841.14c-50.493 0-91.428-40.935-91.428-91.428 0-50.497 40.935-91.428 91.428-91.428h841.14c50.493 0 91.432 40.931 91.432 91.428 0 50.493-40.939 91.428-91.432 91.428zM932.568 246.859h-841.14c-50.493 0-91.428-40.931-91.428-91.428 0-50.493 40.935-91.428 91.428-91.428h841.14c50.493 0 91.432 40.935 91.432 91.428 0 50.497-40.939 91.428-91.432 91.428z" />
<glyph unicode="&#xe900;" glyph-name="youtube" d="M827.528 763.040h-631.080c-74.28 0-134.496-60.256-134.496-134.592v-360.888c0-74.336 60.216-134.592 134.496-134.592h631.080c74.304 0 134.512 60.256 134.512 134.592v360.888c0 74.336-60.208 134.592-134.512 134.592zM421.976 295.768v338.952l257.056-169.496-257.056-169.456z" />
<glyph unicode="&#xe901;" glyph-name="flag" d="M965.632 899.666c-7.482-11.335-14.537-22.855-21.403-34.434-78.845 29.612-151.574 53.524-237.11 41.874-68.279-9.304-128.347-49.57-174.693-98.625-26.876-28.445-49.38-60.22-69.21-93.913-86.106-4.213-170.134 3.664-254.106 23.737-5.075 1.219-9.749 1.186-13.984 0.298-9.978 0.592-20.183-3.451-26.946-14.44-79.968-129.922-144.472-270.961-166.299-423.018-0.527-3.664-0.313-7.068 0.214-10.313-4.773-12.344-1.888-26.542 13.928-33.706 142.409-64.448 301.137-75.53 451.707-33.903 0.449 0.121 0.791 0.339 1.223 0.473 10.205 1.711 19.519 8.26 23.359 21.032 17.11 56.845 34.741 113.666 58.478 168.142 1.13 2.61 1.821 5.168 2.271 7.701 6.089-0.573 11.808-1.186 16.942-1.776 74.958-8.723 148.295-27.782 221.444-45.884-17.216-117.892-28.177-237.056-44.458-351.973-5.497-38.831 53.826-55.561 59.377-16.369 41.111 290.224 45.62 611.302 212.436 864.010 21.959 33.265-31.388 64.074-53.167 31.088zM64.187 303.052c22.279 133.254 77.088 256.448 146.216 371.922 72.501-15.998 145.585-23.985 219.622-23.030-37.211-77.455-65.848-160.483-101.747-235.684-1.201-2.511-1.964-4.991-2.502-7.428-15.278-44.194 7.774-83.44 37.403-119.646 1.482-4.235 3.74-8.284 6.862-11.838 3.066-3.5 6.281-6.834 9.561-10.095-106.149-16.445-215.467-5.443-315.415 35.8zM443.427 295.021c-7.75 4.708-14.796 10.434-21.367 16.996-1.279 3.027-2.93 6.022-5.393 8.874-71.959 83.375-0.663 101.94 72.6 102.674-17.348-42.15-32.22-85.095-45.84-128.544zM801.022 433.958c-108.981 26.917-220.16 55.088-332.955 51.797-13.891-0.406-28.977-1.646-44.008-4.328 35.863 84.927 70.455 170.571 122.66 246.959 36.524 53.442 86.677 94.555 148.932 113.316 75.145 22.65 148.709-3.917 218.952-30.748-59.018-117.734-91.528-245.948-113.581-376.996z" />
<glyph unicode="&#xe902;" glyph-name="search" d="M683.841 842.832c-156.213 156.213-410.46 156.213-566.673 0-156.179-156.246-156.179-410.46 0-566.707 139.111-139.078 355.77-153.978 511.881-45.377 3.285-15.543 10.802-30.376 22.892-42.465l227.495-227.495c33.152-33.085 86.725-33.085 119.708 0 33.119 33.119 33.119 86.691 0 119.708l-227.495 227.563c-12.022 11.988-26.888 19.539-42.431 22.824 108.668 156.145 93.768 372.77-45.377 511.949zM612.016 347.95c-116.626-116.626-306.431-116.626-423.024 0-116.558 116.626-116.558 306.397 0 423.024 116.592 116.592 306.397 116.592 423.024 0 116.626-116.626 116.626-306.397 0-423.024z" />
<glyph unicode="&#xe903;" glyph-name="menu" d="M38.642 699.17h946.717c21.33 0 38.642 17.311 38.642 38.642s-17.311 38.642-38.642 38.642h-946.717c-21.33 0-38.642-17.311-38.642-38.642s17.311-38.642 38.642-38.642zM38.642 409.358h946.717c21.33 0 38.642 17.311 38.642 38.642s-17.311 38.642-38.642 38.642h-946.717c-21.33 0-38.642-17.311-38.642-38.642s17.311-38.642 38.642-38.642zM38.642 119.547h946.717c21.33 0 38.642 17.311 38.642 38.642s-17.311 38.642-38.642 38.642h-946.717c-21.33 0-38.642-17.311-38.642-38.642s17.311-38.642 38.642-38.642z" />
<glyph unicode="&#xe904;" glyph-name="arrow-left" d="M220.139 448.010c0 18.345 6.991 36.682 20.99 50.687l440.304 440.297c28.009 28.009 73.418 28.009 101.415 0 27.997-27.997 27.997-73.402 0-101.41l-389.589-389.576 389.598-389.592c27.997-27.995 27.997-73.402 0-101.401-27.995-28.022-73.406-28.022-101.415 0l-440.304 440.292c-13.994 13.999-20.999 32.349-20.999 50.703z" />
<glyph unicode="&#xe905;" glyph-name="arrow-right" d="M782.857 397.307l-440.304-440.29c-28.009-28.022-73.42-28.022-101.415 0-27.997 27.997-27.997 73.406 0 101.401l389.601 389.589-389.589 389.576c-27.997 28.009-27.997 73.413 0 101.41 27.997 28.009 73.406 28.009 101.415 0l440.304-440.297c13.999-14.005 20.99-32.342 20.99-50.687 0-18.354-7.005-36.704-21.001-50.703z" />
<glyph unicode="&#xe906;" glyph-name="gift" d="M786.401 748.201c18.601 19.999 30.198 47.201 30.198 77.199 0 62.602-50.002 112.599-110.602 112.599-45.998 0-152.003-68.803-194.401-130.601-43.802 61.798-149.402 128.599-193.603 128.599-60.401 0-110.602-50.002-110.602-112.599 0-29 10.798-55.199 28.201-74.998h-213.591v-269h58.399v-521.4h863.401v521.201h58.199v269h-215.598zM706.002 896.2c37.601 0 68.803-31.201 68.803-73.001 0-35.2-24.602-65.398-56.402-71.798h-169.201c-10.798 3.2-14.198 6.999-14.198 9.201-0.005 35.599 124.995 135.598 170.998 135.598v0zM317.998 896.2c43.802 0 170.998-99.999 170.998-135.598 0-3.2-7.398-6.799-12.8-9.201h-170.394c-31.8 6.4-56.402 36.598-56.402 71.798-0.2 39.803 31.201 73.001 68.598 73.001zM595.2-0.2h-166.799v706.801h166.799v-706.801z" />
</font></defs></svg>

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 18 KiB

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