Initial commit

This commit is contained in:
2020-10-07 10:37:15 +02:00
commit ce5f440392
28157 changed files with 4429172 additions and 0 deletions

View File

@@ -0,0 +1,4 @@
2014-04-22 18:58:34 +0200 // Changelog updated
2014-04-10 17:48:25 +0200 //small fix
2014-03-25 16:35:25 +0100 //new version of module gamification fixed bug #PSCSX-1368
2014-03-21 10:55:00 +0100 Initial commit

View File

@@ -0,0 +1,47 @@
Academic Free License ("AFL") v. 3.0
This Academic Free License (the "License") applies to any original work of authorship (the "Original Work") whose owner (the "Licensor") has placed the following licensing notice adjacent to the copyright notice for the Original Work:
Licensed under the Academic Free License version 3.0
1) Grant of Copyright License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, for the duration of the copyright, to do the following:
a) to reproduce the Original Work in copies, either alone or as part of a collective work;
b) to translate, adapt, alter, transform, modify, or arrange the Original Work, thereby creating derivative works ("Derivative Works") based upon the Original Work;
c) to distribute or communicate copies of the Original Work and Derivative Works to the public, under any license of your choice that does not contradict the terms and conditions, including Licensor's reserved rights and remedies, in this Academic Free License;
d) to perform the Original Work publicly; and
e) to display the Original Work publicly.
2) Grant of Patent License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, under patent claims owned or controlled by the Licensor that are embodied in the Original Work as furnished by the Licensor, for the duration of the patents, to make, use, sell, offer for sale, have made, and import the Original Work and Derivative Works.
3) Grant of Source Code License. The term "Source Code" means the preferred form of the Original Work for making modifications to it and all available documentation describing how to modify the Original Work. Licensor agrees to provide a machine-readable copy of the Source Code of the Original Work along with each copy of the Original Work that Licensor distributes. Licensor reserves the right to satisfy this obligation by placing a machine-readable copy of the Source Code in an information repository reasonably calculated to permit inexpensive and convenient access by You for as long as Licensor continues to distribute the Original Work.
4) Exclusions From License Grant. Neither the names of Licensor, nor the names of any contributors to the Original Work, nor any of their trademarks or service marks, may be used to endorse or promote products derived from this Original Work without express prior permission of the Licensor. Except as expressly stated herein, nothing in this License grants any license to Licensor's trademarks, copyrights, patents, trade secrets or any other intellectual property. No patent license is granted to make, use, sell, offer for sale, have made, or import embodiments of any patent claims other than the licensed claims defined in Section 2. No license is granted to the trademarks of Licensor even if such marks are included in the Original Work. Nothing in this License shall be interpreted to prohibit Licensor from licensing under terms different from this License any Original Work that Licensor otherwise would have a right to license.
5) External Deployment. The term "External Deployment" means the use, distribution, or communication of the Original Work or Derivative Works in any way such that the Original Work or Derivative Works may be used by anyone other than You, whether those works are distributed or communicated to those persons or made available as an application intended for use over a network. As an express condition for the grants of license hereunder, You must treat any External Deployment by You of the Original Work or a Derivative Work as a distribution under section 1(c).
6) Attribution Rights. You must retain, in the Source Code of any Derivative Works that You create, all copyright, patent, or trademark notices from the Source Code of the Original Work, as well as any notices of licensing and any descriptive text identified therein as an "Attribution Notice." You must cause the Source Code for any Derivative Works that You create to carry a prominent Attribution Notice reasonably calculated to inform recipients that You have modified the Original Work.
7) Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that the copyright in and to the Original Work and the patent rights granted herein by Licensor are owned by the Licensor or are sublicensed to You under the terms of this License with the permission of the contributor(s) of those copyrights and patent rights. Except as expressly stated in the immediately preceding sentence, the Original Work is provided under this License on an "AS IS" BASIS and WITHOUT WARRANTY, either express or implied, including, without limitation, the warranties of non-infringement, merchantability or fitness for a particular purpose. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. This DISCLAIMER OF WARRANTY constitutes an essential part of this License. No license to the Original Work is granted by this License except under this disclaimer.
8) Limitation of Liability. Under no circumstances and under no legal theory, whether in tort (including negligence), contract, or otherwise, shall the Licensor be liable to anyone for any indirect, special, incidental, or consequential damages of any character arising as a result of this License or the use of the Original Work including, without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses. This limitation of liability shall not apply to the extent applicable law prohibits such limitation.
9) Acceptance and Termination. If, at any time, You expressly assented to this License, that assent indicates your clear and irrevocable acceptance of this License and all of its terms and conditions. If You distribute or communicate copies of the Original Work or a Derivative Work, You must make a reasonable effort under the circumstances to obtain the express assent of recipients to the terms of this License. This License conditions your rights to undertake the activities listed in Section 1, including your right to create Derivative Works based upon the Original Work, and doing so without honoring these terms and conditions is prohibited by copyright law and international treaty. Nothing in this License is intended to affect copyright exceptions and limitations (including "fair use" or "fair dealing"). This License shall terminate immediately and You may no longer exercise any of the rights granted to You by this License upon your failure to honor the conditions in Section 1(c).
10) Termination for Patent Action. This License shall terminate automatically and You may no longer exercise any of the rights granted to You by this License as of the date You commence an action, including a cross-claim or counterclaim, against Licensor or any licensee alleging that the Original Work infringes a patent. This termination provision shall not apply for an action alleging patent infringement by combinations of the Original Work with other software or hardware.
11) Jurisdiction, Venue and Governing Law. Any action or suit relating to this License may be brought only in the courts of a jurisdiction wherein the Licensor resides or in which Licensor conducts its primary business, and under the laws of that jurisdiction excluding its conflict-of-law provisions. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any use of the Original Work outside the scope of this License or after its termination shall be subject to the requirements and penalties of copyright or patent law in the appropriate jurisdiction. This section shall survive the termination of this License.
12) Attorneys' Fees. In any action to enforce the terms of this License or seeking damages relating thereto, the prevailing party shall be entitled to recover its costs and expenses, including, without limitation, reasonable attorneys' fees and costs incurred in connection with such action, including any appeal of such action. This section shall survive the termination of this License.
13) Miscellaneous. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable.
14) Definition of "You" in This License. "You" throughout this License, whether in upper or lower case, means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, "You" includes any entity that controls, is controlled by, or is under common control with you. For purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
15) Right to Use. You may use the Original Work in all ways not otherwise restricted or conditioned by this License or by law, and Licensor promises not to interfere with or be responsible for such uses by You.
16) Modification of This License. This License is Copyright © 2005 Lawrence Rosen. Permission is granted to copy, distribute, or communicate this License without modification. Nothing in this License permits You to modify this License as applied to the Original Work or to Derivative Works. However, You may modify the text of this License and copy, distribute or communicate your modified version (the "Modified License") and apply it to other original works of authorship subject to the following conditions: (i) You may not indicate in any way that your Modified License is the "Academic Free License" or "AFL" and you may not use those names in the name of your Modified License; (ii) You must replace the notice specified in the first paragraph above with the notice "Licensed under <insert your license name here>" or with a notice of your own that is not confusingly similar to the notice in this License; and (iii) You may not claim that your original works are open source software unless your Modified License has been approved by Open Source Initiative (OSI) and You comply with its license review and certification process.

View File

@@ -0,0 +1,41 @@
# Merchant Expertise
## About
Become an e-commerce expert within the blink of an eye! This module displays tips in your Back Office to help you make the best out of your shop.
### Execute the test suite
This module is shipped with a test suite using PHPUnit, you need Composer to install the dependencies:
```
composer install
composer test
```
### Supported PrestaShop versions
This module is compatible with 1.6.1.x and 1.7.x versions.
> As of 31th of october, 2018, PrestaShop 1.6.1.x will only receives security patches.
This module is maintained for 1.7.4.x and above *only*.
## Reporting issues
You can report issues with this module in the main PrestaShop repository. [Click here to report an issue][report-issue].
## Contributing
PrestaShop modules are open source extensions to the [PrestaShop e-commerce platform][prestashop]. Everyone is welcome and even encouraged to contribute with their own improvements!
Just make sure to follow our [contribution guidelines][contribution-guidelines].
## License
This module is released under the [Academic Free License 3.0][AFL-3.0]
[report-issue]: https://github.com/PrestaShop/PrestaShop/issues/new/choose
[prestashop]: https://www.prestashop.com/
[contribution-guidelines]: https://devdocs.prestashop.com/1.7/contribute/contribution-guidelines/project-modules/
[AFL-3.0]: https://opensource.org/licenses/AFL-3.0

View File

@@ -0,0 +1,218 @@
<?php
/*
* 2007-2016 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-2016 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 Advice extends ObjectModel
{
public $id;
public $id_ps_advice;
public $id_tab;
public $validated;
public $hide;
public $selector;
public $location;
public $html;
public $start_day;
public $stop_day;
public $weight;
/**
* @see ObjectModel::$definition
*/
public static $definition = array(
'table' => 'advice',
'primary' => 'id_advice',
'multilang' => true,
'fields' => array(
'id_ps_advice' => array('type' => self::TYPE_INT, 'validate' => 'isInt'),
'id_tab' => array('type' => self::TYPE_INT, 'validate' => 'isInt'),
'selector' => array('type' => self::TYPE_STRING),
'location' => array('type' => self::TYPE_STRING),
'validated' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'),
'start_day' => array('type' => self::TYPE_INT, 'validate' => 'isInt'),
'stop_day' => array('type' => self::TYPE_INT, 'validate' => 'isInt'),
'weight' => array('type' => self::TYPE_INT, 'validate' => 'isInt'),
// Lang fields
'html' => array('type' => self::TYPE_HTML, 'lang' => true, 'required' => true, 'validate' => 'isString'),
),
);
public static function getIdByIdPs($id_ps_advice)
{
$query = new DbQuery();
$query->select('id_advice');
$query->from('advice', 'b');
$query->where('`id_ps_advice` = '.(int)$id_ps_advice);
return (int)Db::getInstance()->getValue($query);
}
/**
* @param int $idTab
* @param bool $includePremium [default=false] True to include Premium as well
* @param bool $includeAddons [default=false] True to include Addons as well
*
* @return array[]
* @throws PrestaShopDatabaseException
*/
public static function getValidatedByIdTab($idTab, $includePremium = false, $includeAddons = false)
{
$query = new DbQuery();
$query->select('a.`id_ps_advice`, a.`selector`, a.`location`, al.`html`, a.`weight`');
$query->from('advice', 'a');
$query->join('
LEFT JOIN `'._DB_PREFIX_.'advice_lang` al ON al.`id_advice` = a.`id_advice`
LEFT JOIN `'._DB_PREFIX_.'tab_advice` at ON at.`id_advice` = a.`id_advice`
');
$selectorsToExclude = array();
if (!$includePremium) {
$selectorsToExclude[] = '#dashtrends';
}
if (!$includeAddons) {
$selectorsToExclude[] = 'addons';
}
$selectorsToExcludeSql = '';
if (!empty($selectorsToExclude)) {
$selectorsToExcludeSql = 'AND a.selector NOT IN("' . implode('","', $selectorsToExclude) . '")';
}
$query->where(sprintf(
"a.validated = 1
AND a.hide = 0
AND al.id_lang = %d
AND at.id_tab = %d
$selectorsToExcludeSql
AND (
(a.start_day = 0 AND a.stop_day = 0)
OR (%s BETWEEN a.start_day AND a.stop_day)
)",
(int) Context::getContext()->language->id,
$idTab,
date('d')
));
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($query);
$advices = array();
if (is_array($result)) {
foreach ($result as $res) {
$advices[] = array(
'selector' => $res['selector'],
'location' => $res['location'],
'html' => $res['html'],
'id_ps_advice' => $res['id_ps_advice'],
'weight' => $res['weight']
);
}
}
return $advices;
}
public static function getValidatedPremiumOnlyByIdTab($id_tab)
{
$advices = self::getValidatedByIdTab($id_tab, true);
foreach ($advices as $k => $a) {
if ($a['selector'] != '#dashtrends') {
unset($advices[$k]);
}
}
return $advices;
}
public static function getValidatedAddonsOnlyByIdTab($id_tab)
{
$advices = self::getValidatedByIdTab($id_tab, false, true);
foreach ($advices as $k => $a) {
if ($a['selector'] != 'addons') {
unset($advices[$k]);
}
}
return $advices;
}
public static function getIdsAdviceToValidate()
{
$ids = array();
$query = new DbQuery();
$query->select('a.`id_advice`');
$query->from('advice', 'a');
$query->join('
LEFT JOIN `'._DB_PREFIX_.'condition_advice` ca ON ca.`id_advice` = a.`id_advice` AND ca.`display` = 1
LEFT JOIN `'._DB_PREFIX_.'condition` c ON c.`id_condition` = ca.`id_condition` AND c.`validated` = 1');
$query->where('a.`validated` = 0');
$query->groupBy('a.`id_advice`');
$query->having('count(*) = SUM(c.`validated`)');
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($query);
if (is_array($result)) {
foreach ($result as $advice) {
$ids[] = $advice['id_advice'];
}
}
return $ids;
}
public static function getIdsAdviceToUnvalidate()
{
$ids = array();
$query = new DbQuery();
$query->select('a.`id_advice`');
$query->from('advice', 'a');
$query->join('
LEFT JOIN `'._DB_PREFIX_.'condition_advice` ca ON ca.`id_advice` = a.`id_advice` AND ca.`display` = 0
LEFT JOIN `'._DB_PREFIX_.'condition` c ON c.`id_condition` = ca.`id_condition` AND c.`validated` = 1');
$query->where('a.`validated` = 1');
$query->groupBy('a.`id_advice`');
$query->having('count(*) = SUM(c.`validated`)');
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($query);
if (is_array($result)) {
foreach ($result as $advice) {
$ids[] = $advice['id_advice'];
}
}
return $ids;
}
}

View File

@@ -0,0 +1,131 @@
<?php
/*
* 2007-2016 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-2016 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 Badge extends ObjectModel
{
public $id;
public $id_ps_badge;
public $type;
public $id_group;
public $group_position;
public $group_name;
public $scoring;
public $validated;
public $name;
public $description;
public $awb;
const BAGDE_IMG_URL = '../modules/gamification/views/img/badges/';
/**
* @see ObjectModel::$definition
*/
public static $definition = array(
'table' => 'badge',
'primary' => 'id_badge',
'multilang' => true,
'fields' => array(
'id_ps_badge' => array('type' => self::TYPE_INT, 'validate' => 'isInt'),
'type' => array('type' => self::TYPE_STRING, 'validate' => 'isString', 'size' => 32),
'id_group' => array('type' => self::TYPE_STRING, 'validate' => 'isString', 'size' => 32),
'group_position' => array('type' => self::TYPE_INT, 'validate' => 'isInt'),
'scoring' => array('type' => self::TYPE_INT, 'validate' => 'isInt'),
'validated' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'),
'awb' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'),
// Lang fields
'name' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'required' => true, 'size' => 64),
'description' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isCleanHtml', 'size' => 255),
'group_name' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isCleanHtml', 'size' => 255),
),
);
public function getBadgeImgUrl()
{
return self::BAGDE_IMG_URL .(int)$this->id_ps_badge.'_'.(int)$this->validated.'.png';
}
public function validate()
{
$this->validated = 1;
$this->save();
return true;
}
public static function getIdByIdPs($id_ps_badge)
{
$query = new DbQuery();
$query->select('id_badge');
$query->from('badge', 'b');
$query->where('`id_ps_badge` = '.(int)$id_ps_badge);
return (int)Db::getInstance()->getValue($query);
}
public static function getIdsBadgesToValidate()
{
$ids = array();
$query = new DbQuery();
$query->select('b.`id_badge`');
$query->from('badge', 'b');
$query->join('
LEFT JOIN `'._DB_PREFIX_.'condition_badge` cb ON cb.`id_badge` = b.`id_badge`
LEFT JOIN `'._DB_PREFIX_.'condition` c ON c.`id_condition` = cb.`id_condition` AND c.`validated` = 1');
$query->where('b.validated = 0');
$query->groupBy('b.`id_badge`');
$query->having('count(*) = SUM(c.validated)');
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($query);
foreach ($result as $badge) {
$ids[] = $badge['id_badge'];
}
return $ids;
}
public function getNextBadgeId()
{
$query = new DbQuery();
$query->select('b.`id_badge`');
$query->from('badge', 'b');
$query->where('b.id_group = \''.pSQL($this->id_group).'\' AND b.validated = 0');
$query->orderBy('b.group_position');
return Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($query);
}
}

View File

@@ -0,0 +1,354 @@
<?php
/*
* 2007-2016 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-2016 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 Condition extends ObjectModel
{
public $id;
public $id_ps_condition;
public $type;
public $request;
public $operator;
public $value;
public $result;
public $calculation_type;
public $calculation_detail;
public $validated;
public $date_add;
public $date_upd;
public static $unauthorized = array('DELETE', 'DROP');
/**
* @see ObjectModel::$definition
*/
public static $definition = array(
'table' => 'condition',
'primary' => 'id_condition',
'fields' => array(
'id_ps_condition' => array('type' => self::TYPE_INT, 'validate' => 'isInt'),
'type' => array('type' => self::TYPE_STRING, 'size' => 32),
'request' => array('type' => self::TYPE_STRING),
'operator' => array('type' => self::TYPE_NOTHING),
'value' => array('type' => self::TYPE_STRING),
'result' => array('type' => self::TYPE_STRING),
'calculation_type' => array('type' => self::TYPE_STRING),
'calculation_detail' => array('type' => self::TYPE_STRING),
'validated' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'),
'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDateFormat'),
'date_upd' => array('type' => self::TYPE_DATE, 'validate' => 'isDateFormat'),
),
);
public static function getIdByIdPs($id_ps_condition)
{
$query = new DbQuery();
$query->select('id_condition');
$query->from('condition', 'c');
$query->where('`id_ps_condition` = '.(int)$id_ps_condition);
return (int)Db::getInstance()->getValue($query);
}
public static function getIdsByHookCalculation($hook_name)
{
$ids = array();
$in = array();
$sub_query = new DbQuery();
$sub_query->select('id_badge');
$sub_query->from('badge', 'b');
$sub_query->where('b.`validated` = 0');
$sub_results = Db::getInstance()->executeS($sub_query);
foreach ($sub_results as $sub_result) {
$in[] = $sub_result['id_badge'];
}
$query = new DbQuery();
$query->select('c.`id_condition`');
$query->from('condition', 'c');
$query->join('LEFT JOIN `'._DB_PREFIX_.'condition_badge` cb ON cb.`id_condition` = c.`id_condition`');
$query->where('c.`calculation_type` = \'hook\'');
$query->where('c.`calculation_detail` = \''.pSQL($hook_name).'\'');
$query->where('c.`validated` = 0');
if (count($in)) {
$query->where('cb.`id_badge` IN ('.implode(',', $in).')');
}
$query->groupBy('c.`id_condition`');
$result = Db::getInstance()->executeS($query);
foreach ($result as $r) {
$ids[] = $r['id_condition'];
}
$sub_query = new DbQuery();
$sub_query->select('id_advice');
$sub_query->from('advice', 'a');
$sub_results = Db::getInstance()->executeS($sub_query);
$in = array();
foreach ($sub_results as $sub_result) {
$in[] = $sub_result['id_advice'];
}
$query = new DbQuery();
$query->select('c.`id_condition`');
$query->from('condition', 'c');
$query->join('LEFT JOIN `'._DB_PREFIX_.'condition_advice` ca ON ca.`id_condition` = c.`id_condition`');
$query->where('c.`calculation_type` = \'hook\'');
$query->where('c.`calculation_detail` = \''.pSQL($hook_name).'\'');
$query->where('c.`validated` = 0');
if (count($in)) {
$query->where('ca.`id_advice` IN ('.implode(',', $in).')');
}
$query->groupBy('c.`id_condition`');
$result = Db::getInstance()->executeS($query);
foreach ($result as $r) {
$ids[] = $r['id_condition'];
}
return array_unique($ids);
}
public static function getIdsDailyCalculation()
{
$ids = array();
$in = array();
//badges conditions validation
$sub_query = new DbQuery();
$sub_query->select('id_badge');
$sub_query->from('badge', 'b');
$sub_results = Db::getInstance()->executeS($sub_query);
foreach ($sub_results as $sub_result) {
$in[] = $sub_result['id_badge'];
}
$query = new DbQuery();
$query->select('c.`id_condition`');
$query->from('condition', 'c');
$query->join('LEFT JOIN `'._DB_PREFIX_.'condition_badge` cb ON cb.`id_condition` = c.`id_condition`');
$query->where('c.`calculation_type` = \'time\'');
$query->where('DATEDIFF(NOW(), `date_upd`) >= `calculation_detail`');
$query->where('c.`validated` = 0');
if (count($in)) {
$query->where('cb.`id_badge` IN ('.implode(',', $in).')');
}
$query->groupBy('c.`id_condition`');
$result = Db::getInstance()->executeS($query);
foreach ($result as $r) {
$ids[] = $r['id_condition'];
}
//advice conditions validation
$sub_query = new DbQuery();
$sub_query->select('id_advice');
$sub_query->from('advice', 'a');
$sub_results = Db::getInstance()->executeS($sub_query);
$in = array();
foreach ($sub_results as $sub_result) {
$in[] = $sub_result['id_advice'];
}
$query = new DbQuery();
$query->select('c.`id_condition`');
$query->from('condition', 'c');
$query->join('LEFT JOIN `'._DB_PREFIX_.'condition_advice` ca ON ca.`id_condition` = c.`id_condition`');
$query->where('c.`calculation_type` = \'time\'');
$query->where('DATEDIFF(NOW(), `date_upd`) >= `calculation_detail`');
$query->where('c.`validated` = 0');
if (count($in)) {
$query->where('ca.`id_advice` IN ('.implode(',', $in).')');
}
$query->groupBy('c.`id_condition`');
$result = Db::getInstance()->executeS($query);
foreach ($result as $r) {
$ids[] = $r['id_condition'];
}
return array_unique($ids);
}
public static function getIdsByBadgeGroupPosition($badge_group_position)
{
$ids = array();
$sub_query = new DbQuery();
$sub_query->select('id_badge');
$sub_query->from('badge', 'b');
$sub_query->where('b.`group_position` = '.(int)$badge_group_position);
$sub_query->where('b.`validated` = 0');
$sub_query->groupBy('b.`id_group`');
$query = new DbQuery();
$query->select('c.`id_condition`');
$query->from('condition', 'c');
$query->join('LEFT JOIN `'._DB_PREFIX_.'condition_badge` cb ON cb.`id_condition` = c.`id_condition`');
$query->where('c.`validated` = 0');
$query->where('cb.`id_badge` IN ('.$sub_query.')');
$query->groupBy('c.`id_condition`');
$result = Db::getInstance()->executeS($query);
foreach ($result as $r) {
$ids[] = $r['id_condition'];
}
return $ids;
}
public static function getIdsByBadgeGroup($badge_group)
{
$ids = array();
$sub_query = new DbQuery();
$sub_query->select('id_badge');
$sub_query->from('badge', 'b');
$sub_query->where('b.`id_group` = '.(int)$badge_group);
$sub_query->where('b.`validated` = 0');
$sub_query->groupBy('b.`id_group`');
$query = new DbQuery();
$query->select('c.`id_condition`');
$query->from('condition', 'c');
$query->join('LEFT JOIN `'._DB_PREFIX_.'condition_badge` cb ON cb.`id_condition` = c.`id_condition`');
$query->where('c.`validated` = 0');
$query->where('cb.`id_badge` IN ('.$sub_query.')');
$query->groupBy('c.`id_condition`');
$result = Db::getInstance()->executeS($query);
foreach ($result as $r) {
$ids[] = $r['id_condition'];
}
return $ids;
}
public function processCalculation()
{
switch ($this->type) {
case 'configuration':
$this->processConfiguration();
break;
case 'install':
$this->processInstall();
break;
case 'sql':
$this->processSql();
break;
}
}
protected function processSql()
{
if (preg_match('/'.implode('|', self::$unauthorized).'/', $this->request)) {
return false;
}
try {
$this->result = (int)Db::getInstance()->getValue(GamificationTools::parseMetaData($this->request));
} catch (Exception $e) {
return false;
}
if ($this->makeCalculation($this->operator, $this->result, $this->value)) {
$this->validated = 1;
}
$this->save();
}
protected function processConfiguration()
{
$this->result = Configuration::get($this->request);
if ($this->result = $this->makeCalculation($this->operator, $this->result, $this->value)) {
$this->validated = 1;
}
$this->save();
}
protected function processInstall()
{
$install = strtotime(_PS_CREATION_DATE_.' 00:00:00');
$value = strtotime('+ '.(int)$this->value.' day', $install);
$this->result = $this->makeCalculation($this->operator, (time() - $install), $value - $install);
if ($this->result) {
$this->validated = 1;
}
$this->save();
}
protected function makeCalculation($operator, $arg1, $arg2)
{
$result = false;
switch ($operator) {
case '>':
$result = $arg1 > $arg2;
break;
case '>=':
$result = $arg1 >= $arg2;
break;
case '<':
$result = $arg1 < $arg2;
break;
case '<=':
$result = $arg1 <= $arg2;
break;
case '==':
$result = $arg1 == $arg2;
break;
case '!=':
$result = $arg1 != $arg2;
break;
break;
}
return (bool)$result;
}
}

