-
- {if $categoryProducts|@count == 1}
- {l s='%s other product in the same category:' sprintf=[$categoryProducts|@count] mod='productscategory'}
- {else}
- {l s='%s other products in the same category:' sprintf=[$categoryProducts|@count] mod='productscategory'}
- {/if}
-
-
-
-
-{/if}
diff --git a/modules/productscategory/views/templates/index.php b/modules/productscategory/views/templates/index.php
deleted file mode 100644
index 531cab52a..000000000
--- a/modules/productscategory/views/templates/index.php
+++ /dev/null
@@ -1,36 +0,0 @@
-
-* @copyright 2007-2016 PrestaShop SA
-* @version Release: $Revision$
-* @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;
\ No newline at end of file
diff --git a/modules/producttooltip/CHANGELOG.txt b/modules/producttooltip/CHANGELOG.txt
deleted file mode 100644
index 31eb31871..000000000
--- a/modules/producttooltip/CHANGELOG.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-------------------------------
-# V1.3.1 to V1.4.1
-------------------------------
-
-## Improved/Changed Features:
-
-* [CO] : Updated with latest PS version - 1.6.1.23.
-
-
-2014-04-17 11:40:09 +0200 Bug fix (PS 1.5): ps_version_compliancy removed
-2014-03-24 15:22:23 +0100 / MO producttooltip : ps_versions_compliancy added
-2014-03-20 14:35:35 +0100 Initial commit
diff --git a/modules/producttooltip/index.php b/modules/producttooltip/index.php
deleted file mode 100644
index 531cab52a..000000000
--- a/modules/producttooltip/index.php
+++ /dev/null
@@ -1,36 +0,0 @@
-
-* @copyright 2007-2016 PrestaShop SA
-* @version Release: $Revision$
-* @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;
\ No newline at end of file
diff --git a/modules/producttooltip/logo.gif b/modules/producttooltip/logo.gif
deleted file mode 100644
index d893833a0..000000000
Binary files a/modules/producttooltip/logo.gif and /dev/null differ
diff --git a/modules/producttooltip/logo.png b/modules/producttooltip/logo.png
deleted file mode 100644
index a6abfba1b..000000000
Binary files a/modules/producttooltip/logo.png and /dev/null differ
diff --git a/modules/producttooltip/producttooltip.php b/modules/producttooltip/producttooltip.php
deleted file mode 100644
index 83d6896e7..000000000
--- a/modules/producttooltip/producttooltip.php
+++ /dev/null
@@ -1,284 +0,0 @@
-
-* @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;
-
-class ProductToolTip extends Module
-{
- public function __construct()
- {
- $this->name = 'producttooltip';
- $this->tab = 'front_office_features';
- $this->version = '1.4.1';
- $this->author = 'PrestaShop';
- $this->need_instance = 0;
-
- $this->bootstrap = true;
- parent::__construct();
-
- $this->displayName = $this->l('Product tooltips');
- $this->description = $this->l('Shows information on a product page: how many people are viewing it, the last time it was sold and the last time it was added to a cart.');
- $this->ps_versions_compliancy = array('min' => '1.6', 'max' => '1.6.99.99');
- }
-
- public function install()
- {
- if (!parent::install())
- return false;
-
- /* Default configuration values */
- Configuration::updateValue('PS_PTOOLTIP_PEOPLE', 1);
- Configuration::updateValue('PS_PTOOLTIP_DATE_CART', 1);
- Configuration::updateValue('PS_PTOOLTIP_DATE_ORDER', 1);
- Configuration::updateValue('PS_PTOOLTIP_DAYS', 3);
- Configuration::updateValue('PS_PTOOLTIP_LIFETIME', 30);
-
- return $this->registerHook('header') && $this->registerHook('productfooter');
- }
-
- public function uninstall()
- {
- if (!Configuration::deleteByName('PS_PTOOLTIP_PEOPLE')
- || !Configuration::deleteByName('PS_PTOOLTIP_DATE_CART')
- || !Configuration::deleteByName('PS_PTOOLTIP_DATE_ORDER')
- || !Configuration::deleteByName('PS_PTOOLTIP_DAYS')
- || !Configuration::deleteByName('PS_PTOOLTIP_LIFETIME')
- || !parent::uninstall()
- )
- return false;
-
- return true;
- }
-
- public function getContent()
- {
- $html = '';
- /* Update values in DB */
- if (Tools::isSubmit('SubmitToolTip'))
- {
- Configuration::updateValue('PS_PTOOLTIP_PEOPLE', (int)Tools::getValue('PS_PTOOLTIP_PEOPLE'));
- Configuration::updateValue('PS_PTOOLTIP_DATE_CART', (int)Tools::getValue('PS_PTOOLTIP_DATE_CART'));
- Configuration::updateValue('PS_PTOOLTIP_DATE_ORDER', (int)Tools::getValue('PS_PTOOLTIP_DATE_ORDER'));
- Configuration::updateValue('PS_PTOOLTIP_DAYS', ((int)(Tools::getValue('PS_PTOOLTIP_DAYS') < 0 ? 0 : (int)Tools::getValue('PS_PTOOLTIP_DAYS'))));
- Configuration::updateValue('PS_PTOOLTIP_LIFETIME', ((int)(Tools::getValue('PS_PTOOLTIP_LIFETIME') < 0 ? 0 : (int)Tools::getValue('PS_PTOOLTIP_LIFETIME'))));
-
- $html .= $this->displayConfirmation($this->l('Settings updated'));
- }
-
- /* Configuration form */
-
- return $html.$this->renderForm();
- }
-
- public function hookHeader($params)
- {
- $this->context->controller->addJQueryPlugin('growl');
- }
-
- public function hookProductFooter($params)
- {
- $id_product = (int)$params['product']->id;
-
- /* First we try to display the number of people who are currently watching this product page */
- if (Configuration::get('PS_PTOOLTIP_PEOPLE'))
- {
- $date = strftime('%Y-%m-%d %H:%M:%S', time() - (int)(Configuration::get('PS_PTOOLTIP_LIFETIME') * 60));
-
- $nb_people = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow('
- SELECT COUNT(DISTINCT(id_connections)) nb
- FROM '._DB_PREFIX_.'page p
- LEFT JOIN '._DB_PREFIX_.'connections_page cp ON (p.id_page = cp.id_page)
- WHERE p.id_page_type = 1 AND p.id_object = '.(int)$id_product.' AND cp.time_start > \''.pSQL($date).'\'');
-
- if (isset($nb_people['nb']) && $nb_people['nb'] > 0)
- $this->smarty->assign('nb_people', (int)$nb_people['nb']);
- }
-
- /* Then, we try to display last sale */
- if (Configuration::get('PS_PTOOLTIP_DATE_ORDER'))
- {
- $days = (int)Configuration::get('PS_PTOOLTIP_DAYS');
- $date = strftime('%Y-%m-%d', strtotime('-'.(int)$days.' day'));
-
- $order = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow('
- SELECT o.date_add
- FROM '._DB_PREFIX_.'order_detail od
- LEFT JOIN '._DB_PREFIX_.'orders o ON (od.id_order = o.id_order)
- WHERE od.product_id = '.(int)$id_product.' AND o.date_add >= \''.pSQL($date).'\'
- ORDER BY o.date_add DESC');
-
- if (isset($order['date_add']) && Validate::isDateFormat($order['date_add']) && $order['date_add'] != '0000-00-00 00:00:00')
- $this->smarty->assign('date_last_order', $order['date_add']);
- else
- {
- /* No sale? display last cart add instead */
- if (Configuration::get('PS_PTOOLTIP_DATE_CART'))
- {
- $cart = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow('
- SELECT cp.date_add
- FROM '._DB_PREFIX_.'cart_product cp
- WHERE cp.id_product = '.(int)$id_product);
-
- if (isset($cart['date_add']) && Validate::isDateFormat($cart['date_add']) && $cart['date_add'] != '0000-00-00 00:00:00')
- $this->smarty->assign('date_last_cart', $cart['date_add']);
- }
- }
- }
-
- if ((isset($nb_people['nb']) && $nb_people['nb'] > 0) || isset($order['date_add']) || isset($cart['date_add']))
- return $this->display(__FILE__, 'producttooltip.tpl');
- }
-
- public function renderForm()
- {
- $fields_form = array(
- 'form' => array(
- 'legend' => array(
- 'title' => $this->l('Settings'),
- 'icon' => 'icon-cogs'
- ),
- 'input' => array(
- array(
- 'type' => 'switch',
- 'label' => $this->l('Number of visitors'),
- 'desc' => $this->l('Display the number of visitors who are currently watching this product.').'