View File

@@ -0,0 +1,87 @@
<?php
/*
* 2007-2016 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-2016 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 GamificationTools
{
public static function parseMetaData($content)
{
$meta_data = array(
'PREFIX_' => _DB_PREFIX_,
);
//replace define
$content = str_replace(array_keys($meta_data), array_values($meta_data), $content);
//replace meta data
$content = preg_replace_callback('#\{config\}([a-zA-Z0-9_-]*)\{/config\}#', function ($matches) {
return Configuration::get($matches[1]);
}, $content);
$content = preg_replace_callback('#\{link\}(.*)\{/link\}#', function ($matches) {
return Context::getContext()->link->getAdminLink($matches[1]);
}, $content);
$content = preg_replace_callback('#\{employee\}(.*)\{/employee\}#', function ($matches) {
return Context::getContext()->employee->$matches[1];
}, $content);
$content = preg_replace_callback('#\{language\}(.*)\{/language\}#', function ($matches) {
return Context::getContext()->language->$matches[1];
}, $content);
$content = preg_replace_callback('#\{country\}(.*)\{/country\}#', function ($matches) {
return Context::getContext()->country->$matches[1];
}, $content);
return $content;
}
/**
* Retrieve Json api file, forcing gzip compression to save bandwith.
*
* @param string $url
* @param bool $withResponseHeaders
*
* @return string|bool
*/
public static function retrieveJsonApiFile($url, $withResponseHeaders = false)
{
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 1);
curl_setopt($curl, CURLOPT_TIMEOUT, 1);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, true);
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($curl, CURLOPT_MAXREDIRS, 2);
// @see https://cloud.google.com/appengine/kb/#compression
curl_setopt($curl, CURLOPT_ENCODING, 'gzip');
curl_setopt($curl, CURLOPT_USERAGENT, 'gzip');
curl_setopt($curl, CURLOPT_HEADER, $withResponseHeaders);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
$content = curl_exec($curl);
curl_close($curl);
return $content;
}
}

View File

@@ -0,0 +1,35 @@
{
"name": "prestashop/gamification",
"description": "PrestaShop module gamification",
"homepage": "https://github.com/PrestaShop/gamification",
"license": "AFL-3.0",
"authors": [
{
"name": "PrestaShop SA",
"email": "contact@prestashop.com"
}
],
"require": {
"php": ">=5.6",
"ext-json": "*"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^2.12",
"phpunit/phpunit": "~5.7",
"mockery/mockery": "^1.2",
"symfony/phpunit-bridge": "^3.4",
"symfony/debug": "^3.4"
},
"config": {
"platform": {
"php": "5.6.0"
},
"preferred-install": "dist"
},
"scripts": {
"cs-fix": "@php ./vendor/bin/php-cs-fixer fix .",
"cs-fix-test": "@php ./vendor/bin/php-cs-fixer fix --dry-run --stop-on-violation --show-progress=dot .",
"test": "SYMFONY_PHPUNIT_VERSION=5.7 php ./vendor/bin/simple-phpunit"
},
"type": "prestashop-module"
}

2666
modules/gamification/composer.lock generated Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<module>
<name>gamification</name>
<displayName><![CDATA[Merchant Expertise]]></displayName>
<version><![CDATA[2.3.2]]></version>
<description><![CDATA[Become an e-commerce expert within the blink of an eye!]]></description>
<author><![CDATA[PrestaShop]]></author>
<tab><![CDATA[administration]]></tab>
<is_configurable>1</is_configurable>
<need_instance>1</need_instance>
<limited_countries></limited_countries>
</module>

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<module>
<name>gamification</name>
<displayName><![CDATA[Expertise PrestaShop]]></displayName>
<version><![CDATA[2.3.2]]></version>
<description><![CDATA[Devenez un marchand accompli &agrave; pas de g&eacute;ant !]]></description>
<author><![CDATA[PrestaShop]]></author>
<tab><![CDATA[administration]]></tab>
<is_configurable>1</is_configurable>
<need_instance>1</need_instance>
<limited_countries></limited_countries>
</module>

View File

@@ -0,0 +1,315 @@
<?php
include_once __DIR__.'/../../classes/Condition.php';
class AdminGamificationController extends ModuleAdminController
{
/**
* @var gamification
*/
public $module;
public function __construct()
{
$this->bootstrap = true;
$this->display = 'view';
parent::__construct();
$this->meta_title = $this->l('Your Merchant Expertise');
if (!$this->module->active) {
Tools::redirectAdmin($this->context->link->getAdminLink('AdminHome'));
}
}
public function setMedia($isNewTheme = false)
{
parent::setMedia($isNewTheme);
$this->addJqueryUI('ui.progressbar');
$this->addJS(_MODULE_DIR_.$this->module->name.'/views/js/bubble-popup.js');
if (version_compare(_PS_VERSION_, '1.6.0', '>=') === true) {
$this->addJs(_MODULE_DIR_.$this->module->name.'/views/js/gamification_bt.js');
} else {
$this->addJs(_MODULE_DIR_.$this->module->name.'/views/js/gamification.js');
}
$this->addJs(_MODULE_DIR_.$this->module->name.'/views/js/jquery.isotope.js');
$this->addCSS(array(_MODULE_DIR_.$this->module->name.'/views/css/bubble-popup.css', _MODULE_DIR_.$this->module->name.'/views/css/isotope.css'));
}
public function initToolBarTitle()
{
$this->toolbar_title[] = $this->l('Administration');
$this->toolbar_title[] = $this->l('Merchant Expertise');
}
public function initPageHeaderToolbar()
{
parent::initPageHeaderToolbar();
unset($this->page_header_toolbar_btn['back']);
}
public function renderView()
{
$badges_feature = new Collection('badge', $this->context->language->id);
$badges_feature->sqlWhere('(type = \'feature\' AND awb = 0) OR (awb = 1 AND validated = 1)');
$badges_feature->orderBy('awb');
$badges_feature->orderBy('id_group');
$badges_feature->orderBy('group_position');
$badges_achievement = new Collection('badge', $this->context->language->id);
$badges_achievement->sqlWhere('type = \'achievement\' AND awb != 1');
$badges_achievement->orderBy('id_group');
$badges_achievement->orderBy('group_position');
$badges_international = new Collection('badge', $this->context->language->id);
$badges_international->sqlWhere('type = \'international\' AND awb != 1');
$badges_international->orderBy('id_group');
$badges_international->orderBy('group_position');
$groups = array();
$query = new DbQuery();
$query->select('DISTINCT(b.`id_group`), bl.group_name, b.type');
$query->from('badge', 'b');
$query->join('
LEFT JOIN `'._DB_PREFIX_.'badge_lang` bl ON bl.`id_badge` = b.`id_badge`');
$query->where('bl.id_lang = '.(int)$this->context->language->id);
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($query);
foreach ($result as $res) {
$groups['badges_'.$res['type']][$res['id_group']] = $res['group_name'];
}
$badges_type = array(
'badges_feature' => array('name' => $this->l('Features'), 'badges' => $badges_feature),
'badges_achievement' => array('name' => $this->l('Achievements'), 'badges' => $badges_achievement),
'badges_international' => array('name' => $this->l('International'), 'badges' => $badges_international),
);
$levels = array(
1 => $this->l('1. Beginner'),
2 => $this->l('2. Pro'),
3 => $this->l('3. Expert'),
4 => $this->l('4. Wizard'),
5 => $this->l('5. Guru'),
6 => $this->l('6. Legend'),
);
$this->tpl_view_vars = array(
'badges_type' => $badges_type,
'current_level_percent' => (int)Configuration::get('GF_CURRENT_LEVEL_PERCENT'),
'current_level' => (int)Configuration::get('GF_CURRENT_LEVEL'),
'groups' => $groups,
'levels' => $levels,
);
if (version_compare(_PS_VERSION_, '1.5.6.0', '>')) {
$this->base_tpl_view = 'view_bt.tpl';
}
return parent::renderView();
}
public function ajaxProcessDisableNotification()
{
Configuration::updateGlobalValue('GF_NOTIFICATION', 0);
}
public function ajaxProcessGamificationTasks()
{
if (!Configuration::get('GF_INSTALL_CALC')) {
$this->processRefreshData();
$this->processInstallCalculation();
Configuration::updateGlobalValue('GF_INSTALL_CALC', 1);
}
$return = array(
'refresh_data' => $this->processRefreshData(),
'daily_calculation' => $this->processMakeDailyCalculation(),
'advice_validation' => $this->processAdviceValidation()
);
$return['advices_to_display'] = $this->processGetAdvicesToDisplay();
//get only one random advice by tab
if (count($return['advices_to_display']['advices']) > 1) {
$rand = mt_rand(0, count($return['advices_to_display']['advices'])-1);
$return['advices_to_display']['advices'] = array($return['advices_to_display']['advices'][$rand]);
}
if (Tab::getIdFromClassName('AdminDashboard') == Tools::getValue('id_tab')) {
$return['advices_premium_to_display'] = $this->processGetAdvicesToDisplay(true);
if (count($return['advices_premium_to_display']['advices']) >= 2) {
$weighted_advices_array = array();
foreach ($return['advices_premium_to_display']['advices'] as $prem_advice) {
$loop_flag = (int)$prem_advice['weight'];
if ($loop_flag) {
for ($i = 0; $i != $loop_flag; $i++) {
$weighted_advices_array[] = $prem_advice;
}
} else {
$weighted_advices_array[] = $prem_advice;
}
}
$rand = mt_rand(0, count($weighted_advices_array)-1);
do {
$rand2 = mt_rand(0, count($weighted_advices_array)-1);
} while ($rand == $rand2);
$return['advices_premium_to_display']['advices'] = array($weighted_advices_array[$rand], $weighted_advices_array[$rand2]);
} elseif (count($return['advices_premium_to_display']['advices']) > 0) {
$addons = Advice::getValidatedAddonsOnlyByIdTab((int)Tools::getValue('id_tab'));
$return['advices_premium_to_display']['advices'][] = array_shift($addons);
}
}
$return['level_badge_validation'] = $this->processLevelAndBadgeValidation(Badge::getIdsBadgesToValidate());
$return['header_notification'] = $this->module->renderHeaderNotification();
echo json_encode($return);
exit;
}
public function processRefreshData()
{
return $this->module->refreshDatas();
}
public function processGetAdvicesToDisplay($only_premium = false)
{
$return = array('advices' => array());
$id_tab = (int)Tools::getValue('id_tab');
if ($only_premium) {
$advices = Advice::getValidatedPremiumOnlyByIdTab($id_tab);
} else {
$advices = Advice::getValidatedByIdTab($id_tab);
}
foreach ($advices as $advice) {
$return['advices'][] = array(
'selector' => $advice['selector'],
'html' => GamificationTools::parseMetaData($advice['html']),
'location' => $advice['location'],
'weight' => (int)$advice['weight']
);
}
return $return;
}
public function processMakeDailyCalculation()
{
$return = true;
$condition_ids = Condition::getIdsDailyCalculation();
foreach ($condition_ids as $id) {
$cond = new Condition((int)$id);
$return &= $cond->processCalculation();
}
return $return;
}
public function processAdviceValidation()
{
$return = true;
$advices_to_validate = Advice::getIdsAdviceToValidate();
$advices_to_unvalidate = Advice::getIdsAdviceToUnvalidate();
foreach ($advices_to_validate as $id) {
$advice = new Advice((int)$id);
$advice->validated = 1;
$return &= $advice->save();
}
foreach ($advices_to_unvalidate as $id) {
$advice = new Advice((int)$id);
$advice->validated = 0;
$return &= $advice->save();
}
return $return;
}
public function processLevelAndBadgeValidation($ids_badge)
{
$return = true;
$current_level = (int)Configuration::get('GF_CURRENT_LEVEL');
$current_level_percent = (int)Configuration::get('GF_CURRENT_LEVEL_PERCENT');
$not_viewed_badge = explode('|', ltrim(Configuration::get('GF_NOT_VIEWED_BADGE', ''), ''));
$nbr_notif = Configuration::get('GF_NOTIFICATION', 0);
if (count($ids_badge)) {
$not_viewed_badge = array();
} //reset the last badge only if there is new badge to validate
foreach ($ids_badge as $id) {
$badge = new Badge((int)$id);
if (($badge->scoring + $current_level_percent) >= 100) {
$current_level++;
$current_level_percent = $badge->scoring + $current_level_percent - 100;
} else {
$current_level_percent += $badge->scoring;
}
$return &= $badge->validate();
$condition_ids = Condition::getIdsByBadgeGroup($badge->id_group);
if (is_array($condition_ids) && count($condition_ids)) {
foreach ($condition_ids as $id) {
$cond = new Condition((int)$id);
$cond->processCalculation();
unset($cond);
}
$new_ids_badge = Badge::getIdsBadgesToValidate();
$this->processLevelAndBadgeValidation($new_ids_badge);
}
$nbr_notif++;
$not_viewed_badge[] = $badge->id;
}
Configuration::updateGlobalValue('GF_NOTIFICATION', (int)$nbr_notif);
Configuration::updateGlobalValue('GF_NOT_VIEWED_BADGE', implode('|', array_unique($not_viewed_badge)));
Configuration::updateGlobalValue('GF_CURRENT_LEVEL', (int)$current_level);
Configuration::updateGlobalValue('GF_CURRENT_LEVEL_PERCENT', (int)$current_level_percent);
return $return;
}
public function processInstallCalculation()
{
$group_position = 1;
do {
$condition_ids = Condition::getIdsByBadgeGroupPosition($group_position);
foreach ($condition_ids as $id) {
$cond = new Condition((int)$id);
$cond->processCalculation();
unset($cond);
}
$group_position++;
} while (count($condition_ids));
}
public function ajaxProcessSavePreactivationRequest()
{
$isoUser = Context::getContext()->language->iso_code;
$isoCountry = Context::getContext()->country->iso_code;
$employee = new Employee((int)Context::getContext()->cookie->id_employee);
$firstname = $employee->firstname;
$lastname = $employee->lastname;
$email = $employee->email;
$return = @Tools::file_get_contents('http://api.prestashop.com/partner/premium/set_request.php?iso_country='.strtoupper($isoCountry).'&iso_lang='.strtolower($isoUser).'&host='.urlencode($_SERVER['HTTP_HOST']).'&ps_version='._PS_VERSION_.'&ps_creation='._PS_CREATION_DATE_.'&partner='.htmlentities(Tools::getValue('module')).'&shop='.urlencode(Configuration::get('PS_SHOP_NAME')).'&email='.urlencode($email).'&firstname='.urlencode($firstname).'&lastname='.urlencode($lastname).'&type=home');
die($return);
}
public function ajaxProcessCloseAdvice()
{
$id_advice = Advice::getIdByIdPs((int)Tools::getValue('id_advice'));
Db::getInstance()->execute('UPDATE `'._DB_PREFIX_.'advice` SET `hide` = \'1\' WHERE `id_advice` = '.(int)$id_advice.';');
die();
}
}

View File

@@ -0,0 +1,35 @@
<?php
/*
* 2007-2016 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2016 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../../../');
exit;

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,41 @@
<?php
global $_MODULE;
$_MODULE = array();
$_MODULE['<{gamification}prestashop>gamification_3d4aafb2eedeba2fbf92e852f0af745a'] = 'Handelserfolg';
$_MODULE['<{gamification}prestashop>gamification_bacc1bf300527bad9c6ac2d3b875a8d8'] = 'E-Commerce-Experte im Handumdrehn!';
$_MODULE['<{gamification}prestashop>admingamificationcontroller_ca96b4f8d13722aac99da25f94ea1711'] = 'Ihr Handelserfolg';
$_MODULE['<{gamification}prestashop>admingamificationcontroller_98f770b0af18ca763421bac22b4b6805'] = 'Maßnahmen';
$_MODULE['<{gamification}prestashop>admingamificationcontroller_f5c7922da355fd289ec1d6469e0583a7'] = 'Erreichte Ziele';
$_MODULE['<{gamification}prestashop>admingamificationcontroller_8189ecf686157db0c0274c1f49373318'] = 'International';
$_MODULE['<{gamification}prestashop>admingamificationcontroller_851f12a0c936baace7f0e734d5c624e7'] = '1. Anfänger';
$_MODULE['<{gamification}prestashop>admingamificationcontroller_583981a16ea761fe852b64094d8a887e'] = '2. Profi';
$_MODULE['<{gamification}prestashop>admingamificationcontroller_38f7af7416ffcd1524d8a4acda756cbf'] = '3. Experte';
$_MODULE['<{gamification}prestashop>admingamificationcontroller_e7613fe56cdbeddfc9bb6276fd0f0d12'] = '4.Genie';
$_MODULE['<{gamification}prestashop>admingamificationcontroller_8d03eaad7ff7babdd33c2c74fe479ed0'] = '5. Guru';
$_MODULE['<{gamification}prestashop>admingamificationcontroller_e4be4f3e3ae4ee9dda6b60815bf774c1'] = '6. Legende';
$_MODULE['<{gamification}prestashop>filters_1aa4c641d6920ddb97a2562f8ec53853'] = 'Gruppe:';
$_MODULE['<{gamification}prestashop>filters_b1c94ca2fbc3e78fc30069c8d0f01680'] = 'Alle';
$_MODULE['<{gamification}prestashop>filters_24a23d787190f2c4812ff9ab11847a72'] = 'Status:';
$_MODULE['<{gamification}prestashop>filters_5364259abab90e94890f2ed2481b9824'] = 'geprüft';
$_MODULE['<{gamification}prestashop>filters_dc450ba947e6adecbdbe68c25de03a1b'] = 'ungeprüft';
$_MODULE['<{gamification}prestashop>filters_07ad815187b53dc2ceaf5ad6e0a12bb1'] = 'Ebene:';
$_MODULE['<{gamification}prestashop>view_a0db49ba470c1c9ae2128c3470339153'] = 'Ebene';
$_MODULE['<{gamification}prestashop>view_2a0ab6a9172272d54f0d601b0ac157f3'] = 'Ihr Quantensprung zum E-Commerce-Experten!';
$_MODULE['<{gamification}prestashop>view_cb3d475bd997e38c100704631dbab020'] = 'Halten Sie sich stets auf dem Laufenden über all die großartigen Funktionen und Vorteile, die PrestaShop bietet! ';
$_MODULE['<{gamification}prestashop>view_2c3193c85bb2555c333adfcfb824804a'] = 'Alle angebotenen Features dienen nur einem Ziel: Ihrem Erfolg inn der Welt des E-Commerce. Um dies zu erreichen, haben wir ein System von Abzeichen und Punkten entwickelt, die auf einfache Weise Ihren Fortschritte als Händler markieren. Wir haben die systematische Bewertung auf drei Ebenen konzentriert, auf denen sich ihr erfolgreicher Aufstieg in der Welt des E-Commerce vollzieht: (1) Ihre Nutzung der E-Commerce-Schlüsselfunktionen Ihres Shops, (2) Ihre Umsatzentwicklung, (3) Ihre Präsenz in internationalen Märkten.';
$_MODULE['<{gamification}prestashop>view_6b766dc388ad21053bde0f8fd95d1e04'] = 'Je mehr Fortschritte Ihr Shop macht, desto mehr Abzeichen und Punkte bekommen Sie! Alles geschieht vollautomatisch - sie brauchen uns also keinerlei Eckdaten zu übermitteln oder irgendwelche Formulare auszufüllen. Wir wissen doch, dass Zeit Geld für Sie bedeutet.';
$_MODULE['<{gamification}prestashop>view_21dc1cfc9ef1cdfbb665cab323d5e1a9'] = 'Nach einem Klick auf den Button sehen Sie verkaufsfördernde Maßnahmen, die sie vielleicht versäumt haben. Nutzen Sie den Vorteil und überprüfen Sie das Untenstehende!';
$_MODULE['<{gamification}prestashop>view_8ba134cf899d862079bbf3964bc7d7d4'] = 'Unser Team hilft Ihnen bei Ihrem Fortschritt - Kontaktieren Sie uns jetzt!';
$_MODULE['<{gamification}prestashop>view_bcc254b55c4a1babdf1dcb82c207506b'] = 'Telefon';
$_MODULE['<{gamification}prestashop>view_b39131f9b4f81406be4f9cca784f99c8'] = 'Per Telefon: +1 (888) 9476543 ';
$_MODULE['<{gamification}prestashop>view_ce8ae9da5b7cd6c3df2929543a9af92d'] = 'E-Mail';
$_MODULE['<{gamification}prestashop>view_119c7e70192829bf606e3774254c6167'] = 'Per E-Mail';
$_MODULE['<{gamification}prestashop>view_6b6ac7834d96afefbca5677814769109'] = 'Grad der Erfüllung';
$_MODULE['<{gamification}prestashop>view_82338dd23ce2fd2f6d3606c20f4ee96e'] = 'Kein Abzeichen für diese Abteilung';
$_MODULE['<{gamification}prestashop>notification_a0db49ba470c1c9ae2128c3470339153'] = 'Ebene';
$_MODULE['<{gamification}prestashop>notification_ca96b4f8d13722aac99da25f94ea1711'] = 'Ihr Handelserfolg';
$_MODULE['<{gamification}prestashop>notification_16a1daea9e8873542aec1e820798aa44'] = 'Letztes Abzeichen :';
$_MODULE['<{gamification}prestashop>notification_15377177c0259c6f79341cc57da13f19'] = 'Nächstes Abzeichen :';
$_MODULE['<{gamification}prestashop>notification_f8978f781f97e6f851e9c8f7059c37b2'] = 'Zeile mein volles Profil';

View File

@@ -0,0 +1,41 @@
<?php
global $_MODULE;
$_MODULE = array();
$_MODULE['<{gamification}prestashop>gamification_3d4aafb2eedeba2fbf92e852f0af745a'] = 'Expertise PrestaShop';
$_MODULE['<{gamification}prestashop>gamification_bacc1bf300527bad9c6ac2d3b875a8d8'] = 'Devenez un marchand accompli à pas de géant !';
$_MODULE['<{gamification}prestashop>admingamificationcontroller_ca96b4f8d13722aac99da25f94ea1711'] = 'Votre Expertise PrestaShop';
$_MODULE['<{gamification}prestashop>admingamificationcontroller_98f770b0af18ca763421bac22b4b6805'] = 'Fonctionnalités';
$_MODULE['<{gamification}prestashop>admingamificationcontroller_f5c7922da355fd289ec1d6469e0583a7'] = 'Succès';
$_MODULE['<{gamification}prestashop>admingamificationcontroller_8189ecf686157db0c0274c1f49373318'] = 'International';
$_MODULE['<{gamification}prestashop>admingamificationcontroller_851f12a0c936baace7f0e734d5c624e7'] = '1. Débutant';
$_MODULE['<{gamification}prestashop>admingamificationcontroller_583981a16ea761fe852b64094d8a887e'] = '2. Pro';
$_MODULE['<{gamification}prestashop>admingamificationcontroller_38f7af7416ffcd1524d8a4acda756cbf'] = '3. Expert';
$_MODULE['<{gamification}prestashop>admingamificationcontroller_e7613fe56cdbeddfc9bb6276fd0f0d12'] = '4. Maître';
$_MODULE['<{gamification}prestashop>admingamificationcontroller_8d03eaad7ff7babdd33c2c74fe479ed0'] = '5. Gourou';
$_MODULE['<{gamification}prestashop>admingamificationcontroller_e4be4f3e3ae4ee9dda6b60815bf774c1'] = '6. Légende';
$_MODULE['<{gamification}prestashop>filters_e659b52eba1f0299b2d8ca3483919e72'] = 'Type :';
$_MODULE['<{gamification}prestashop>filters_b1c94ca2fbc3e78fc30069c8d0f01680'] = 'Tous';
$_MODULE['<{gamification}prestashop>filters_18325105de95083e4a1d10b78f29c2bc'] = 'Etat :';
$_MODULE['<{gamification}prestashop>filters_5364259abab90e94890f2ed2481b9824'] = 'Validé';
$_MODULE['<{gamification}prestashop>filters_dc450ba947e6adecbdbe68c25de03a1b'] = 'Non validé';
$_MODULE['<{gamification}prestashop>filters_07ad815187b53dc2ceaf5ad6e0a12bb1'] = 'Niveau :';
$_MODULE['<{gamification}prestashop>view_a0db49ba470c1c9ae2128c3470339153'] = 'Niveau';
$_MODULE['<{gamification}prestashop>view_2a0ab6a9172272d54f0d601b0ac157f3'] = 'Devenez un marchand accompli à pas de géant !';
$_MODULE['<{gamification}prestashop>view_cb3d475bd997e38c100704631dbab020'] = 'L\'équipe PrestaShop vous accompagne dans votre aventure e-commerce : au fil des progrès réalisés dans la conception et l\'administration de votre boutique en ligne, nous vous décernons des badges symbolisant votre niveau d\'expertise.';
$_MODULE['<{gamification}prestashop>view_2c3193c85bb2555c333adfcfb824804a'] = 'A chaque badge décerné, vous gagnez des points et nous vous présentons la prochaine action à réaliser selon votre activité. Vous êtes ainsi guidé(e) vers une boutique parfaitement configurée et optimisée pour votre succès !';
$_MODULE['<{gamification}prestashop>view_6b766dc388ad21053bde0f8fd95d1e04'] = 'Nous avons défini 3 thèmes essentiels pour évaluer le niveau de développement de votre boutique : les fonctionnalités clés à configurer, vos performances commerciales et votre visibilité à l\'international.';
$_MODULE['<{gamification}prestashop>view_21dc1cfc9ef1cdfbb665cab323d5e1a9'] = 'A vous de jouer !';
$_MODULE['<{gamification}prestashop>view_8ba134cf899d862079bbf3964bc7d7d4'] = 'Notre équipe est à votre disposition pour vous aider à progresser... Contactez-nous !';
$_MODULE['<{gamification}prestashop>view_bcc254b55c4a1babdf1dcb82c207506b'] = 'Téléphone';
$_MODULE['<{gamification}prestashop>view_b39131f9b4f81406be4f9cca784f99c8'] = 'Par téléphone : +33 (0)1 40 18 30 04';
$_MODULE['<{gamification}prestashop>view_ce8ae9da5b7cd6c3df2929543a9af92d'] = 'Email';
$_MODULE['<{gamification}prestashop>view_119c7e70192829bf606e3774254c6167'] = 'Par email';
$_MODULE['<{gamification}prestashop>view_6b6ac7834d96afefbca5677814769109'] = 'Progrès';
$_MODULE['<{gamification}prestashop>view_82338dd23ce2fd2f6d3606c20f4ee96e'] = 'Pas de badge dans cette section';
$_MODULE['<{gamification}prestashop>notification_a0db49ba470c1c9ae2128c3470339153'] = 'Niveau';
$_MODULE['<{gamification}prestashop>notification_ca96b4f8d13722aac99da25f94ea1711'] = 'Votre Expertise PrestaShop';
$_MODULE['<{gamification}prestashop>notification_16a1daea9e8873542aec1e820798aa44'] = 'Dernier badge gagné :';
$_MODULE['<{gamification}prestashop>notification_15377177c0259c6f79341cc57da13f19'] = 'Prochain badge :';
$_MODULE['<{gamification}prestashop>notification_f8978f781f97e6f851e9c8f7059c37b2'] = 'Voir mon profil complet';

View File

@@ -0,0 +1,574 @@
<?php
/*
* 2007-2016 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2016 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
if (!defined('_PS_VERSION_')) {
exit;
}
include_once __DIR__.'/classes/Badge.php';
include_once __DIR__.'/classes/Advice.php';
include_once __DIR__.'/classes/Condition.php';
include_once __DIR__.'/classes/GamificationTools.php';
class gamification extends Module
{
// We recommend to not set it to true in production environment.
const TEST_MODE = false;
private $url_data = 'https://gamification.prestashop.com/json/';
private $cache_data;
public function __construct()
{
$this->name = 'gamification';
$this->tab = 'administration';
$this->version = '2.3.2';
$this->author = 'PrestaShop';
$this->ps_versions_compliancy = array(
'min' => '1.6.1.0',
);
parent::__construct();
$this->displayName = $this->l('Merchant Expertise');
$this->description = $this->l('Become an e-commerce expert within the blink of an eye!');
$this->cache_data = __DIR__.'/data/';
if (self::TEST_MODE === true) {
$this->url_data .= 'test/';
}
}
public function install()
{
if (Db::getInstance()->getValue('SELECT `id_module` FROM `'._DB_PREFIX_.'module` WHERE name =\''.pSQL($this->name).'\'')) {
return true;
}
Tools::deleteDirectory($this->cache_data, false);
return (
$this->installDb()
&& $this->installTab()
&& Configuration::updateGlobalValue('GF_INSTALL_CALC', 0)
&& Configuration::updateGlobalValue('GF_CURRENT_LEVEL', 1)
&& Configuration::updateGlobalValue('GF_CURRENT_LEVEL_PERCENT', 0)
&& Configuration::updateGlobalValue('GF_NOTIFICATION', 0)
&& parent::install()
&& $this->registerHook('actionAdminControllerSetMedia')
&& $this->registerHook('displayBackOfficeHeader')
);
}
public function uninstall()
{
if (!parent::uninstall() || !$this->uninstallTab() ||
!$this->uninstallDb() || !Configuration::updateGlobalValue('GF_CURRENT_LEVEL', 1) ||
!Configuration::updateGlobalValue('GF_NOTIFICATION', 0) ||
!Configuration::updateGlobalValue('GF_INSTALL_CALC', 0) ||
!Configuration::updateGlobalValue('GF_CURRENT_LEVEL_PERCENT', 0)) {
return false;
}
return true;
}
public function installDb()
{
$return = true;
include __DIR__.'/sql_install.php';
foreach ($sql as $s) {
$return &= Db::getInstance()->execute($s);
}
return $return;
}
public function uninstallDb()
{
include __DIR__.'/sql_install.php';
foreach ($sql as $name => $v) {
Db::getInstance()->execute('DROP TABLE '.$name);
}
return true;
}
public function installTab()
{
$tab = new Tab();
$tab->active = 1;
$tab->class_name = 'AdminGamification';
$tab->name = array();
foreach (Language::getLanguages(true) as $lang) {
$tab->name[$lang['id_lang']] = 'Merchant Expertise';
}
if (version_compare(_PS_VERSION_, '1.7.0.0', '>=')) {
//AdminPreferences
$tab->id_parent = (int)Db::getInstance(_PS_USE_SQL_SLAVE_)
->getValue(
'SELECT MIN(id_tab)
FROM `'._DB_PREFIX_.'tab`
WHERE `class_name` = "'.pSQL('ShopParameters').'"'
);
} else {
// AdminAdmin
$tab->id_parent = (int)Tab::getIdFromClassName('AdminAdmin');
}
$tab->module = $this->name;
return $tab->add();
}
public function uninstallTab()
{
$id_tab = (int)Tab::getIdFromClassName('AdminGamification');
if ($id_tab) {
$tab = new Tab($id_tab);
return $tab->delete();
}
return false;
}
public function enable($force_all = false)
{
return parent::enable($force_all) && Tab::enablingForModule($this->name);
}
public function disable($force_all = false)
{
return parent::disable($force_all) && Tab::disablingForModule($this->name);
}
public function getContent()
{
Tools::redirectAdmin($this->context->link->getAdminLink('AdminGamification'));
}
public function __call($name, $arguments)
{
if (!empty(self::$_batch_mode)) {
self::$_defered_func_call[__CLASS__.'::__call_'.$name] = array(array($this, '__call'), array($name, $arguments));
} else {
if (!Validate::isHookName($name)) {
return false;
}
$name = str_replace('hook', '', $name);
if ($retro_name = Db::getInstance()->getValue('SELECT `name` FROM `'._DB_PREFIX_.'hook_alias` WHERE `alias` = \''.pSQL($name).'\'')) {
$name = $retro_name;
}
$condition_ids = Condition::getIdsByHookCalculation($name);
foreach ($condition_ids as $id) {
$cond = new Condition((int)$id);
$cond->processCalculation();
}
}
}
public function isUpdating()
{
$db_version = Db::getInstance()->getValue('SELECT `version` FROM `'._DB_PREFIX_.'module` WHERE `name` = \''.pSQL($this->name).'\'');
return version_compare($this->version, $db_version, '>');
}
/**
*
*/
public function hookActionAdminControllerSetMedia()
{
if ($this->isUpdating() || !Module::isEnabled($this->name)) {
return;
}
if (method_exists($this->context->controller, 'addJquery')) {
$this->context->controller->addCss($this->_path . 'views/css/gamification.css');
if (version_compare(_PS_VERSION_, '1.7.0.0', '<=')) {
$this->context->controller->addCss($this->_path . 'views/css/gamification-1.6.css');
$this->context->controller->addJquery();
}
$this->context->controller->addJs($this->_path . 'views/js/gamification_bt.js');
$this->context->controller->addJqueryPlugin('fancybox');
}
}
/**
* Calls the server.
*
* @return bool|string
*
* @throws PrestaShopException
*/
public function hookDisplayBackOfficeHeader()
{
if ($this->isUpdating() || !Module::isEnabled($this->name)) {
return false;
}
return '<script>
var admin_gamification_ajax_url = ' . (string) json_encode(
$this->context->link->getAdminLink('AdminGamification')
) . ';
var current_id_tab = ' . (int) $this->context->controller->id . ';
</script>';
}
public function renderHeaderNotification()
{
//check if currently updating check if module is currently processing update
if ($this->isUpdating()) {
return false;
}
$current_level = (int)Configuration::get('GF_CURRENT_LEVEL');
$current_level_percent = (int)Configuration::get('GF_CURRENT_LEVEL_PERCENT');
$badges_to_display = array(); //retro compat
$unlock_badges = array();
$next_badges = array();
$not_viewed_badge = explode('|', Configuration::get('GF_NOT_VIEWED_BADGE', ''));
foreach ($not_viewed_badge as $id) {
$unlock_badges[] = $badges_to_display[] = new Badge((int)$id, (int)$this->context->language->id);
$next_badges[] = $badges_to_display[] = new Badge(end($badges_to_display)->getNextBadgeId(), (int)$this->context->language->id);
}
$this->context->smarty->assign(array(
'link' => $this->context->link,
'current_level_percent' => $current_level_percent,
'current_level' => $current_level,
'badges_to_display' => $badges_to_display,
'unlock_badges' => $unlock_badges,
'next_badges' => $next_badges,
'current_id_tab' => (int)$this->context->controller->id,
'notification' => (int)Configuration::get('GF_NOTIFICATION'),
'advice_hide_url' => 'https://gamification.prestashop.com/api/AdviceHide/',
));
if (version_compare(_PS_VERSION_, '1.6.0', '>=')) {
return $this->display(__FILE__, 'notification_bt.tpl');
} else {
return $this->display(__FILE__, 'notification.tpl');
}
}
public function refreshDatas($iso_lang = null)
{
if (null === $iso_lang) {
$iso_lang = $this->context->language->iso_code;
}
$default_iso_lang = Language::getIsoById((int)Configuration::get('PS_LANG_DEFAULT'));
$id_lang = Language::getIdByIso($iso_lang);
$iso_country = $this->context->country->iso_code;
$iso_currency = $this->context->currency->iso_code;
if ($iso_lang != $default_iso_lang) {
$this->refreshDatas($default_iso_lang);
}
$cache_file = $this->cache_data.'data_'.strtoupper($iso_lang).'_'.strtoupper($iso_currency).'_'.strtoupper($iso_country).'.json';
if (!$this->isFresh($cache_file, 86400)) {
if ($this->getData($iso_lang)) {
$data = json_decode(Tools::file_get_contents($cache_file));
if (json_last_error() !== JSON_ERROR_NONE || !isset($data->signature)) {
return false;
}
$this->processCleanAdvices();
if (function_exists('openssl_verify') && self::TEST_MODE === false) {
if (!openssl_verify(json_encode(array($data->conditions, $data->advices_lang)), base64_decode($data->signature), file_get_contents(__DIR__.'/prestashop.pub'))) {
return false;
}
}
if (isset($data->conditions)) {
$this->processImportConditions($data->conditions, $id_lang);
}
if ((isset($data->badges) && isset($data->badges_lang)) && (!isset($data->badges_only_visible_awb) && !isset($data->badges_only_visible_lang_awb))) {
$this->processImportBadges($data->badges, $data->badges_lang, $id_lang);
} else {
$this->processImportBadges(array_merge($data->badges_only_visible_awb, $data->badges), array_merge($data->badges_only_visible_lang_awb, $data->badges_lang), $id_lang);
}
if (isset($data->advices) && isset($data->advices_lang)) {
$this->processImportAdvices($data->advices, $data->advices_lang, $id_lang);
}
if (function_exists('openssl_verify') && self::TEST_MODE === false) {
if (!openssl_verify(json_encode(array($data->advices_lang_16)), base64_decode($data->signature_16), file_get_contents(__DIR__.'/prestashop.pub'))) {
return false;
}
}
if (version_compare(_PS_VERSION_, '1.6.0', '>=') === true && isset($data->advices_16) && isset($data->advices_lang_16)) {
$this->processImportAdvices($data->advices_16, $data->advices_lang_16, $id_lang);
}
}
}
}
public function getData($iso_lang = null)
{
if (null === $iso_lang) {
$iso_lang = $this->context->language->iso_code;
}
$iso_country = $this->context->country->iso_code;
$iso_currency = $this->context->currency->iso_code;
$file_name = 'data_'.strtoupper($iso_lang).'_'.strtoupper($iso_currency).'_'.strtoupper($iso_country).'.json';
$versioning = '?v='.$this->version.'&ps_version='._PS_VERSION_;
$data = GamificationTools::retrieveJsonApiFile($this->url_data.$file_name.$versioning);
return (bool) file_put_contents($this->cache_data.'data_'.strtoupper($iso_lang).'_'.strtoupper($iso_currency).'_'.strtoupper($iso_country).'.json', $data, FILE_USE_INCLUDE_PATH);
}
public function processCleanAdvices()
{
$current_advices = array();
$result = Db::getInstance()->ExecuteS('SELECT `id_advice`, `id_ps_advice` FROM `'._DB_PREFIX_.'advice`');
foreach ($result as $row) {
$current_advices[(int)$row['id_ps_advice']] = (int)$row['id_advice'];
}
// Delete advices that are not in the file anymore
foreach ($current_advices as $id_advice) {
// Check that the advice is used in this language
$html = Db::getInstance()->getValue('SELECT `html` FROM `'._DB_PREFIX_.'advice_lang` WHERE id_advice = '.(int)$id_advice.' AND id_lang = '.(int)$this->context->language->id);
if (!$html) {
continue;
}
$adv = new Advice($id_advice);
$adv->delete();
}
}
public function processImportConditions($conditions, $id_lang)
{
$current_conditions = array();
$result = Db::getInstance()->ExecuteS('SELECT `id_ps_condition` FROM `'._DB_PREFIX_.'condition`');
foreach ($result as $row) {
$current_conditions[] = (int)$row['id_ps_condition'];
}
if (is_array($conditions) || is_object($conditions)) {
foreach ($conditions as $condition) {
if (isset($condition->id)) {
unset($condition->id);
}
try {
$cond = new Condition();
if (in_array($condition->id_ps_condition, $current_conditions)) {
$cond = new Condition(Condition::getIdByIdPs($condition->id_ps_condition));
unset($current_conditions[(int)array_search($condition->id_ps_condition, $current_conditions)]);
}
$cond->hydrate((array)$condition, (int)$id_lang);
$cond->date_upd = date('Y-m-d H:i:s', strtotime('-'.(int)$cond->calculation_detail.'DAY'));
$cond->date_add = date('Y-m-d H:i:s');
$condition->calculation_detail = trim($condition->calculation_detail);
$cond->save(false, false);
if ($condition->calculation_type == 'hook' && !$this->isRegisteredInHook($condition->calculation_detail) && Validate::isHookName($condition->calculation_detail)) {
$this->registerHook($condition->calculation_detail);
}
unset($cond);
} catch (Exception $e) {
continue;
}
}
}
// Delete conditions that are not in the file anymore
foreach ($current_conditions as $id_ps_condition) {
$cond = new Condition(Condition::getIdByIdPs((int)$id_ps_condition));
$cond->delete();
}
}
public function processImportBadges($badges, $badges_lang, $id_lang)
{
$formated_badges_lang = array();
foreach ($badges_lang as $lang) {
$formated_badges_lang[$lang->id_ps_badge] = array(
'name' => array($id_lang => $lang->name),
'description' => array($id_lang => $lang->description),
'group_name' => array($id_lang => $lang->group_name));
}
$current_badges = array();
$result = Db::getInstance()->ExecuteS('SELECT `id_ps_badge` FROM `'._DB_PREFIX_.'badge`');
foreach ($result as $row) {
$current_badges[] = (int)$row['id_ps_badge'];
}
$cond_ids = $this->getFormatedConditionsIds();
foreach ($badges as $badge) {
try {
//if badge already exist we update language data
if (in_array((int)$badge->id_ps_badge, $current_badges)) {
$bdg = new Badge(Badge::getIdByIdPs((int)$badge->id_ps_badge));
$bdg->name[$id_lang] = $formated_badges_lang[$badge->id_ps_badge]['name'][$id_lang];
$bdg->description[$id_lang] = $formated_badges_lang[$badge->id_ps_badge]['description'][$id_lang];
$bdg->group_name[$id_lang] = $formated_badges_lang[$badge->id_ps_badge]['group_name'][$id_lang];
$bdg->update();
unset($current_badges[(int)array_search($badge->id_ps_badge, $current_badges)]);
} else {
$badge_data = array_merge((array)$badge, $formated_badges_lang[$badge->id_ps_badge]);
$bdg = new Badge();
$bdg->hydrate($badge_data, (int)$id_lang);
$bdg->add();
foreach ($badge->conditions as $cond) {
Db::getInstance()->insert('condition_badge', array('id_condition' => $cond_ids[$cond], 'id_badge' => $bdg->id));
}
}
unset($bdg);
} catch (Exception $e) {
continue;
}
}
// Delete badges that are not in the file anymore
foreach ($current_badges as $id_ps_badge) {
$bdg = new Badge(Badge::getIdByIdPs((int)$id_ps_badge));
$bdg->delete();
}
}
public function processImportAdvices($advices, $advices_lang, $id_lang)
{
$formated_advices_lang = array();
foreach ($advices_lang as $lang) {
$formated_advices_lang[$lang->id_ps_advice] = array('html' => array($id_lang => $lang->html));
}
$current_advices = array();
$result = Db::getInstance()->ExecuteS('SELECT `id_advice`, `id_ps_advice` FROM `'._DB_PREFIX_.'advice`');
foreach ($result as $row) {
$current_advices[(int)$row['id_ps_advice']] = (int)$row['id_advice'];
}
$cond_ids = $this->getFormatedConditionsIds();
foreach ($advices as $advice) {
try {
//if advice already exist we update language data
if (isset($current_advices[$advice->id_ps_advice])) {
$adv = new Advice($current_advices[$advice->id_ps_advice]);
$adv->html[$id_lang] = $formated_advices_lang[$advice->id_ps_advice]['html'][$id_lang];
$adv->update();
$this->processAdviceAsso($adv->id, $advice->display_conditions, $advice->hide_conditions, $advice->tabs, $cond_ids);
unset($current_advices[$advice->id_ps_advice]);
} else {
$advice_data = array_merge((array)$advice, $formated_advices_lang[$advice->id_ps_advice]);
$adv = new Advice();
$adv->hydrate($advice_data, (int)$id_lang);
$adv->id_tab = (int)Tab::getIdFromClassName($advice->tab);
$adv->add();
$this->processAdviceAsso($adv->id, $advice->display_conditions, $advice->hide_conditions, $advice->tabs, $cond_ids);
}
unset($adv);
} catch (Exception $e) {
continue;
}
}
}
public function processAdviceAsso($id_advice, $display_conditions, $hide_conditions, $tabs, $cond_ids)
{
Db::getInstance()->delete('condition_advice', 'id_advice='.(int)$id_advice);
if (is_array($display_conditions)) {
foreach ($display_conditions as $cond) {
Db::getInstance()->insert(
'condition_advice',
array(
'id_condition' => (int) $cond_ids[$cond], 'id_advice' => (int) $id_advice, 'display' => 1)
);
}
}
if (is_array($hide_conditions)) {
foreach ($hide_conditions as $cond) {
Db::getInstance()->insert(
'condition_advice',
array(
'id_condition' => (int) $cond_ids[$cond], 'id_advice' => (int) $id_advice, 'display' => 0)
);
}
}
Db::getInstance()->delete('tab_advice', 'id_advice='.(int)$id_advice);
if (isset($tabs) && is_array($tabs) && count($tabs)) {
foreach ($tabs as $tab) {
Db::getInstance()->insert(
'tab_advice',
array(
'id_tab' => (int)Tab::getIdFromClassName($tab), 'id_advice' => (int) $id_advice)
);
}
}
}
public function getFormatedConditionsIds()
{
$cond_ids = array();
$result = Db::getInstance()->executeS('SELECT `id_condition`, `id_ps_condition` FROM `'._DB_PREFIX_.'condition`');
foreach ($result as $res) {
$cond_ids[$res['id_ps_condition']] = $res['id_condition'];
}
return $cond_ids;
}
public function isFresh($file, $timeout = 86400000)
{
if (!file_exists($file)) {
return false;
}
$lastFileUpdate = filemtime($file) + $timeout;
$now = time();
return $now < $lastFileUpdate;
}
}

View File

@@ -0,0 +1,35 @@
<?php
/*
* 2007-2016 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2016 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/5.7/phpunit.xsd"
bootstrap="tests/autoload.php">
<testsuites>
<testsuite name="Unit tests">
<directory>tests/unit/</directory>
</testsuite>
<testsuite name="Functional tests">
<directory>tests/functional/</directory>
</testsuite>
</testsuites>
</phpunit>

View File

@@ -0,0 +1,9 @@
-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvMic33CMy+sTM2TakuUv
fqawhQ3amCfs9YEOijI3bIKFH4CjZzLAix1jJ7iF7zrQofPTH66FSo77X2bKCF7t
s7ec6m0YRwMJodBBtTE/eHOfG1T+V8CSlKaLCHLscsmXyvD+m6JyI3PO3rOS1nN/
JjzU0U0P6dPzEKFoNfBKEWfFhEA3i4G8rIEDPhTri7azLJpgFnAnHcjMc7v0bv89
hyd5ji3KVdYmAhNtTFq3Flpt7n/o/Qe5kgGhTId96uncUE9SU3EQWzk+RhXUeC3+
meU0kjADFj2y+PPifXFlP7+eBUix2e9Lmz/pb6iwgV2KYlWzmrG6auCLnpe1L5OU
YQIDAQAB
-----END PUBLIC KEY-----

View File

@@ -0,0 +1,104 @@
<?php
/*
* 2007-2016 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2016 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
$sql = array();
$sql[_DB_PREFIX_.'badge'] = 'CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'badge` (
`id_badge` int(11) NOT NULL AUTO_INCREMENT,
`id_ps_badge` int(11) NOT NULL,
`type` varchar(32) NOT NULL,
`id_group` int(11) NOT NULL,
`group_position` int(11) NOT NULL,
`scoring` int(11) NOT NULL,
`awb` INT NULL DEFAULT \'0\',
`validated` tinyint(1) unsigned NOT NULL DEFAULT 0,
PRIMARY KEY (`id_badge`)
) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8;';
$sql[_DB_PREFIX_.'badge_lang'] = 'CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'badge_lang` (
`id_badge` int(11) NOT NULL,
`id_lang` int(11) NOT NULL,
`name` varchar(64),
`description` varchar(255),
`group_name` varchar(255),
PRIMARY KEY (`id_badge`, `id_lang`)
) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8;';
$sql[_DB_PREFIX_.'condition'] = 'CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'condition` (
`id_condition` int(11) NOT NULL AUTO_INCREMENT,
`id_ps_condition` int(11) NOT NULL,
`type` enum(\'configuration\', \'install\', \'sql\') NOT NULL,
`request` text ,
`operator` varchar(32),
`value` varchar(64),
`result` varchar(64),
`calculation_type` enum(\'hook\', \'time\'),
`calculation_detail` varchar(64),
`validated` tinyint(1) unsigned NOT NULL DEFAULT 0,
`date_add` datetime NOT NULL,
`date_upd` datetime NOT NULL,
PRIMARY KEY (`id_condition`, `id_ps_condition`)
) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8;';
$sql[_DB_PREFIX_.'condition_badge'] = 'CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'condition_badge` (
`id_condition` int(11) NOT NULL,
`id_badge` int(11) NOT NULL,
PRIMARY KEY (`id_condition`, `id_badge`)
) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8;';
$sql[_DB_PREFIX_.'advice'] = 'CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'advice` (
`id_advice` int(11) NOT NULL AUTO_INCREMENT,
`id_ps_advice` int(11) NOT NULL,
`id_tab` int(11) NOT NULL,
`ids_tab` TEXT,
`validated` tinyint(1) unsigned NOT NULL DEFAULT 0,
`hide` tinyint(1) NOT NULL DEFAULT 0,
`location` enum(\'after\', \'before\') NOT NULL,
`selector` varchar(255),
`start_day` int(11) NOT NULL DEFAULT 0,
`stop_day` int(11) NOT NULL DEFAULT 0,
`weight` int(11) NULL DEFAULT \'1\',
PRIMARY KEY (`id_advice`)
) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8;';
$sql[_DB_PREFIX_.'advice_lang'] = 'CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'advice_lang` (
`id_advice` int(11) NOT NULL,
`id_lang` int(11) NOT NULL,
`html` TEXT,
PRIMARY KEY (`id_advice`, `id_lang`)
) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8;';
$sql[_DB_PREFIX_.'condition_advice'] = 'CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'condition_advice` (
`id_condition` int(11) NOT NULL,
`id_advice` int(11) NOT NULL,
`display` tinyint(1) unsigned NOT NULL DEFAULT 0,
PRIMARY KEY (`id_condition`, `id_advice`)
) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8;';
$sql[_DB_PREFIX_.'tab_advice'] = 'CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'tab_advice` (
`id_tab` int(11) NOT NULL,
`id_advice` int(11) NOT NULL,
PRIMARY KEY (`id_tab`, `id_advice`)
) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8;';

View File

@@ -0,0 +1,14 @@
<?php
require_once __DIR__ . '/../vendor/autoload.php';
// ========== Mocks ===========
require_once __DIR__ . '/mocks/ObjectModel.php';
// ======== Classes ===========
require_once __DIR__ . '/../classes/Advice.php';
require_once __DIR__ . '/../classes/GamificationTools.php';
if (!defined('_PS_VERSION_')) {
define('_PS_VERSION_', 'TEST_VERSION');
}

View File

@@ -0,0 +1,14 @@
<?php
use PHPUnit\Framework\TestCase;
class CallToGamificationServerTest extends TestCase
{
public function testContentIsGzipped()
{
$workingCallUrl = 'https://gamification.prestashop.com/json/data_EN_IDR_ID.json';
$response = GamificationTools::retrieveJsonApiFile($workingCallUrl, true);
$this->assertContains('Content-Encoding: gzip', $response);
}
}

View File

@@ -0,0 +1,20 @@
<?php
class ObjectModel
{
const TYPE_INT = 1;
const TYPE_BOOL = 2;
const TYPE_STRING = 3;
const TYPE_FLOAT = 4;
const TYPE_DATE = 5;
const TYPE_HTML = 6;
const TYPE_NOTHING = 7;
const TYPE_SQL = 8;
}

View File

@@ -0,0 +1,58 @@
<?php
use PHPUnit\Framework\TestCase;
class AdviceTest extends TestCase
{
/**
* @var array the list of expected properties of Advice model
*/
const ADVICE_PROPERTIES = [
'table',
'primary',
'multilang',
'fields',
];
/**
* @var array the list of fields of Advice model
*/
const ADVICE_FIELDS = [
'id_ps_advice',
'id_tab',
'selector',
'location',
'validated',
'start_day',
'stop_day',
'weight',
'html',
];
/**
* @var array the Advice
*/
private $advice;
protected function setUp()
{
$this->advice = new Advice();
}
public function testAdviceDefinitionIsValid()
{
$definition = Advice::$definition;
$this->assertInternalType('array', $definition);
foreach (self::ADVICE_PROPERTIES as $property) {
$this->assertArrayHasKey($property, $definition);
}
$fieldsProperty = $definition['fields'];
foreach (self::ADVICE_FIELDS as $field) {
$this->assertArrayHasKey($field, $fieldsProperty);
}
}
}

View File

@@ -0,0 +1,41 @@
<?php
global $_MODULE;
$_MODULE = array();
$_MODULE['<{gamification}prestashop>gamification_3d4aafb2eedeba2fbf92e852f0af745a'] = 'Obchodní znalosti';
$_MODULE['<{gamification}prestashop>gamification_bacc1bf300527bad9c6ac2d3b875a8d8'] = 'Staňte se e-commerce expertem mrknutím oka!';
$_MODULE['<{gamification}prestashop>admingamificationcontroller_ca96b4f8d13722aac99da25f94ea1711'] = 'Vaše obchodní znalosti';
$_MODULE['<{gamification}prestashop>admingamificationcontroller_98f770b0af18ca763421bac22b4b6805'] = 'Funkce';
$_MODULE['<{gamification}prestashop>admingamificationcontroller_f5c7922da355fd289ec1d6469e0583a7'] = 'Dosažené výsledky';
$_MODULE['<{gamification}prestashop>admingamificationcontroller_8189ecf686157db0c0274c1f49373318'] = 'Mezinárodní';
$_MODULE['<{gamification}prestashop>admingamificationcontroller_851f12a0c936baace7f0e734d5c624e7'] = '1. Začátečník';
$_MODULE['<{gamification}prestashop>admingamificationcontroller_583981a16ea761fe852b64094d8a887e'] = '2. Profesionál';
$_MODULE['<{gamification}prestashop>admingamificationcontroller_38f7af7416ffcd1524d8a4acda756cbf'] = '3. Expert';
$_MODULE['<{gamification}prestashop>admingamificationcontroller_e7613fe56cdbeddfc9bb6276fd0f0d12'] = '4. Kouzelník';
$_MODULE['<{gamification}prestashop>admingamificationcontroller_8d03eaad7ff7babdd33c2c74fe479ed0'] = '5. Guru';
$_MODULE['<{gamification}prestashop>admingamificationcontroller_e4be4f3e3ae4ee9dda6b60815bf774c1'] = '6. Legenda';
$_MODULE['<{gamification}prestashop>filters_b1c94ca2fbc3e78fc30069c8d0f01680'] = 'Všechny';
$_MODULE['<{gamification}prestashop>filters_5364259abab90e94890f2ed2481b9824'] = 'Ověřeno';
$_MODULE['<{gamification}prestashop>filters_dc450ba947e6adecbdbe68c25de03a1b'] = 'Neověřeno';
$_MODULE['<{gamification}prestashop>filters_07ad815187b53dc2ceaf5ad6e0a12bb1'] = 'Úroveň:';
$_MODULE['<{gamification}prestashop>view_a0db49ba470c1c9ae2128c3470339153'] = 'Úroveň';
$_MODULE['<{gamification}prestashop>view_2a0ab6a9172272d54f0d601b0ac157f3'] = 'Staňte e-commerce expertem mílovými kroky!';
$_MODULE['<{gamification}prestashop>view_cb3d475bd997e38c100704631dbab020'] = 'Se všemi skvělými funkcemi a výhodami, které nabízí PrestaShop, je důležité udržet krok!';
$_MODULE['<{gamification}prestashop>view_2c3193c85bb2555c333adfcfb824804a'] = 'Hlavním cílem všech funkcí, které nabízíme, je, aby se vám dařilo v e-commerce světě. Za účelem dosažení tohoto cíle, jsme vytvořili systém známek a bodů, které vám usnadní sledovat své pokroky obchodníka. Systém je členěn do tří úrovní, z nichž všechny jsou nedílnou součástí úspěchu ve světě e-commerce: (I) Používání klíčových e-commerce funkcí ve vašem obchodě; (II) Výkonnost vašeho obchodu; (III) Přítomnost obchodu na mezinárodních trzích.';
$_MODULE['<{gamification}prestashop>view_6b766dc388ad21053bde0f8fd95d1e04'] = 'Čím většího pokroku dosáhne váš obchod, tím více známek a bodů získáte. Není třeba zasílat jakékoli informace nebo vyplňovat formuláře, víme, jak jste zaneprázdněni, vše je automatické!';
$_MODULE['<{gamification}prestashop>view_21dc1cfc9ef1cdfbb665cab323d5e1a9'] = 'Nyní, kliknutím na tlačítko, budete mít možnost vidět vlastnosti zlepšujícího se prodeje, které mohou zatím chybět. Využijte tyto výhody a podívejte se na to níže!';
$_MODULE['<{gamification}prestashop>view_8ba134cf899d862079bbf3964bc7d7d4'] = 'Náš tým je k dispozici, aby vám pomohl k pokroku... Kontaktujte nás nyní!';
$_MODULE['<{gamification}prestashop>view_bcc254b55c4a1babdf1dcb82c207506b'] = 'Telefon';
$_MODULE['<{gamification}prestashop>view_b39131f9b4f81406be4f9cca784f99c8'] = 'Telefonicky: +1 (888) 947.6543';
$_MODULE['<{gamification}prestashop>view_ce8ae9da5b7cd6c3df2929543a9af92d'] = 'E-mail';
$_MODULE['<{gamification}prestashop>view_119c7e70192829bf606e3774254c6167'] = 'E-mailem';
$_MODULE['<{gamification}prestashop>view_6b6ac7834d96afefbca5677814769109'] = 'Dosažená úroveň';
$_MODULE['<{gamification}prestashop>view_82338dd23ce2fd2f6d3606c20f4ee96e'] = 'Žádná známka v této sekci';
$_MODULE['<{gamification}prestashop>notification_a0db49ba470c1c9ae2128c3470339153'] = 'Úroveň';
$_MODULE['<{gamification}prestashop>notification_ca96b4f8d13722aac99da25f94ea1711'] = 'Vaše obchodní znalosti';
$_MODULE['<{gamification}prestashop>notification_16a1daea9e8873542aec1e820798aa44'] = 'Poslední známka:';
$_MODULE['<{gamification}prestashop>notification_15377177c0259c6f79341cc57da13f19'] = 'Další známka:';
$_MODULE['<{gamification}prestashop>notification_f8978f781f97e6f851e9c8f7059c37b2'] = 'Zobrazit můj celý profil';
$_MODULE['<{gamification}prestashop>filters_e659b52eba1f0299b2d8ca3483919e72'] = 'Typ:';
$_MODULE['<{gamification}prestashop>filters_18325105de95083e4a1d10b78f29c2bc'] = 'Stav:';

View File

@@ -0,0 +1,41 @@
<?php
global $_MODULE;
$_MODULE = array();
$_MODULE['<{gamification}prestashop>gamification_3d4aafb2eedeba2fbf92e852f0af745a'] = 'Handelserfolg';
$_MODULE['<{gamification}prestashop>gamification_bacc1bf300527bad9c6ac2d3b875a8d8'] = 'E-Commerce-Experte im Handumdrehn!';
$_MODULE['<{gamification}prestashop>admingamificationcontroller_ca96b4f8d13722aac99da25f94ea1711'] = 'Ihr Handelserfolg';
$_MODULE['<{gamification}prestashop>admingamificationcontroller_98f770b0af18ca763421bac22b4b6805'] = 'Maßnahmen';
$_MODULE['<{gamification}prestashop>admingamificationcontroller_f5c7922da355fd289ec1d6469e0583a7'] = 'Erreichte Ziele';
$_MODULE['<{gamification}prestashop>admingamificationcontroller_8189ecf686157db0c0274c1f49373318'] = 'International';
$_MODULE['<{gamification}prestashop>admingamificationcontroller_851f12a0c936baace7f0e734d5c624e7'] = '1. Anfänger';
$_MODULE['<{gamification}prestashop>admingamificationcontroller_583981a16ea761fe852b64094d8a887e'] = '2. Profi';
$_MODULE['<{gamification}prestashop>admingamificationcontroller_38f7af7416ffcd1524d8a4acda756cbf'] = '3. Experte';
$_MODULE['<{gamification}prestashop>admingamificationcontroller_e7613fe56cdbeddfc9bb6276fd0f0d12'] = '4.Genie';
$_MODULE['<{gamification}prestashop>admingamificationcontroller_8d03eaad7ff7babdd33c2c74fe479ed0'] = '5. Guru';
$_MODULE['<{gamification}prestashop>admingamificationcontroller_e4be4f3e3ae4ee9dda6b60815bf774c1'] = '6. Legende';
$_MODULE['<{gamification}prestashop>filters_b1c94ca2fbc3e78fc30069c8d0f01680'] = 'Alle';
$_MODULE['<{gamification}prestashop>filters_5364259abab90e94890f2ed2481b9824'] = 'Geprüft';
$_MODULE['<{gamification}prestashop>filters_dc450ba947e6adecbdbe68c25de03a1b'] = 'Ungeprüft';
$_MODULE['<{gamification}prestashop>filters_07ad815187b53dc2ceaf5ad6e0a12bb1'] = 'Ebene:';
$_MODULE['<{gamification}prestashop>view_a0db49ba470c1c9ae2128c3470339153'] = 'Ebene';
$_MODULE['<{gamification}prestashop>view_2a0ab6a9172272d54f0d601b0ac157f3'] = 'Ihr Quantensprung zum E-Commerce-Experten!';
$_MODULE['<{gamification}prestashop>view_cb3d475bd997e38c100704631dbab020'] = 'Halten Sie sich stets auf dem Laufenden über all die großartigen Funktionen und Vorteile, die PrestaShop bietet!';
$_MODULE['<{gamification}prestashop>view_2c3193c85bb2555c333adfcfb824804a'] = 'Alle angebotenen Features dienen nur einem Ziel: Ihrem Erfolg inn der Welt des E-Commerce. Um dies zu erreichen, haben wir ein System von Abzeichen und Punkten entwickelt, die auf einfache Weise Ihren Fortschritte als Händler markieren. Wir haben die systematische Bewertung auf drei Ebenen konzentriert, auf denen sich ihr erfolgreicher Aufstieg in der Welt des E-Commerce vollzieht: (1) Ihre Nutzung der E-Commerce-Schlüsselfunktionen Ihres Shops, (2) Ihre Umsatzentwicklung, (3) Ihre Präsenz in internationalen Märkten.';
$_MODULE['<{gamification}prestashop>view_6b766dc388ad21053bde0f8fd95d1e04'] = 'Je mehr Fortschritte Ihr Shop macht, desto mehr Abzeichen und Punkte bekommen Sie! Alles geschieht vollautomatisch - sie brauchen uns also keinerlei Eckdaten zu übermitteln oder irgendwelche Formulare auszufüllen. Wir wissen doch, dass Zeit Geld für Sie bedeutet.';
$_MODULE['<{gamification}prestashop>view_21dc1cfc9ef1cdfbb665cab323d5e1a9'] = 'Nach einem Klick auf den Button sehen Sie verkaufsfördernde Maßnahmen, die sie vielleicht versäumt haben. Nutzen Sie den Vorteil und überprüfen Sie das Untenstehende!';
$_MODULE['<{gamification}prestashop>view_8ba134cf899d862079bbf3964bc7d7d4'] = 'Unser Team hilft Ihnen bei Ihrem Fortschritt - Kontaktieren Sie uns jetzt!';
$_MODULE['<{gamification}prestashop>view_bcc254b55c4a1babdf1dcb82c207506b'] = 'Telefon';
$_MODULE['<{gamification}prestashop>view_b39131f9b4f81406be4f9cca784f99c8'] = 'Per Telefon: +1 (888) 9476543';
$_MODULE['<{gamification}prestashop>view_ce8ae9da5b7cd6c3df2929543a9af92d'] = 'E-Mail';
$_MODULE['<{gamification}prestashop>view_119c7e70192829bf606e3774254c6167'] = 'Per E-Mail';
$_MODULE['<{gamification}prestashop>view_6b6ac7834d96afefbca5677814769109'] = 'Grad der Erfüllung';
$_MODULE['<{gamification}prestashop>view_82338dd23ce2fd2f6d3606c20f4ee96e'] = 'Kein Abzeichen für diese Abteilung';
$_MODULE['<{gamification}prestashop>notification_a0db49ba470c1c9ae2128c3470339153'] = 'Ebene';
$_MODULE['<{gamification}prestashop>notification_ca96b4f8d13722aac99da25f94ea1711'] = 'Ihr Handelserfolg';
$_MODULE['<{gamification}prestashop>notification_16a1daea9e8873542aec1e820798aa44'] = 'Letztes Abzeichen :';
$_MODULE['<{gamification}prestashop>notification_15377177c0259c6f79341cc57da13f19'] = 'Nächstes Abzeichen :';
$_MODULE['<{gamification}prestashop>notification_f8978f781f97e6f851e9c8f7059c37b2'] = 'Zeile mein volles Profil';
$_MODULE['<{gamification}prestashop>filters_e659b52eba1f0299b2d8ca3483919e72'] = 'Typ';
$_MODULE['<{gamification}prestashop>filters_18325105de95083e4a1d10b78f29c2bc'] = 'Status';

View File

@@ -0,0 +1,41 @@
<?php
global $_MODULE;
$_MODULE = array();
$_MODULE['<{gamification}prestashop>gamification_3d4aafb2eedeba2fbf92e852f0af745a'] = 'Experiencia minorista';
$_MODULE['<{gamification}prestashop>gamification_bacc1bf300527bad9c6ac2d3b875a8d8'] = '¡ Conviértase en un experto en e-commerce en un abrir y cerrar de ojos!';
$_MODULE['<{gamification}prestashop>admingamificationcontroller_ca96b4f8d13722aac99da25f94ea1711'] = 'Tu experiencia de minorista';
$_MODULE['<{gamification}prestashop>admingamificationcontroller_98f770b0af18ca763421bac22b4b6805'] = 'Características';
$_MODULE['<{gamification}prestashop>admingamificationcontroller_f5c7922da355fd289ec1d6469e0583a7'] = 'Logros';
$_MODULE['<{gamification}prestashop>admingamificationcontroller_8189ecf686157db0c0274c1f49373318'] = 'Internacional';
$_MODULE['<{gamification}prestashop>admingamificationcontroller_851f12a0c936baace7f0e734d5c624e7'] = '1. Principiante';
$_MODULE['<{gamification}prestashop>admingamificationcontroller_583981a16ea761fe852b64094d8a887e'] = '2. Pro';
$_MODULE['<{gamification}prestashop>admingamificationcontroller_38f7af7416ffcd1524d8a4acda756cbf'] = '3. Experto';
$_MODULE['<{gamification}prestashop>admingamificationcontroller_e7613fe56cdbeddfc9bb6276fd0f0d12'] = '4. Mago';
$_MODULE['<{gamification}prestashop>admingamificationcontroller_8d03eaad7ff7babdd33c2c74fe479ed0'] = '5. Guru';
$_MODULE['<{gamification}prestashop>admingamificationcontroller_e4be4f3e3ae4ee9dda6b60815bf774c1'] = '6. Leyenda';
$_MODULE['<{gamification}prestashop>filters_b1c94ca2fbc3e78fc30069c8d0f01680'] = 'Todos';
$_MODULE['<{gamification}prestashop>filters_5364259abab90e94890f2ed2481b9824'] = 'Validado';
$_MODULE['<{gamification}prestashop>filters_dc450ba947e6adecbdbe68c25de03a1b'] = 'No validado';
$_MODULE['<{gamification}prestashop>filters_07ad815187b53dc2ceaf5ad6e0a12bb1'] = 'Nivel:';
$_MODULE['<{gamification}prestashop>view_a0db49ba470c1c9ae2128c3470339153'] = 'Nivel';
$_MODULE['<{gamification}prestashop>view_2a0ab6a9172272d54f0d601b0ac157f3'] = '¡ Conviértase en un experto en e-commerce a pasos agigantados!';
$_MODULE['<{gamification}prestashop>view_cb3d475bd997e38c100704631dbab020'] = 'Con todas las importantes características y beneficios que ofrece PrestaShop, ¡Es importante seguir el ritmo!';
$_MODULE['<{gamification}prestashop>view_2c3193c85bb2555c333adfcfb824804a'] = 'El principal objetivo de todas las características que ofrecemos es ayudarle a que tenga éxito en el mundo del e-commerce. Para conseguir este objetivo hemos creado un sistema de medallas y puntos para monitorizar fácilmente su progreso como minorista. Hemos desgranado el sistema en tres niveles, todos los cuales están integrados para triunfar en el mundo del e-commerce: (i) Uso de características clave del e-commerce en su tienda; (ii) El desempeño de sus ventas; (iii) Su presencia en los mercados internacionales.';
$_MODULE['<{gamification}prestashop>view_6b766dc388ad21053bde0f8fd95d1e04'] = 'Cuanto más progreso haga su tienda, más medallas y puntos ganarás. No necesita enviar información o rellenar ningún formulario; nosotros sabemos que está ocupado, ¡todo es automático!';
$_MODULE['<{gamification}prestashop>view_21dc1cfc9ef1cdfbb665cab323d5e1a9'] = 'Ahora pinchando un botón podrá ver las características para mejorar sus ventas que puede estarse perdiedo. ¡Tome ventaja y échele un vistazo abajo!';
$_MODULE['<{gamification}prestashop>view_8ba134cf899d862079bbf3964bc7d7d4'] = 'Nuestro equipo está disponible para ayudarle en su progreso... ¡Contacte con nosotros!';
$_MODULE['<{gamification}prestashop>view_bcc254b55c4a1babdf1dcb82c207506b'] = 'Teléfono';
$_MODULE['<{gamification}prestashop>view_b39131f9b4f81406be4f9cca784f99c8'] = 'Por teléfono: +1 (888) 947.6543';
$_MODULE['<{gamification}prestashop>view_ce8ae9da5b7cd6c3df2929543a9af92d'] = 'Email';
$_MODULE['<{gamification}prestashop>view_119c7e70192829bf606e3774254c6167'] = 'Por email';
$_MODULE['<{gamification}prestashop>view_6b6ac7834d96afefbca5677814769109'] = 'Nivel completado';
$_MODULE['<{gamification}prestashop>view_82338dd23ce2fd2f6d3606c20f4ee96e'] = 'No hay medallas en esta sección';
$_MODULE['<{gamification}prestashop>notification_a0db49ba470c1c9ae2128c3470339153'] = 'Nivel';
$_MODULE['<{gamification}prestashop>notification_ca96b4f8d13722aac99da25f94ea1711'] = 'Tu experiencia de minorista';
$_MODULE['<{gamification}prestashop>notification_16a1daea9e8873542aec1e820798aa44'] = 'Última medalla:';
$_MODULE['<{gamification}prestashop>notification_15377177c0259c6f79341cc57da13f19'] = 'Próxima medalla:';
$_MODULE['<{gamification}prestashop>notification_f8978f781f97e6f851e9c8f7059c37b2'] = 'Ver mi perfil completo';
$_MODULE['<{gamification}prestashop>filters_e659b52eba1f0299b2d8ca3483919e72'] = 'Tipo:';
$_MODULE['<{gamification}prestashop>filters_18325105de95083e4a1d10b78f29c2bc'] = 'Estado';

View File

@@ -0,0 +1,41 @@
<?php
global $_MODULE;
$_MODULE = array();
$_MODULE['<{gamification}prestashop>gamification_3d4aafb2eedeba2fbf92e852f0af745a'] = 'Expertise PrestaShop';
$_MODULE['<{gamification}prestashop>gamification_bacc1bf300527bad9c6ac2d3b875a8d8'] = 'Devenez un marchand accompli à pas de géant !';
$_MODULE['<{gamification}prestashop>admingamificationcontroller_ca96b4f8d13722aac99da25f94ea1711'] = 'Votre Expertise PrestaShop';
$_MODULE['<{gamification}prestashop>admingamificationcontroller_98f770b0af18ca763421bac22b4b6805'] = 'Fonctionnalités';
$_MODULE['<{gamification}prestashop>admingamificationcontroller_f5c7922da355fd289ec1d6469e0583a7'] = 'Succès';
$_MODULE['<{gamification}prestashop>admingamificationcontroller_8189ecf686157db0c0274c1f49373318'] = 'International';
$_MODULE['<{gamification}prestashop>admingamificationcontroller_851f12a0c936baace7f0e734d5c624e7'] = '1. Débutant';
$_MODULE['<{gamification}prestashop>admingamificationcontroller_583981a16ea761fe852b64094d8a887e'] = '2. Pro';
$_MODULE['<{gamification}prestashop>admingamificationcontroller_38f7af7416ffcd1524d8a4acda756cbf'] = '3. Expert';
$_MODULE['<{gamification}prestashop>admingamificationcontroller_e7613fe56cdbeddfc9bb6276fd0f0d12'] = '4. Maître';
$_MODULE['<{gamification}prestashop>admingamificationcontroller_8d03eaad7ff7babdd33c2c74fe479ed0'] = '5. Gourou';
$_MODULE['<{gamification}prestashop>admingamificationcontroller_e4be4f3e3ae4ee9dda6b60815bf774c1'] = '6. Légende';
$_MODULE['<{gamification}prestashop>filters_b1c94ca2fbc3e78fc30069c8d0f01680'] = 'Tous';
$_MODULE['<{gamification}prestashop>filters_5364259abab90e94890f2ed2481b9824'] = 'Validé';
$_MODULE['<{gamification}prestashop>filters_dc450ba947e6adecbdbe68c25de03a1b'] = 'Non validé';
$_MODULE['<{gamification}prestashop>filters_07ad815187b53dc2ceaf5ad6e0a12bb1'] = 'Niveau :';
$_MODULE['<{gamification}prestashop>view_a0db49ba470c1c9ae2128c3470339153'] = 'Niveau';
$_MODULE['<{gamification}prestashop>view_2a0ab6a9172272d54f0d601b0ac157f3'] = 'Devenez un marchand accompli à pas de géant !';
$_MODULE['<{gamification}prestashop>view_cb3d475bd997e38c100704631dbab020'] = 'L\'équipe PrestaShop vous accompagne dans votre aventure e-commerce : au fil des progrès réalisés dans la conception et l\'administration de votre boutique en ligne, nous vous décernons des badges symbolisant votre niveau d\'expertise.';
$_MODULE['<{gamification}prestashop>view_2c3193c85bb2555c333adfcfb824804a'] = 'A chaque badge décerné, vous gagnez des points et nous vous présentons la prochaine action à réaliser selon votre activité. Vous êtes ainsi guidé(e) vers une boutique parfaitement configurée et optimisée pour votre succès !';
$_MODULE['<{gamification}prestashop>view_6b766dc388ad21053bde0f8fd95d1e04'] = 'Nous avons défini 3 thèmes essentiels pour évaluer le niveau de développement de votre boutique : les fonctionnalités clés à configurer, vos performances commerciales et votre visibilité à l\'international.';
$_MODULE['<{gamification}prestashop>view_21dc1cfc9ef1cdfbb665cab323d5e1a9'] = 'A vous de jouer !';
$_MODULE['<{gamification}prestashop>view_8ba134cf899d862079bbf3964bc7d7d4'] = 'Notre équipe est à votre disposition pour vous aider à progresser... Contactez-nous !';
$_MODULE['<{gamification}prestashop>view_bcc254b55c4a1babdf1dcb82c207506b'] = 'Téléphone';
$_MODULE['<{gamification}prestashop>view_b39131f9b4f81406be4f9cca784f99c8'] = 'Par téléphone : +33 (0)1 40 18 30 04';
$_MODULE['<{gamification}prestashop>view_ce8ae9da5b7cd6c3df2929543a9af92d'] = 'Email';
$_MODULE['<{gamification}prestashop>view_119c7e70192829bf606e3774254c6167'] = 'Par email';
$_MODULE['<{gamification}prestashop>view_6b6ac7834d96afefbca5677814769109'] = 'Progrès';
$_MODULE['<{gamification}prestashop>view_82338dd23ce2fd2f6d3606c20f4ee96e'] = 'Pas de badge dans cette section';
$_MODULE['<{gamification}prestashop>notification_a0db49ba470c1c9ae2128c3470339153'] = 'Niveau';
$_MODULE['<{gamification}prestashop>notification_ca96b4f8d13722aac99da25f94ea1711'] = 'Votre Expertise PrestaShop';
$_MODULE['<{gamification}prestashop>notification_16a1daea9e8873542aec1e820798aa44'] = 'Dernier badge gagné :';
$_MODULE['<{gamification}prestashop>notification_15377177c0259c6f79341cc57da13f19'] = 'Prochain badge :';
$_MODULE['<{gamification}prestashop>notification_f8978f781f97e6f851e9c8f7059c37b2'] = 'Voir mon profil complet';
$_MODULE['<{gamification}prestashop>filters_e659b52eba1f0299b2d8ca3483919e72'] = 'Type :';
$_MODULE['<{gamification}prestashop>filters_18325105de95083e4a1d10b78f29c2bc'] = 'Etat :';

View File

@@ -0,0 +1,35 @@
<?php
/*
* 2007-2016 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2016 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

View File

@@ -0,0 +1,41 @@
<?php
global $_MODULE;
$_MODULE = array();
$_MODULE['<{gamification}prestashop>gamification_3d4aafb2eedeba2fbf92e852f0af745a'] = 'Esperienza Commerciante';
$_MODULE['<{gamification}prestashop>gamification_bacc1bf300527bad9c6ac2d3b875a8d8'] = 'Diventa un esperto di e-commerce in un batter d\'occhio!';
$_MODULE['<{gamification}prestashop>admingamificationcontroller_ca96b4f8d13722aac99da25f94ea1711'] = 'La tua Esperienza Commerciante';
$_MODULE['<{gamification}prestashop>admingamificationcontroller_98f770b0af18ca763421bac22b4b6805'] = 'Caratteristiche';
$_MODULE['<{gamification}prestashop>admingamificationcontroller_f5c7922da355fd289ec1d6469e0583a7'] = 'Obiettivi';
$_MODULE['<{gamification}prestashop>admingamificationcontroller_8189ecf686157db0c0274c1f49373318'] = 'Internazionale';
$_MODULE['<{gamification}prestashop>admingamificationcontroller_851f12a0c936baace7f0e734d5c624e7'] = '1. Principiante';
$_MODULE['<{gamification}prestashop>admingamificationcontroller_583981a16ea761fe852b64094d8a887e'] = '2. Pro';
$_MODULE['<{gamification}prestashop>admingamificationcontroller_38f7af7416ffcd1524d8a4acda756cbf'] = '3. Esperto';
$_MODULE['<{gamification}prestashop>admingamificationcontroller_e7613fe56cdbeddfc9bb6276fd0f0d12'] = '4. Mago';
$_MODULE['<{gamification}prestashop>admingamificationcontroller_8d03eaad7ff7babdd33c2c74fe479ed0'] = '5. Guru';
$_MODULE['<{gamification}prestashop>admingamificationcontroller_e4be4f3e3ae4ee9dda6b60815bf774c1'] = '6. Leggenda';
$_MODULE['<{gamification}prestashop>filters_b1c94ca2fbc3e78fc30069c8d0f01680'] = 'Tutti';
$_MODULE['<{gamification}prestashop>filters_5364259abab90e94890f2ed2481b9824'] = 'Validato';
$_MODULE['<{gamification}prestashop>filters_dc450ba947e6adecbdbe68c25de03a1b'] = 'Non validato';
$_MODULE['<{gamification}prestashop>filters_07ad815187b53dc2ceaf5ad6e0a12bb1'] = 'Livello:';
$_MODULE['<{gamification}prestashop>view_a0db49ba470c1c9ae2128c3470339153'] = 'Livello';
$_MODULE['<{gamification}prestashop>view_2a0ab6a9172272d54f0d601b0ac157f3'] = 'Diventa un esperto di e-commerce in passi da gigante!';
$_MODULE['<{gamification}prestashop>view_cb3d475bd997e38c100704631dbab020'] = 'Con tutte le grandi caratteristiche e benefici che PrestaShop offre, è importante tenere il passo!';
$_MODULE['<{gamification}prestashop>view_2c3193c85bb2555c333adfcfb824804a'] = 'L\'obiettivo principale di tutte le caratteristiche che offriamo è quello di far avere successo nel mondo dell\'e-commerce. Per realizzare questo, abbiamo creato un sistema di medaglie e punti che lo rendono facile per monitorare i tuoi progressi come un commerciante. Abbiamo suddiviso il sistema in tre livelli, ognuno dei quali sono parte integrante del successo nel mondo dell\'e-commerce: (I) L\'utilizzo delle funzionalità di e-commerce chiave sul tuo negozio, (II) le prestazioni del fatturato, (III) la presenza sui mercati internazionali.';
$_MODULE['<{gamification}prestashop>view_6b766dc388ad21053bde0f8fd95d1e04'] = 'Il più progressi fai con il tuo negozio, più medaglie e punti si guadagnano. Non c\'è bisogno di fornire alcuna informazione o compilare alcun modulo, sappiamo quanto vi siete impegnati, tutto è automatico!';
$_MODULE['<{gamification}prestashop>view_21dc1cfc9ef1cdfbb665cab323d5e1a9'] = 'Ora, con un click, si sarà in grado di vedere le migliorie di vendita che si potrebbero essere mancante. Approfitta e controlla qui sotto!';
$_MODULE['<{gamification}prestashop>view_8ba134cf899d862079bbf3964bc7d7d4'] = 'Il nostro Team è disponibile ad aiutare il tuo progresso... Contattaci Ora!';
$_MODULE['<{gamification}prestashop>view_bcc254b55c4a1babdf1dcb82c207506b'] = 'Telefono';
$_MODULE['<{gamification}prestashop>view_b39131f9b4f81406be4f9cca784f99c8'] = 'Per telefono: +1 (888) 947.6543';
$_MODULE['<{gamification}prestashop>view_ce8ae9da5b7cd6c3df2929543a9af92d'] = 'Email';
$_MODULE['<{gamification}prestashop>view_119c7e70192829bf606e3774254c6167'] = 'Per email';
$_MODULE['<{gamification}prestashop>view_6b6ac7834d96afefbca5677814769109'] = 'Livello di completamento';
$_MODULE['<{gamification}prestashop>view_82338dd23ce2fd2f6d3606c20f4ee96e'] = 'Nessuna medaglia in questa sezione';
$_MODULE['<{gamification}prestashop>notification_a0db49ba470c1c9ae2128c3470339153'] = 'Livello';
$_MODULE['<{gamification}prestashop>notification_ca96b4f8d13722aac99da25f94ea1711'] = 'La tua Esperienza Commerciante';
$_MODULE['<{gamification}prestashop>notification_16a1daea9e8873542aec1e820798aa44'] = 'Ultima medaglia:';
$_MODULE['<{gamification}prestashop>notification_15377177c0259c6f79341cc57da13f19'] = 'Prossima Medaglia:';
$_MODULE['<{gamification}prestashop>notification_f8978f781f97e6f851e9c8f7059c37b2'] = 'Vedi il mio profilo completo';
$_MODULE['<{gamification}prestashop>filters_e659b52eba1f0299b2d8ca3483919e72'] = 'Tipo:';
$_MODULE['<{gamification}prestashop>filters_18325105de95083e4a1d10b78f29c2bc'] = 'Stato:';

View File

@@ -0,0 +1,41 @@
<?php
global $_MODULE;
$_MODULE = array();
$_MODULE['<{gamification}prestashop>gamification_3d4aafb2eedeba2fbf92e852f0af745a'] = 'Umiejętności sprzedawcy';
$_MODULE['<{gamification}prestashop>gamification_bacc1bf300527bad9c6ac2d3b875a8d8'] = 'Zostań ekspertem e-commerce w mgnieniu oka!';
$_MODULE['<{gamification}prestashop>admingamificationcontroller_ca96b4f8d13722aac99da25f94ea1711'] = 'Twoje umiejętności sprzedawcy';
$_MODULE['<{gamification}prestashop>admingamificationcontroller_98f770b0af18ca763421bac22b4b6805'] = 'Cechy';
$_MODULE['<{gamification}prestashop>admingamificationcontroller_f5c7922da355fd289ec1d6469e0583a7'] = 'Osiągnięcia';
$_MODULE['<{gamification}prestashop>admingamificationcontroller_8189ecf686157db0c0274c1f49373318'] = 'Międzynarodowy';
$_MODULE['<{gamification}prestashop>admingamificationcontroller_851f12a0c936baace7f0e734d5c624e7'] = '1. Poczatkujący';
$_MODULE['<{gamification}prestashop>admingamificationcontroller_583981a16ea761fe852b64094d8a887e'] = '2. Profesjonalista';
$_MODULE['<{gamification}prestashop>admingamificationcontroller_38f7af7416ffcd1524d8a4acda756cbf'] = '3. Ekspert';
$_MODULE['<{gamification}prestashop>admingamificationcontroller_e7613fe56cdbeddfc9bb6276fd0f0d12'] = '4. Magik';
$_MODULE['<{gamification}prestashop>admingamificationcontroller_8d03eaad7ff7babdd33c2c74fe479ed0'] = '5. Guru';
$_MODULE['<{gamification}prestashop>admingamificationcontroller_e4be4f3e3ae4ee9dda6b60815bf774c1'] = '6. Legenda';
$_MODULE['<{gamification}prestashop>filters_b1c94ca2fbc3e78fc30069c8d0f01680'] = 'Wszystko';
$_MODULE['<{gamification}prestashop>filters_5364259abab90e94890f2ed2481b9824'] = 'Zatwierdzony';
$_MODULE['<{gamification}prestashop>filters_dc450ba947e6adecbdbe68c25de03a1b'] = 'Nie zatwierdzony';
$_MODULE['<{gamification}prestashop>filters_07ad815187b53dc2ceaf5ad6e0a12bb1'] = 'Poziom:';
$_MODULE['<{gamification}prestashop>view_a0db49ba470c1c9ae2128c3470339153'] = 'Poziom';
$_MODULE['<{gamification}prestashop>view_2a0ab6a9172272d54f0d601b0ac157f3'] = 'Zostań ekspertem e-commerce w podskokach!';
$_MODULE['<{gamification}prestashop>view_cb3d475bd997e38c100704631dbab020'] = 'Bardzo ważne jest bycie na czasie ze wszystkimi wspaniałymi funkcjami i korzyściami oferowanymi przez PrestaShop!';
$_MODULE['<{gamification}prestashop>view_2c3193c85bb2555c333adfcfb824804a'] = 'Głównym celem wszystkich oferowanych przez nas funkcji jest pozwolić Ci robić postępy w świecie e-commerce. Aby to osiągnąć, stworzyliśmy system odznaczeń i punktów które ułatwiają monitorowanie twoich postępów jako sprzedawcy. Rozdzieliliśmy system na trzy poziomy, z których każdy jest integralną częścią sukcesu w świecie e-commerce: (i) Twoje użycie kluczowych funkcji e-commerce w Twoim sklepie; (ii) Twoje wyniki sprzedaży; (iii) Twoja obecność na rynkach międzynarodowych.';
$_MODULE['<{gamification}prestashop>view_6b766dc388ad21053bde0f8fd95d1e04'] = 'Im większe postępy robi Twój sklep, tym więcej odznaczeń i punktów dostaniesz. Nie trzeba wysyłać żadnych informacji lub wypełniać żadnych formularzy; wiemy jak bardzo jesteś zajęty, wszystko dzieje się automatycznie!';
$_MODULE['<{gamification}prestashop>view_21dc1cfc9ef1cdfbb665cab323d5e1a9'] = 'Teraz, za pomocą jednego kliknięcia, będziesz mógł zobaczyć funkcje wspomagające sprzedaż, które mogłeś pomijać do tej pory. Wykorzystaj to i sprawdź te informacje poniżej!';
$_MODULE['<{gamification}prestashop>view_8ba134cf899d862079bbf3964bc7d7d4'] = 'Nasz Zespół pomoże Ci zrobić postępy... Skontaktuj się z nami teraz!';
$_MODULE['<{gamification}prestashop>view_bcc254b55c4a1babdf1dcb82c207506b'] = 'Telefon';
$_MODULE['<{gamification}prestashop>view_b39131f9b4f81406be4f9cca784f99c8'] = 'Telefonicznie: +1 (888) 947.6543';
$_MODULE['<{gamification}prestashop>view_ce8ae9da5b7cd6c3df2929543a9af92d'] = 'E-mail';
$_MODULE['<{gamification}prestashop>view_119c7e70192829bf606e3774254c6167'] = 'Za pomocą e-maila';
$_MODULE['<{gamification}prestashop>view_6b6ac7834d96afefbca5677814769109'] = 'Poziom wykonania';
$_MODULE['<{gamification}prestashop>view_82338dd23ce2fd2f6d3606c20f4ee96e'] = 'Brak odznaki w tej sekcji';
$_MODULE['<{gamification}prestashop>notification_a0db49ba470c1c9ae2128c3470339153'] = 'Poziom';
$_MODULE['<{gamification}prestashop>notification_ca96b4f8d13722aac99da25f94ea1711'] = 'Twoje doświadczenie sprzedawcy';
$_MODULE['<{gamification}prestashop>notification_16a1daea9e8873542aec1e820798aa44'] = 'Ostatnia odznaka:';
$_MODULE['<{gamification}prestashop>notification_15377177c0259c6f79341cc57da13f19'] = 'Następna odznaka:';
$_MODULE['<{gamification}prestashop>notification_f8978f781f97e6f851e9c8f7059c37b2'] = 'Zobacz mój kompletny profil';
$_MODULE['<{gamification}prestashop>filters_e659b52eba1f0299b2d8ca3483919e72'] = 'Typ:';
$_MODULE['<{gamification}prestashop>filters_18325105de95083e4a1d10b78f29c2bc'] = 'Stan:';

View File

@@ -0,0 +1,41 @@
<?php
global $_MODULE;
$_MODULE = array();
$_MODULE['<{gamification}prestashop>gamification_3d4aafb2eedeba2fbf92e852f0af745a'] = 'Опыт продавца';
$_MODULE['<{gamification}prestashop>gamification_bacc1bf300527bad9c6ac2d3b875a8d8'] = 'Станьте экспертом в области электронной коммерции в мгновение ока!';
$_MODULE['<{gamification}prestashop>admingamificationcontroller_ca96b4f8d13722aac99da25f94ea1711'] = 'Опыт продавца';
$_MODULE['<{gamification}prestashop>admingamificationcontroller_98f770b0af18ca763421bac22b4b6805'] = 'Свойства';
$_MODULE['<{gamification}prestashop>admingamificationcontroller_f5c7922da355fd289ec1d6469e0583a7'] = 'Достижения';
$_MODULE['<{gamification}prestashop>admingamificationcontroller_8189ecf686157db0c0274c1f49373318'] = 'География';
$_MODULE['<{gamification}prestashop>admingamificationcontroller_851f12a0c936baace7f0e734d5c624e7'] = '1. Новичек';
$_MODULE['<{gamification}prestashop>admingamificationcontroller_583981a16ea761fe852b64094d8a887e'] = '2. Профи';
$_MODULE['<{gamification}prestashop>admingamificationcontroller_38f7af7416ffcd1524d8a4acda756cbf'] = '3. Эксперт';
$_MODULE['<{gamification}prestashop>admingamificationcontroller_e7613fe56cdbeddfc9bb6276fd0f0d12'] = '4. Чародей';
$_MODULE['<{gamification}prestashop>admingamificationcontroller_8d03eaad7ff7babdd33c2c74fe479ed0'] = '5. Гуру';
$_MODULE['<{gamification}prestashop>admingamificationcontroller_e4be4f3e3ae4ee9dda6b60815bf774c1'] = '6. Легенда';
$_MODULE['<{gamification}prestashop>filters_b1c94ca2fbc3e78fc30069c8d0f01680'] = 'Все';
$_MODULE['<{gamification}prestashop>filters_5364259abab90e94890f2ed2481b9824'] = 'Получено';
$_MODULE['<{gamification}prestashop>filters_dc450ba947e6adecbdbe68c25de03a1b'] = 'Не получено';
$_MODULE['<{gamification}prestashop>filters_07ad815187b53dc2ceaf5ad6e0a12bb1'] = 'Уровень:';
$_MODULE['<{gamification}prestashop>view_a0db49ba470c1c9ae2128c3470339153'] = 'Уровень';
$_MODULE['<{gamification}prestashop>view_2a0ab6a9172272d54f0d601b0ac157f3'] = 'станьте экспертом в электронной коммерции максимально быстро!';
$_MODULE['<{gamification}prestashop>view_cb3d475bd997e38c100704631dbab020'] = 'PrestaShop постоянно предлагает множество новых возможностей, постарайтесь не отстать!';
$_MODULE['<{gamification}prestashop>view_2c3193c85bb2555c333adfcfb824804a'] = 'Основной целью этого модуля является помощь вам в достижении успеха в мире электронной коммерции. Для того, что бы облегчить вам задачу, мы создали систему значков и балов, которая будет отображать успех вашего магазина. Мы разделили всю систему на три уровня, каждый из которых важен в достижении успеха: 1 - базовые функции вашего магазина, 2 - эффективность ваших продаж, 3 - ваше присутствие на международном рынке.';
$_MODULE['<{gamification}prestashop>view_6b766dc388ad21053bde0f8fd95d1e04'] = 'Чем лучше работает ваш магазин, тем больше значков вы получите. Вам не нужно указывать никакой информации или заполнять формы. Мы знаем, что у вас много работы, и поэтому все автоматизировано.';
$_MODULE['<{gamification}prestashop>view_21dc1cfc9ef1cdfbb665cab323d5e1a9'] = 'Теперь, нажав на кнопку, вы увидите список возможностей улучшить работу вашего магазина. Воспользуйтесь преимуществами, которые они могут вам дать!';
$_MODULE['<{gamification}prestashop>view_8ba134cf899d862079bbf3964bc7d7d4'] = 'Наша команда будет рада помочь вам развиваться.. Напишите нам!';
$_MODULE['<{gamification}prestashop>view_bcc254b55c4a1babdf1dcb82c207506b'] = 'Телефон';
$_MODULE['<{gamification}prestashop>view_b39131f9b4f81406be4f9cca784f99c8'] = 'По телефону +1 (888) 947.6543';
$_MODULE['<{gamification}prestashop>view_ce8ae9da5b7cd6c3df2929543a9af92d'] = 'E-mail';
$_MODULE['<{gamification}prestashop>view_119c7e70192829bf606e3774254c6167'] = 'По Email';
$_MODULE['<{gamification}prestashop>view_6b6ac7834d96afefbca5677814769109'] = 'Уровень конкуренции';
$_MODULE['<{gamification}prestashop>view_82338dd23ce2fd2f6d3606c20f4ee96e'] = 'Нет значков подходящих под такой выбор';
$_MODULE['<{gamification}prestashop>notification_a0db49ba470c1c9ae2128c3470339153'] = 'Уровень';
$_MODULE['<{gamification}prestashop>notification_ca96b4f8d13722aac99da25f94ea1711'] = 'Ваш опsn продавца';
$_MODULE['<{gamification}prestashop>notification_16a1daea9e8873542aec1e820798aa44'] = 'Предыдущий значок:';
$_MODULE['<{gamification}prestashop>notification_15377177c0259c6f79341cc57da13f19'] = 'Следующий значок:';
$_MODULE['<{gamification}prestashop>notification_f8978f781f97e6f851e9c8f7059c37b2'] = 'Посмотреть все данные';
$_MODULE['<{gamification}prestashop>filters_e659b52eba1f0299b2d8ca3483919e72'] = 'Тип:';
$_MODULE['<{gamification}prestashop>filters_18325105de95083e4a1d10b78f29c2bc'] = 'Регион:';

View File

@@ -0,0 +1,40 @@
<?php
/*
* 2007-2016 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2016 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_1_4_9($object)
{
return Db::getInstance()->execute(
'CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'tab_advice` (
`id_tab` int(11) NOT NULL,
`id_advice` int(11) NOT NULL,
PRIMARY KEY (`id_tab`, `id_advice`)
) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8;'
);
}

View File

@@ -0,0 +1,34 @@
<?php
/*
* 2007-2016 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2016 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_1_6_6($object)
{
return Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'advice` ADD `start_day` INT NULL DEFAULT 0 , ADD `stop_day` INT NULL DEFAULT 0');
}

View File

@@ -0,0 +1,34 @@
<?php
/*
* 2007-2016 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2016 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_1_7_3($object)
{
return Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'advice` ADD `hide` TINYINT NOT NULL DEFAULT \'0\' AFTER `validated`');
}

View File

@@ -0,0 +1,35 @@
<?php
/*
* 2007-2016 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2016 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
if (!defined('_PS_VERSION_')) {
exit;
}
// Needed for retrocompat
function upgrade_module_1_7_6($object)
{
return true;
}

View File

@@ -0,0 +1,58 @@
<?php
/*
* 2007-2016 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2016 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_1_7_7($object)
{
$cols = array(
'start_day' => array('exist' => false, 'sql' => 'ALTER TABLE `'._DB_PREFIX_.'advice` ADD `start_day` INT NULL DEFAULT 0 '),
'stop_day' => array('exist' => false, 'sql' => 'ALTER TABLE `'._DB_PREFIX_.'advice` ADD `stop_day` INT NULL DEFAULT 0 '),
'start_date' => array('exist' => false, 'sql' => 'ALTER TABLE `'._DB_PREFIX_.'advice` DROP `start_date`'),
'stop_date' => array('exist' => false, 'sql' => 'ALTER TABLE `'._DB_PREFIX_.'advice` DROP `stop_date`'),
);
$columns = Db::getInstance()->executeS('SHOW COLUMNS FROM `'._DB_PREFIX_.'advice` ');
foreach ($columns as $c) {
if (in_array($c['Field'], array_keys($cols))) {
$cols[$c['Field']]['exist'] = true;
}
}
foreach ($cols as $name => $co) {
if (in_array($name, array('start_day', 'stop_day'))) {
if (!$co['exist']) {
Db::getInstance()->execute($co['sql']);
}
} elseif ($co['exist']) {
Db::getInstance()->execute($co['sql']);
}
}
return true;
}

View File

@@ -0,0 +1,36 @@
<?php
/*
* 2007-2016 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2016 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_1_8_0($object)
{
Configuration::updateValue('GF_INSTALL_CALC', 0);
return true;
}

View File

@@ -0,0 +1,37 @@
<?php
/*
* 2007-2016 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2016 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_1_8_9($object)
{
Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'advice` ADD `weight` INT NULL DEFAULT \'1\'');
Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'badge` ADD `awb` INT NULL DEFAULT \'0\'');
return true;
}

View File

@@ -0,0 +1,69 @@
<?php
/**
* 2007-2020 PrestaShop.
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License 3.0 (AFL-3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* https://opensource.org/licenses/AFL-3.0
* 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-2020 PrestaShop SA
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
if (!defined('_PS_VERSION_')) {
exit;
}
/**
* Removes files or directories.
*
* @param array $files An array of files to remove
*
* @return true|string True if everything goes fine, error details otherwise
*/
function removeFromFsDuringUpgrade(array $files)
{
$files = array_reverse($files);
foreach ($files as $file) {
if (is_dir($file)) {
$iterator = new FilesystemIterator($file, FilesystemIterator::CURRENT_AS_PATHNAME | FilesystemIterator::SKIP_DOTS);
removeFromFsDuringUpgrade(iterator_to_array($iterator));
if (!rmdir($file) && file_exists($file)) {
return 'Deletion of directory ' . $file . 'failed';
}
} elseif (!unlink($file) && file_exists($file)) {
return 'Deletion of file ' . $file . 'failed';
}
}
return true;
}
/**
* This upgrade file removes the folder vendor/phpunit, when added from a previous release installed on the shop.
*
* @return true|array
*/
function upgrade_module_2_3_2($module)
{
$path = __DIR__ . '/../vendor/phpunit';
if (file_exists($path)) {
$result = removeFromFsDuringUpgrade(array($path));
if ($result !== true) {
PrestaShopLogger::addLog('Could not delete PHPUnit from module. ' . $result, 3);
return false;
}
}
return true;
}

10
modules/gamification/vendor/.htaccess vendored Normal file
View File

@@ -0,0 +1,10 @@
# Apache 2.2
<IfModule !mod_authz_core.c>
Order deny,allow
Deny from all
</IfModule>
# Apache 2.4
<IfModule mod_authz_core.c>
Require all denied
</IfModule>

View File

@@ -0,0 +1,7 @@
<?php
// autoload.php @generated by Composer
require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInitbfbead81dcd4b32972a91cf56160df09::getLoader();

View File

@@ -0,0 +1,445 @@
<?php
/*
* This file is part of Composer.
*
* (c) Nils Adermann <naderman@naderman.de>
* Jordi Boggiano <j.boggiano@seld.be>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Composer\Autoload;
/**
* ClassLoader implements a PSR-0, PSR-4 and classmap class loader.
*
* $loader = new \Composer\Autoload\ClassLoader();
*
* // register classes with namespaces
* $loader->add('Symfony\Component', __DIR__.'/component');
* $loader->add('Symfony', __DIR__.'/framework');
*
* // activate the autoloader
* $loader->register();
*
* // to enable searching the include path (eg. for PEAR packages)
* $loader->setUseIncludePath(true);
*
* In this example, if you try to use a class in the Symfony\Component
* namespace or one of its children (Symfony\Component\Console for instance),
* the autoloader will first look for the class under the component/
* directory, and it will then fallback to the framework/ directory if not
* found before giving up.
*
* This class is loosely based on the Symfony UniversalClassLoader.
*
* @author Fabien Potencier <fabien@symfony.com>
* @author Jordi Boggiano <j.boggiano@seld.be>
* @see http://www.php-fig.org/psr/psr-0/
* @see http://www.php-fig.org/psr/psr-4/
*/
class ClassLoader
{
// PSR-4
private $prefixLengthsPsr4 = array();
private $prefixDirsPsr4 = array();
private $fallbackDirsPsr4 = array();
// PSR-0
private $prefixesPsr0 = array();
private $fallbackDirsPsr0 = array();
private $useIncludePath = false;
private $classMap = array();
private $classMapAuthoritative = false;
private $missingClasses = array();
private $apcuPrefix;
public function getPrefixes()
{
if (!empty($this->prefixesPsr0)) {
return call_user_func_array('array_merge', $this->prefixesPsr0);
}
return array();
}
public function getPrefixesPsr4()
{
return $this->prefixDirsPsr4;
}
public function getFallbackDirs()
{
return $this->fallbackDirsPsr0;
}
public function getFallbackDirsPsr4()
{
return $this->fallbackDirsPsr4;
}
public function getClassMap()
{
return $this->classMap;
}
/**
* @param array $classMap Class to filename map
*/
public function addClassMap(array $classMap)
{
if ($this->classMap) {
$this->classMap = array_merge($this->classMap, $classMap);
} else {
$this->classMap = $classMap;
}
}
/**
* Registers a set of PSR-0 directories for a given prefix, either
* appending or prepending to the ones previously set for this prefix.
*
* @param string $prefix The prefix
* @param array|string $paths The PSR-0 root directories
* @param bool $prepend Whether to prepend the directories
*/
public function add($prefix, $paths, $prepend = false)
{
if (!$prefix) {
if ($prepend) {
$this->fallbackDirsPsr0 = array_merge(
(array) $paths,
$this->fallbackDirsPsr0
);
} else {
$this->fallbackDirsPsr0 = array_merge(
$this->fallbackDirsPsr0,
(array) $paths
);
}
return;
}
$first = $prefix[0];
if (!isset($this->prefixesPsr0[$first][$prefix])) {
$this->prefixesPsr0[$first][$prefix] = (array) $paths;
return;
}
if ($prepend) {
$this->prefixesPsr0[$first][$prefix] = array_merge(
(array) $paths,
$this->prefixesPsr0[$first][$prefix]
);
} else {
$this->prefixesPsr0[$first][$prefix] = array_merge(
$this->prefixesPsr0[$first][$prefix],
(array) $paths
);
}
}
/**
* Registers a set of PSR-4 directories for a given namespace, either
* appending or prepending to the ones previously set for this namespace.
*
* @param string $prefix The prefix/namespace, with trailing '\\'
* @param array|string $paths The PSR-4 base directories
* @param bool $prepend Whether to prepend the directories
*
* @throws \InvalidArgumentException
*/
public function addPsr4($prefix, $paths, $prepend = false)
{
if (!$prefix) {
// Register directories for the root namespace.
if ($prepend) {
$this->fallbackDirsPsr4 = array_merge(
(array) $paths,
$this->fallbackDirsPsr4
);
} else {
$this->fallbackDirsPsr4 = array_merge(
$this->fallbackDirsPsr4,
(array) $paths
);
}
} elseif (!isset($this->prefixDirsPsr4[$prefix])) {
// Register directories for a new namespace.
$length = strlen($prefix);
if ('\\' !== $prefix[$length - 1]) {
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
}
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
$this->prefixDirsPsr4[$prefix] = (array) $paths;
} elseif ($prepend) {
// Prepend directories for an already registered namespace.
$this->prefixDirsPsr4[$prefix] = array_merge(
(array) $paths,
$this->prefixDirsPsr4[$prefix]
);
} else {
// Append directories for an already registered namespace.
$this->prefixDirsPsr4[$prefix] = array_merge(
$this->prefixDirsPsr4[$prefix],
(array) $paths
);
}
}
/**
* Registers a set of PSR-0 directories for a given prefix,
* replacing any others previously set for this prefix.
*
* @param string $prefix The prefix
* @param array|string $paths The PSR-0 base directories
*/
public function set($prefix, $paths)
{
if (!$prefix) {
$this->fallbackDirsPsr0 = (array) $paths;
} else {
$this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths;
}
}
/**
* Registers a set of PSR-4 directories for a given namespace,
* replacing any others previously set for this namespace.
*
* @param string $prefix The prefix/namespace, with trailing '\\'
* @param array|string $paths The PSR-4 base directories
*
* @throws \InvalidArgumentException
*/
public function setPsr4($prefix, $paths)
{
if (!$prefix) {
$this->fallbackDirsPsr4 = (array) $paths;
} else {
$length = strlen($prefix);
if ('\\' !== $prefix[$length - 1]) {
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
}
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
$this->prefixDirsPsr4[$prefix] = (array) $paths;
}
}
/**
* Turns on searching the include path for class files.
*
* @param bool $useIncludePath
*/
public function setUseIncludePath($useIncludePath)
{
$this->useIncludePath = $useIncludePath;
}
/**
* Can be used to check if the autoloader uses the include path to check
* for classes.
*
* @return bool
*/
public function getUseIncludePath()
{
return $this->useIncludePath;
}
/**
* Turns off searching the prefix and fallback directories for classes
* that have not been registered with the class map.
*
* @param bool $classMapAuthoritative
*/
public function setClassMapAuthoritative($classMapAuthoritative)
{
$this->classMapAuthoritative = $classMapAuthoritative;
}
/**
* Should class lookup fail if not found in the current class map?
*
* @return bool
*/
public function isClassMapAuthoritative()
{
return $this->classMapAuthoritative;
}
/**
* APCu prefix to use to cache found/not-found classes, if the extension is enabled.
*
* @param string|null $apcuPrefix
*/
public function setApcuPrefix($apcuPrefix)
{
$this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null;
}
/**
* The APCu prefix in use, or null if APCu caching is not enabled.
*
* @return string|null
*/
public function getApcuPrefix()
{
return $this->apcuPrefix;
}
/**
* Registers this instance as an autoloader.
*
* @param bool $prepend Whether to prepend the autoloader or not
*/
public function register($prepend = false)
{
spl_autoload_register(array($this, 'loadClass'), true, $prepend);
}
/**
* Unregisters this instance as an autoloader.
*/
public function unregister()
{
spl_autoload_unregister(array($this, 'loadClass'));
}
/**
* Loads the given class or interface.
*
* @param string $class The name of the class
* @return bool|null True if loaded, null otherwise
*/
public function loadClass($class)
{
if ($file = $this->findFile($class)) {
includeFile($file);
return true;
}
}
/**
* Finds the path to the file where the class is defined.
*
* @param string $class The name of the class
*
* @return string|false The path if found, false otherwise
*/
public function findFile($class)
{
// class map lookup
if (isset($this->classMap[$class])) {
return $this->classMap[$class];
}
if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) {
return false;
}
if (null !== $this->apcuPrefix) {
$file = apcu_fetch($this->apcuPrefix.$class, $hit);
if ($hit) {
return $file;
}
}
$file = $this->findFileWithExtension($class, '.php');
// Search for Hack files if we are running on HHVM
if (false === $file && defined('HHVM_VERSION')) {
$file = $this->findFileWithExtension($class, '.hh');
}
if (null !== $this->apcuPrefix) {
apcu_add($this->apcuPrefix.$class, $file);
}
if (false === $file) {
// Remember that this class does not exist.
$this->missingClasses[$class] = true;
}
return $file;
}
private function findFileWithExtension($class, $ext)
{
// PSR-4 lookup
$logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
$first = $class[0];
if (isset($this->prefixLengthsPsr4[$first])) {
$subPath = $class;
while (false !== $lastPos = strrpos($subPath, '\\')) {
$subPath = substr($subPath, 0, $lastPos);
$search = $subPath.'\\';
if (isset($this->prefixDirsPsr4[$search])) {
$pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
foreach ($this->prefixDirsPsr4[$search] as $dir) {
if (file_exists($file = $dir . $pathEnd)) {
return $file;
}
}
}
}
}
// PSR-4 fallback dirs
foreach ($this->fallbackDirsPsr4 as $dir) {
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) {
return $file;
}
}
// PSR-0 lookup
if (false !== $pos = strrpos($class, '\\')) {
// namespaced class name
$logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1)
. strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR);
} else {
// PEAR-like class name
$logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext;
}
if (isset($this->prefixesPsr0[$first])) {
foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) {
if (0 === strpos($class, $prefix)) {
foreach ($dirs as $dir) {
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
return $file;
}
}
}
}
}
// PSR-0 fallback dirs
foreach ($this->fallbackDirsPsr0 as $dir) {
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
return $file;
}
}
// PSR-0 include paths.
if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
return $file;
}
return false;
}
}
/**
* Scope isolated include.
*
* Prevents access to $this/self from included files.
*/
function includeFile($file)
{
include $file;
}

View File

@@ -0,0 +1,21 @@
Copyright (c) Nils Adermann, Jordi Boggiano
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

View File

@@ -0,0 +1,9 @@
<?php
// autoload_classmap.php @generated by Composer
$vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir);
return array(
);

View File

@@ -0,0 +1,9 @@
<?php
// autoload_namespaces.php @generated by Composer
$vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir);
return array(
);

View File

@@ -0,0 +1,9 @@
<?php
// autoload_psr4.php @generated by Composer
$vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir);
return array(
);

View File

@@ -0,0 +1,43 @@
<?php
// autoload_real.php @generated by Composer
class ComposerAutoloaderInitbfbead81dcd4b32972a91cf56160df09
{
private static $loader;
public static function loadClassLoader($class)
{
if ('Composer\Autoload\ClassLoader' === $class) {
require __DIR__ . '/ClassLoader.php';
}
}
public static function getLoader()
{
if (null !== self::$loader) {
return self::$loader;
}
spl_autoload_register(array('ComposerAutoloaderInitbfbead81dcd4b32972a91cf56160df09', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
spl_autoload_unregister(array('ComposerAutoloaderInitbfbead81dcd4b32972a91cf56160df09', 'loadClassLoader'));
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
if ($useStaticLoader) {
require_once __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInitbfbead81dcd4b32972a91cf56160df09::getInitializer($loader));
} else {
$classMap = require __DIR__ . '/autoload_classmap.php';
if ($classMap) {
$loader->addClassMap($classMap);
}
}
$loader->setClassMapAuthoritative(true);
$loader->register(true);
return $loader;
}
}

View File

@@ -0,0 +1,15 @@
<?php
// autoload_static.php @generated by Composer
namespace Composer\Autoload;
class ComposerStaticInitbfbead81dcd4b32972a91cf56160df09
{
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
}, null, ClassLoader::class);
}
}

View File

@@ -0,0 +1 @@
[]

View File

@@ -0,0 +1,86 @@
/*
jQuery Bubble Popup v.3.0
http://www.maxvergelli.com/jquery-bubble-popup/
Copyright (c) 2012 Max Vergelli
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
/* Layout Settings */
.jquerybubblepopup{width:auto;height:auto;margin:0px;padding:0px;position:absolute;border:0px;z-index:100;text-align:center;background-color:transparent;}
.jquerybubblepopup-ie{filter:progid:DXImageTransform.Microsoft.Shadow(color="#666666", Direction=135, Strength=3);} /* the plugin adds this class only if browser is IE; if IE9, it's added to main <DIV> else to <TABLE> */
.jquerybubblepopup table{width:auto;height:auto;margin:0px;padding:0px;display:table;border-collapse:collapse;border-spacing:0px;border:0px;empty-cells:show;background-color:transparent;}
.jquerybubblepopup tbody{display:table-row-group;vertical-align:middle;border:0px;background-color:transparent;}
.jquerybubblepopup td{margin:0px;padding:0px;background-color:transparent;}
.jquerybubblepopup-top-left, .jquerybubblepopup-top-right,
.jquerybubblepopup-bottom-left, .jquerybubblepopup-bottom-right{width:21px;height:21px;overflow:hidden;background-repeat:no-repeat;}
.jquerybubblepopup-top-middle, .jquerybubblepopup-bottom-middle{overflow:hidden;background-repeat:repeat-x;}
.jquerybubblepopup-middle-left, .jquerybubblepopup-middle-right{overflow:hidden;background-repeat:repeat-y;}
.jquerybubblepopup-tail{border:0px;margin:0px;padding:0px;display:inline;}
/*
Themes:
The plugin adds the class of the theme (for example ".jquerybubblepopup-azure")
to the main <DIV> container, then you can edit the style of any element inside the
Bubble Popup markup for each theme.
The following code defines fonts and backgrounds of the "innerHtml" for each theme:
*/
.jquerybubblepopup-azure .jquerybubblepopup-innerHtml,
.jquerybubblepopup-black .jquerybubblepopup-innerHtml,
.jquerybubblepopup-blue .jquerybubblepopup-innerHtml,
.jquerybubblepopup-green .jquerybubblepopup-innerHtml,
.jquerybubblepopup-grey .jquerybubblepopup-innerHtml,
.jquerybubblepopup-orange .jquerybubblepopup-innerHtml,
.jquerybubblepopup-violet .jquerybubblepopup-innerHtml,
.jquerybubblepopup-yellow .jquerybubblepopup-innerHtml
{
font-family:'Trebuchet MS',Arial;
font-size:11px;
font-weight:normal;
color:#000000;
background-color:#FFFFFF;
}
.jquerybubblepopup-all-azure .jquerybubblepopup-innerHtml,
.jquerybubblepopup-all-black .jquerybubblepopup-innerHtml,
.jquerybubblepopup-all-blue .jquerybubblepopup-innerHtml,
.jquerybubblepopup-all-green .jquerybubblepopup-innerHtml,
.jquerybubblepopup-all-grey .jquerybubblepopup-innerHtml,
.jquerybubblepopup-all-orange .jquerybubblepopup-innerHtml,
.jquerybubblepopup-all-violet .jquerybubblepopup-innerHtml,
.jquerybubblepopup-all-yellow .jquerybubblepopup-innerHtml
{
font-family:'Trebuchet MS',Arial;
font-size:11px;
font-weight:normal;
color:#FFFFFF;
}
.jquerybubblepopup-all-azure .jquerybubblepopup-innerHtml{background-color:#0099FF;}
.jquerybubblepopup-all-black .jquerybubblepopup-innerHtml{background-color:#000000;}
.jquerybubblepopup-all-blue .jquerybubblepopup-innerHtml{background-color:#0066CC;}
.jquerybubblepopup-all-green .jquerybubblepopup-innerHtml{background-color:#66FF00;}
.jquerybubblepopup-all-grey .jquerybubblepopup-innerHtml{background-color:#666666;}
.jquerybubblepopup-all-orange .jquerybubblepopup-innerHtml{background-color:#FF9933;}
.jquerybubblepopup-all-violet .jquerybubblepopup-innerHtml{background-color:#FF33FF;}
.jquerybubblepopup-all-yellow .jquerybubblepopup-innerHtml{background-color:#FFCC00;}

View File

@@ -0,0 +1,14 @@
.material-icons {
display: none;
}
#gamification_notif .icon-chevron-right {
display: inline;
font-size: 12px !important;
}
.bootstrap #header_infos .gamification_notif #gamification_notif_number_wrapper {
right: 0;
line-height: 1rem;
border: none;
}

View File

@@ -0,0 +1,575 @@
#gamification_notif.open {background: none}
#gamification_notif.open a.dropdown-toggle{background: none !important}
#gamification_notif.open .material-icons {
color: #6c868e;
font-size: 24px
}
#gamification_notif_number_wrapper {
display: inline-block;
position: absolute;
top: 4px;
top: -.3rem;
right: .2rem;
color: #fff;
background: #25b9d7;
font-size: 10px;
font-size: .625rem;
line-height: 12px;
line-height: .75rem;
padding: 0 3px;
padding: 0 .1875rem;
border-radius: 1rem;
border: 2px solid #fff;
border: .125rem solid #fff;
}
#gamification_notif .dropdown-menu {
margin: 0;
padding: 0;
border-radius: 0;
min-width: 22rem;
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.1);
border: 1px solid #bbcdd2;
top: 15px !important;
transform: translate3d(-324px, 20px, 0px) !important;
}
#gamification_notif .dropdown-menu:before, #gamification_notif .dropdown-menu:after{
bottom: 100%;
right: 5px;
border: solid transparent;
content: " ";
height: 0;
width: 0;
position: absolute;
pointer-events: none;
}
.gamification-component #gamification_notif .dropdown-menu:before,
.gamification-component #gamification_notif .dropdown-menu:after{
right: 9px;
}
#gamification_notif .dropdown-menu:after{
border-color: transparent;
border-bottom-color: white;
border-width: 7px;
margin-left: 1px;
}
#gamification_notif .dropdown-menu:before{
border-color: transparent;
border-bottom-color: #bbcdd2;
border-width: 8px;
margin-right: -1px;
}
#gamification_notif_wrapper.notifs_panel .progress {
margin: 0 20px;
border-radius: 11px;
height: 8px;
background: #f0fbff;
}
#gamification_notif_wrapper.notifs_panel .progress .progress-bar.progress-bar-info{background: #25b9d7}
#gamification_notif_wrapper.notifs_panel .nav-tabs {border-bottom: 1px solid #fff}
#gamification_notif_wrapper.notifs_panel .nav-item {
margin-left: 0;
width: 50%;
padding: 0 8px;
text-align: center;
margin-bottom: -1px;
}
#gamification_notif_wrapper.notifs_panel .nav-item.active a {
border-top: 0;
border-bottom: 3px solid #25b9d7;
color: #25b9d7;
}
#gamification_notif_wrapper.notifs_panel .nav-item:hover a {color: #25b9d7;}
#gamification_notif_wrapper.notifs_panel .nav-item .nav-link {
color: #6c868e;
font-weight: 400;
padding: .9375rem .9375rem .625rem;
font-family: Open Sans,sans-serif;
font-size: 0.9rem;
text-transform: none;
border: 0;
}
#gamification_notif_wrapper.notifs_panel .tab-content {
border-top: .125rem solid #eee;
padding: 0;
margin-top: -.0625rem;
background: #f2f4f5;
}
#gamification_notif_wrapper.notifs_panel .tab-content .tab-pane{
height: 16.5rem;
overflow-y: auto;
}
#gamification_notif_wrapper .panel-footer{
margin: 0 !important;
height: 50px;
display: flex;
align-items: center;
justify-content: center;
background: white;
}
#gamification_notif_wrapper .panel-footer a{
font-size: 13px;
color: #25b9d7;
font-weight: 600;
}
#gamification_notif_wrapper .panel-footer a i{
color: #25b9d7 !important;
font-size: 20px;
}
#gamification_notif #gamification_notif_wrapper{
width: 100%;
}
#gamification_notif #gamification_notif_wrapper .notifs_panel_header{
font-size: 14px;
padding: 20px 20px 10px 20px;
}
#gamification_notif_wrapper .notifs_panel_header p{font-weight: bold;}
#gamification_notif_wrapper .notifs_panel_header p span.notifs-level{color: #25b9d7; float: right;}
.gamification_badges_title {
margin-top: 10px
}
.gamification_badges_img {
text-align: center;
margin-top: 0;
}
.gamification_badges_name {
text-align: center;
font-weight: bold;
margin-top: 3px;
}
ul#gamification_badges_list {
list-style-type: none;
min-height: 300px;
width: 310px;
margin: auto;
overflow: hidden;
padding-top: 10px;
}
ul#gamification_badges_list li {
display: block;
min-height: 140px;
padding: 5px;
width: 132px;
margin: 10px 10px 10px 15px;
position: relative;
}
ul#gamification_badges_list li span {
display: block;
text-align: center;
}
ul#gamification_badges_list li.unlocked {
background: #fff;
margin-right: 7px;
}
ul#gamification_badges_list li.unlocked span {
color: #a88417;
font-size: 11px;
font-weight: bold;
text-shadow: 1px 1px 1px #fff;
text-transform: uppercase
}
ul#gamification_badges_list li.locked {
background: url(../img/bg_locked_badge.png) repeat;
border: 1px solid #acaeb5;
margin-right: 5px;
}
ul#gamification_badges_list li.locked span {
color: #343943;
font-size: 11px;
font-weight: bold;
text-shadow: 1px 1px 1px #fff;
text-transform: uppercase
}
ul#gamification_badges_list li.locked .gamification_badges_name {
color: #acaeb5
}
#gamification_progressbar {
height: 20px;
margin-top: 5px;
position: relative;
width: 100%;
}
#gamification_progressbar {
height: 19px;
position: relative;
-moz-border-radius: 15px;
-o-border-radius: 15px;
-webkit-border-radius: 15px;
border-radius: 15px;
}
#gamification_progressbar .gamification_progress-label {
top: 2px;
font-size: 14px
}
#gamification_progressbar .ui-progressbar-value {
-moz-border-radius: 15px;
-o-border-radius: 15px;
-webkit-border-radius: 15px;
border-radius: 15px;
border: 1px solid #8aa96d
}
#gamification_progressbar_tab {
-moz-border-radius: 15px;
-o-border-radius: 15px;
-webkit-border-radius: 15px;
border-radius: 15px;
border: none;
background: #ECECEC;
height: 23px;
position: relative;
width: 69%;
}
#completion_gamification .gamification_progress-label,
#completion_gamification .gamification_progress-label_percent {
color: #251B5B
}
#completion_gamification .gamification_progress-label_percent {
font-size: 30px;
font-weight: 600;
margin-left: 20px;
}
#gamification_progressbar_tab .ui-progressbar-value {
-moz-border-radius: 15px;
-o-border-radius: 15px;
-webkit-border-radius: 15px;
border-radius: 15px;
border: 1px solid #8aa96d;
position: absolute;
top: 0;
}
#gamification_progressbar_tab .ui-widget-header {
background: linear-gradient(270deg, #3E2CA1 0%, #252B67 100%);
background: -moz-linear-gradient(270deg, #3E2CA1 0%, #252B67 100%);
background: -ms-linear-gradient(270deg, #3E2CA1 0%, #252B67 100%);
background: -o-linear-gradient(270deg, #3E2CA1 0%, #252B67 100%);
height: 17px;
margin: 3px;
border: none;
}
/******* intro gamification *******/
#intro_gamification {
border-bottom: 1px solid #ccced7;
display: flex;
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
justify-content: space-between;
align-items: center;
padding-bottom: 10px;
}
@media screen and (max-width: 768px) {
#intro_gamification {
flex-direction: column
}
}
#intro_gamification h2,
#completion_gamification h2 {
margin-top: 10px;
color: #343943;
font-family: Open Sans,sans-serif;
font-size: 20px;
font-weight: 600;
line-height: 27px;
white-space: nowrap;
}
@media screen and (max-width: 768px){
#completion_gamification h2 {
margin-bottom: 20px
}
}
#intro_gamification p,
#intro_gamification li,
#intro_gamification a {
font-size: 14px;
line-height: 19px;
}
#intro_gamification li:before {
font-weight: bold;
}
#intro_gamification h2 {
margin-top: 0;
margin-bottom: 16px;
color: #252B67;
}
#completion_gamification h2 {
margin-right: 10px;
}
#intro_gamification .left_intro {
max-width: 350px;
}
#intro_gamification .central_intro {
padding-right: 102px;
width: 60%;
padding-left: 30px;
}
@media screen and (max-width: 768px){
#intro_gamification .central_intro {
width: auto;
margin: 30px;
}
}
@media screen and (max-width: 1441px) {
#intro_gamification .central_intro {
padding-right: 50px;
}
}
#intro_gamification .central_intro .central_intro_list{
padding-left: 0;
list-style-type: none;
counter-reset: counting;
}
#intro_gamification .central_intro .central_intro_list li:before {
counter-increment: counting 1;
content: counter(counting) " - ";
}
#intro_gamification .central_intro p {
text-align: justify;
width: 100%;
margin-bottom: 20px
}
#intro_gamification .right_intro {
padding-left: 20px;
max-width: 350px;
background-color: #F7F6FD;
border-radius: 4px;
padding: 56px 47px 34px;
position: relative;
min-height: 200px;
}
@media screen and (min-width: 1441px){
#intro_gamification .right_intro {
margin-top: 30px;
}
}
#intro_gamification .right_intro img{
display: block;
margin: 0 auto;
position: absolute;
top: -24px;
left: 0;
right: 0;
}
#intro_gamification .right_intro h3.right_intro_title {
color: #251B5B;
font-size: 16px;
font-weight: 600;
margin: 0 auto 26px;
text-transform: inherit;
border: none;
line-height: inherit;
height: auto;
max-width: 224px;
}
#intro_gamification .right_intro .right_intro_btn-contact {
display: block;
margin: 0 auto;
color: #fff;
font-size: 16px;
font-weight: 600;
max-width: 227px;
border-radius: 2px;
background-color: #252B67;
padding: 10px;
position: relative;
}
#intro_gamification .right_intro .right_intro_btn-contact:before{
position: absolute;
content:'';
width: 33px;
height: 33px;
background: url(../img/sparks.png) no-repeat;
top: -20px;
right: -27px;
}
#completion_gamification {
display: flex;
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
align-items: center;
justify-content: space-between;
margin-top: 20px;
margin-bottom: -11px;
padding: 0 10px;
}
@media screen and (max-width: 768px){
#completion_gamification {
flex-direction: column
}
}
.gamification_progress-label,
.gamification_progress-label_tab {
text-align: center;
display: block;
top: 3px;
font-weight: bold;
text-shadow: 1px 1px 0 #fff;
position: relative;
z-index: 1;
color: #68737f;
font-size: 17px;
}
#completion_gamification .gamification_progress-label {
white-space: nowrap;
margin-left: 10px;
}
ul.badge_list {
list-style-type: none;
padding: 0;
margin: 0;
}
li.badge_square {
display: block;
float: left;
height: 135px;
width: 100px;
background-color: transparent;
border: none;
padding: 5px 10px 5px 10px;
border-radius: 3px;
margin-right: 10px;
}
li.not_validated {
color: #ccc;
}
.badges_filters div {
float: left;
margin-bottom: 30px
}
.badges_filters select {
margin-right: 30px;
}
.icon-trophy-svg {
display: none;
}
/* PrestaShop 1.7 - new theme adaptation */
.gamification-component {
height: 100%;
}
.gamification-component,
.gamification-component > ul,
.gamification-component > ul > li {
display: flex !important;
align-items: stretch;
}
.gamification-component > ul > li > a {
display: flex;
align-items: center;
}
.gamification-component .icon-trophy-svg {
display: block;
width: 18px;
height: 18px;
}
.gamification-component #gamification_notif .gamification_notif::after {
display: none;
}
.gamification-component > ul {
padding: 0;
margin: 0;
}
.gamification-component #gamification_notif_value,
#gamification_notif #gamification_notif_value {
color: #fff !important;
font-size: 0.625rem !important;
}
/* Fix on legacy page */
.bootstrap #header_infos #gamification_notif {
margin-left: .3125rem;
}
.bootstrap #header_infos .gamification_notif {
display: flex;
height: 2.5rem;
min-width: 2.5rem;
line-height: 2.5rem;
align-items: center;
}
.bootstrap #header_infos .gamification_notif #gamification_notif_number_wrapper{
top: 0.25rem;
right: 0.9rem;
}
.bootstrap #header_infos #gamification_notif .dropdown-menu{
top: 22px !important;
transform: translate3d(-328px, 20px, 0px) !important;
}
/* Hide for ps 1.7+ */
#gamification_notif .icon-chevron-right {
display: none;
}

View File

@@ -0,0 +1,64 @@
/* Start: Recommended Isotope styles */
/**** Isotope Filtering ****/
.isotope-item {
z-index: 2;
}
.isotope-hidden.isotope-item {
pointer-events: none;
z-index: 1;
}
/**** Isotope CSS3 transitions ****/
.isotope,
.isotope .isotope-item {
-webkit-transition-duration: 0.8s;
-moz-transition-duration: 0.8s;
-ms-transition-duration: 0.8s;
-o-transition-duration: 0.8s;
transition-duration: 0.8s;
}
.isotope {
-webkit-transition-property: height, width;
-moz-transition-property: height, width;
-ms-transition-property: height, width;
-o-transition-property: height, width;
transition-property: height, width;
}
.isotope .isotope-item {
-webkit-transition-property: -webkit-transform, opacity;
-moz-transition-property: -moz-transform, opacity;
-ms-transition-property: -ms-transform, opacity;
-o-transition-property: -o-transform, opacity;
transition-property: transform, opacity;
}
/**** disabling Isotope CSS3 transitions ****/
.isotope.no-transition,
.isotope.no-transition .isotope-item,
.isotope .isotope-item.no-transition {
-webkit-transition-duration: 0s;
-moz-transition-duration: 0s;
-ms-transition-duration: 0s;
-o-transition-duration: 0s;
transition-duration: 0s;
}
/* End: Recommended Isotope styles */
/* disable CSS transitions for containers with infinite scrolling*/
.isotope.infinite-scrolling {
-webkit-transition: none;
-moz-transition: none;
-ms-transition: none;
-o-transition: none;
transition: none;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

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