Remove producttooltip, productscategory
@@ -93,8 +93,6 @@
|
||||
<module action="disable" name="homefeatured"/>
|
||||
<module action="disable" name="homeslider"/>
|
||||
<module action="disable" name="productpaymentlogos"/>
|
||||
<module action="disable" name="productscategory"/>
|
||||
<module action="disable" name="producttooltip"/>
|
||||
<module action="disable" name="pscleaner"/>
|
||||
<module action="disable" name="sendtoafriend"/>
|
||||
<module action="disable" name="trackingfront"/>
|
||||
|
||||
@@ -2144,8 +2144,6 @@ class AdminThemesControllerCore extends AdminController
|
||||
'pagesnotfound',
|
||||
'productcomments',
|
||||
'productpaymentlogos',
|
||||
'productscategory',
|
||||
'producttooltip',
|
||||
'pscleaner',
|
||||
'referralprogram',
|
||||
'sekeywords',
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
------------------------------
|
||||
# V1.7.0 to V1.8.1
|
||||
------------------------------
|
||||
|
||||
## Improved/Changed Features:
|
||||
|
||||
* [CO] : Updated with latest PS version - 1.6.1.23.
|
||||
|
||||
|
||||
|
||||
2014-04-17 12:07:47 +0200 // version compliancy
|
||||
2014-04-07 13:48:08 +0200 // Update translation (module name)
|
||||
2014-03-24 15:22:21 +0100 / MO productscategory : ps_versions_compliancy added
|
||||
2014-03-20 14:35:33 +0100 Initial commit
|
||||
@@ -1,36 +0,0 @@
|
||||
<?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
|
||||
* @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;
|
||||
@@ -1,52 +0,0 @@
|
||||
h2.productscategory_h2 {
|
||||
margin:40px 0 20px 0;
|
||||
padding:10px 0;
|
||||
border-bottom:1px solid #ccc;
|
||||
font-size:18px;
|
||||
color:#333
|
||||
}
|
||||
|
||||
#productscategory {overflow:auto}
|
||||
|
||||
#productscategory_list {
|
||||
overflow: hidden;
|
||||
float: left;
|
||||
width: 96%;
|
||||
}
|
||||
#productscategory_list ul {
|
||||
list-style-type:none;
|
||||
margin: 0 0 0 14px;
|
||||
}
|
||||
#productscategory_list li {
|
||||
float:left;
|
||||
margin: 0 9px;
|
||||
padding: 0 5px;
|
||||
}
|
||||
|
||||
@media screen and (-webkit-min-device-pixel-ratio:0) {
|
||||
#productscategory_list li {
|
||||
margin: 0 7px;
|
||||
}
|
||||
}
|
||||
|
||||
#productscategory_list li a.lnk_img {display:block}
|
||||
#productscategory_list li a img {border:1px solid #ccc}
|
||||
#productscategory_list li p.product_name {text-align:center}
|
||||
|
||||
#productscategory_noscroll {
|
||||
height: 120px;
|
||||
width: 100%;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
#productscategory_scroll_left, #productscategory_scroll_right {
|
||||
background: url('../img/thumbs_left.gif') no-repeat center;
|
||||
text-indent: -3000px;
|
||||
display: block;
|
||||
width: 9px;
|
||||
height: 18px;
|
||||
float: left;
|
||||
margin-top: 30px;
|
||||
}
|
||||
|
||||
#productscategory_scroll_right { background-image: url('../img/thumbs_right.gif'); }
|
||||
@@ -1,36 +0,0 @@
|
||||
<?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
|
||||
* @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;
|
||||
|
Before Width: | Height: | Size: 201 B |
|
Before Width: | Height: | Size: 197 B |
@@ -1,36 +0,0 @@
|
||||
<?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
|
||||
* @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;
|
||||
@@ -1,36 +0,0 @@
|
||||
<?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
|
||||
* @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;
|
||||
@@ -1,54 +0,0 @@
|
||||
/*
|
||||
* 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
|
||||
*/
|
||||
|
||||
function pc_serialScrollFixLock(event, targeted, scrolled, items, position)
|
||||
{
|
||||
var leftArrow = position == 0 ? true : false;
|
||||
var rightArrow = position + 5 >= $('#productscategory_list li:visible').length ? true : false;
|
||||
|
||||
$('a#productscategory_scroll_left').css('cursor', leftArrow ? 'default' : 'pointer').fadeTo(0, leftArrow ? 0 : 1);
|
||||
$('a#productscategory_scroll_right').css('cursor', rightArrow ? 'default' : 'pointer').fadeTo(0, rightArrow ? 0 : 1).css('display', rightArrow ? 'none' : 'block');
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
$(document).ready(function()
|
||||
{
|
||||
$('#productscategory_list').serialScroll({
|
||||
items: 'li',
|
||||
prev: 'a#productscategory_scroll_left',
|
||||
next: 'a#productscategory_scroll_right',
|
||||
axis: 'x',
|
||||
offset: 0,
|
||||
stop: true,
|
||||
onBefore: pc_serialScrollFixLock,
|
||||
duration: 300,
|
||||
step: 1,
|
||||
lazy: true,
|
||||
lock: false,
|
||||
force: false,
|
||||
cycle: false });
|
||||
$('#productscategory_list').trigger( 'goto', 0);
|
||||
});
|
||||
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 515 B |
@@ -1,318 +0,0 @@
|
||||
<?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;
|
||||
|
||||
class ProductsCategory extends Module
|
||||
{
|
||||
protected $html;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->name = 'productscategory';
|
||||
$this->version = '1.8.1';
|
||||
$this->author = 'PrestaShop';
|
||||
$this->tab = 'front_office_features';
|
||||
$this->need_instance = 0;
|
||||
|
||||
$this->bootstrap = true;
|
||||
parent::__construct();
|
||||
|
||||
$this->displayName = $this->l('Products in the same category');
|
||||
$this->description = $this->l('Adds a block on the product page that displays products from the same category.');
|
||||
$this->ps_versions_compliancy = array('min' => '1.6', 'max' => '1.6.99.99');
|
||||
}
|
||||
|
||||
public function install()
|
||||
{
|
||||
Configuration::updateValue('PRODUCTSCATEGORY_DISPLAY_PRICE', 0);
|
||||
$this->_clearCache('productscategory.tpl');
|
||||
|
||||
return (parent::install()
|
||||
&& $this->registerHook('productfooter')
|
||||
&& $this->registerHook('header')
|
||||
&& $this->registerHook('addproduct')
|
||||
&& $this->registerHook('updateproduct')
|
||||
&& $this->registerHook('deleteproduct')
|
||||
);
|
||||
}
|
||||
|
||||
public function uninstall()
|
||||
{
|
||||
Configuration::deleteByName('PRODUCTSCATEGORY_DISPLAY_PRICE');
|
||||
$this->_clearCache('productscategory.tpl');
|
||||
|
||||
return parent::uninstall();
|
||||
}
|
||||
|
||||
public function getContent()
|
||||
{
|
||||
$this->html = '';
|
||||
if (Tools::isSubmit('submitCross') &&
|
||||
Tools::getValue('PRODUCTSCATEGORY_DISPLAY_PRICE') != 0 &&
|
||||
Tools::getValue('PRODUCTSCATEGORY_DISPLAY_PRICE') != 1
|
||||
)
|
||||
$this->html .= $this->displayError('Invalid displayPrice.');
|
||||
elseif (Tools::isSubmit('submitCross'))
|
||||
{
|
||||
Configuration::updateValue(
|
||||
'PRODUCTSCATEGORY_DISPLAY_PRICE',
|
||||
Tools::getValue('PRODUCTSCATEGORY_DISPLAY_PRICE')
|
||||
);
|
||||
$this->_clearCache('productscategory.tpl');
|
||||
$this->html .= $this->displayConfirmation($this->l('Settings updated successfully.'));
|
||||
}
|
||||
$this->html .= $this->renderForm();
|
||||
|
||||
return $this->html;
|
||||
}
|
||||
|
||||
protected function getCurrentProduct($products, $id_current)
|
||||
{
|
||||
if ($products)
|
||||
{
|
||||
foreach ($products as $key => $product)
|
||||
{
|
||||
if ($product['id_product'] == $id_current)
|
||||
return $key;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public function hookProductFooter($params)
|
||||
{
|
||||
$id_product = (int)$params['product']->id;
|
||||
$product = $params['product'];
|
||||
|
||||
$cache_id = 'productscategory|'.$id_product.'|'.(isset($params['category']->id_category) ? (int)$params['category']->id_category : (int)$product->id_category_default);
|
||||
|
||||
if (!$this->isCached('productscategory.tpl', $this->getCacheId($cache_id)))
|
||||
{
|
||||
|
||||
$category = false;
|
||||
if (isset($params['category']->id_category))
|
||||
$category = $params['category'];
|
||||
else
|
||||
{
|
||||
if (isset($product->id_category_default) && $product->id_category_default > 1)
|
||||
$category = new Category((int)$product->id_category_default);
|
||||
}
|
||||
|
||||
if (!Validate::isLoadedObject($category) || !$category->active)
|
||||
return false;
|
||||
|
||||
// Get infos
|
||||
$category_products = $category->getProducts($this->context->language->id, 1, 100); /* 100 products max. */
|
||||
$nb_category_products = (int)count($category_products);
|
||||
$middle_position = 0;
|
||||
|
||||
// Remove current product from the list
|
||||
if (is_array($category_products) && count($category_products))
|
||||
{
|
||||
foreach ($category_products as $key => $category_product)
|
||||
{
|
||||
if ($category_product['id_product'] == $id_product)
|
||||
{
|
||||
unset($category_products[$key]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$taxes = Product::getTaxCalculationMethod();
|
||||
if (Configuration::get('PRODUCTSCATEGORY_DISPLAY_PRICE'))
|
||||
{
|
||||
foreach ($category_products as $key => $category_product)
|
||||
{
|
||||
if ($category_product['id_product'] != $id_product)
|
||||
{
|
||||
if ($taxes == 0 || $taxes == 2)
|
||||
{
|
||||
$category_products[$key]['displayed_price'] = Product::getPriceStatic(
|
||||
(int)$category_product['id_product'],
|
||||
true,
|
||||
null,
|
||||
2
|
||||
);
|
||||
} elseif ($taxes == 1)
|
||||
{
|
||||
$category_products[$key]['displayed_price'] = Product::getPriceStatic(
|
||||
(int)$category_product['id_product'],
|
||||
false,
|
||||
null,
|
||||
2
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Get positions
|
||||
$middle_position = (int)round($nb_category_products / 2, 0);
|
||||
$product_position = $this->getCurrentProduct($category_products, (int)$id_product);
|
||||
|
||||
// Flip middle product with current product
|
||||
if ($product_position)
|
||||
{
|
||||
$tmp = $category_products[$middle_position - 1];
|
||||
$category_products[$middle_position - 1] = $category_products[$product_position];
|
||||
$category_products[$product_position] = $tmp;
|
||||
}
|
||||
|
||||
// If products tab higher than 30, slice it
|
||||
if ($nb_category_products > 30)
|
||||
{
|
||||
$category_products = array_slice($category_products, $middle_position - 15, 30, true);
|
||||
$middle_position = 15;
|
||||
}
|
||||
}
|
||||
|
||||
// Display tpl
|
||||
$this->smarty->assign(
|
||||
array(
|
||||
'categoryProducts' => $category_products,
|
||||
'middlePosition' => (int)$middle_position,
|
||||
'ProdDisplayPrice' => Configuration::get('PRODUCTSCATEGORY_DISPLAY_PRICE')
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
return $this->display(__FILE__, 'productscategory.tpl', $this->getCacheId($cache_id));
|
||||
}
|
||||
|
||||
public function hookHeader($params)
|
||||
{
|
||||
if (!isset($this->context->controller->php_self) || $this->context->controller->php_self != 'product')
|
||||
return;
|
||||
$this->context->controller->addCSS($this->_path.'css/productscategory.css', 'all');
|
||||
$this->context->controller->addJS($this->_path.'js/productscategory.js');
|
||||
$this->context->controller->addJqueryPlugin(array('scrollTo', 'serialScroll', 'bxslider'));
|
||||
}
|
||||
|
||||
public function hookAddProduct($params)
|
||||
{
|
||||
if (!isset($params['product']))
|
||||
return;
|
||||
$id_product = (int)$params['product']->id;
|
||||
$product = $params['product'];
|
||||
|
||||
$cache_id = 'productscategory|'.$id_product.'|'.(isset($params['category']->id_category) ? (int)$params['category']->id_category : (int)$product->id_category_default);
|
||||
$this->_clearCache('productscategory.tpl', $this->getCacheId($cache_id));
|
||||
}
|
||||
|
||||
public function hookUpdateProduct($params)
|
||||
{
|
||||
if (!isset($params['product']))
|
||||
return;
|
||||
$id_product = (int)$params['product']->id;
|
||||
$product = $params['product'];
|
||||
|
||||
$cache_id = 'productscategory|'.$id_product.'|'.(isset($params['category']->id_category) ? (int)$params['category']->id_category : (int)$product->id_category_default);
|
||||
$this->_clearCache('productscategory.tpl', $this->getCacheId($cache_id));
|
||||
}
|
||||
|
||||
public function hookDeleteProduct($params)
|
||||
{
|
||||
if (!isset($params['product']))
|
||||
return;
|
||||
$id_product = (int)$params['product']->id;
|
||||
$product = $params['product'];
|
||||
|
||||
$cache_id = 'productscategory|'.$id_product.'|'.(isset($params['category']->id_category) ? (int)$params['category']->id_category : (int)$product->id_category_default);
|
||||
$this->_clearCache('productscategory.tpl', $this->getCacheId($cache_id));
|
||||
}
|
||||
|
||||
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('Display products\' prices'),
|
||||
'desc' => $this->l('Show the prices of the products displayed in the block.'),
|
||||
'name' => 'PRODUCTSCATEGORY_DISPLAY_PRICE',
|
||||
'values' => array(
|
||||
array(
|
||||
'id' => 'active_on',
|
||||
'value' => 1,
|
||||
'label' => $this->l('Enabled')
|
||||
),
|
||||
array(
|
||||
'id' => 'active_off',
|
||||
'value' => 0,
|
||||
'label' => $this->l('Disabled')
|
||||
)
|
||||
),
|
||||
),
|
||||
),
|
||||
'submit' => array(
|
||||
'title' => $this->l('Save'),
|
||||
)
|
||||
),
|
||||
);
|
||||
|
||||
$helper = new HelperForm();
|
||||
$helper->show_toolbar = false;
|
||||
$helper->table = $this->table;
|
||||
$lang = new Language((int)Configuration::get('PS_LANG_DEFAULT'));
|
||||
$helper->default_form_language = $lang->id;
|
||||
$helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') ? Configuration::get(
|
||||
'PS_BO_ALLOW_EMPLOYEE_FORM_LANG'
|
||||
) : 0;
|
||||
$helper->identifier = $this->identifier;
|
||||
$helper->submit_action = 'submitCross';
|
||||
$helper->currentIndex = $this->context->link->getAdminLink(
|
||||
'AdminModules',
|
||||
false
|
||||
).'&configure='.$this->name.'&tab_module='.$this->tab.'&module_name='.$this->name;
|
||||
$helper->token = Tools::getAdminTokenLite('AdminModules');
|
||||
$helper->tpl_vars = array(
|
||||
'fields_value' => $this->getConfigFieldsValues(),
|
||||
'languages' => $this->context->controller->getLanguages(),
|
||||
'id_language' => $this->context->language->id
|
||||
);
|
||||
|
||||
return $helper->generateForm(array($fields_form));
|
||||
}
|
||||
|
||||
public function getConfigFieldsValues()
|
||||
{
|
||||
return array(
|
||||
'PRODUCTSCATEGORY_DISPLAY_PRICE' => Tools::getValue(
|
||||
'PRODUCTSCATEGORY_DISPLAY_PRICE',
|
||||
Configuration::get('PRODUCTSCATEGORY_DISPLAY_PRICE')
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
<?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;
|
||||
@@ -1,36 +0,0 @@
|
||||
<?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
|
||||
* @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;
|
||||
@@ -1,33 +0,0 @@
|
||||
<?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
|
||||
* @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
|
||||
*/
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
|
||||
function upgrade_module_1_4($object)
|
||||
{
|
||||
return ($object->registerHook('addproduct') && $object->registerHook('updateproduct') && $object->registerHook('deleteproduct'));
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
<?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
|
||||
* @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
|
||||
*/
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
|
||||
function upgrade_module_1_5($object)
|
||||
{
|
||||
if (!$object->isRegisteredInHook('header'))
|
||||
return $object->registerHook('header');
|
||||
return true;
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
<?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
|
||||
* @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;
|
||||
@@ -1,36 +0,0 @@
|
||||
<?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
|
||||
* @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;
|
||||
@@ -1,62 +0,0 @@
|
||||
{*
|
||||
* 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 isset($categoryProducts) && count($categoryProducts) > 0 && $categoryProducts !== false}
|
||||
<div class="clearfix blockproductscategory">
|
||||
<h2 class="productscategory_h2">
|
||||
{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}
|
||||
</h2>
|
||||
<div id="{if count($categoryProducts) > 5}productscategory{else}productscategory_noscroll{/if}">
|
||||
{if count($categoryProducts) > 5}<a id="productscategory_scroll_left" title="{l s='Previous' mod='productscategory'}" href="javascript:{ldelim}{rdelim}">{l s='Previous' mod='productscategory'}</a>{/if}
|
||||
<div id="productscategory_list">
|
||||
<ul {if count($categoryProducts) > 5}style="width: {math equation="width * nbImages" width=107 nbImages=$categoryProducts|@count}px"{/if}>
|
||||
{foreach from=$categoryProducts item='categoryProduct' name=categoryProduct}
|
||||
<li {if count($categoryProducts) < 6}style="width:60px"{/if}>
|
||||
<a href="{$link->getProductLink($categoryProduct.id_product, $categoryProduct.link_rewrite, $categoryProduct.category, $categoryProduct.ean13)}" class="lnk_img" title="{$categoryProduct.name|htmlspecialchars}"><img src="{$link->getImageLink($categoryProduct.link_rewrite, $categoryProduct.id_image, 'medium_default')|escape:'html'}" alt="{$categoryProduct.name|htmlspecialchars}" /></a>
|
||||
<p class="product_name">
|
||||
<a href="{$link->getProductLink($categoryProduct.id_product, $categoryProduct.link_rewrite, $categoryProduct.category, $categoryProduct.ean13)|escape:'html'}" title="{$categoryProduct.name|htmlspecialchars}">{$categoryProduct.name|truncate:14:'...'|escape:'html':'UTF-8'}</a>
|
||||
</p>
|
||||
{if $ProdDisplayPrice AND $categoryProduct.show_price == 1 AND !isset($restricted_country_mode) AND !$PS_CATALOG_MODE}
|
||||
<p class="price_display">
|
||||
<span class="price">{convertPrice price=$categoryProduct.displayed_price}</span>
|
||||
</p>
|
||||
{else}
|
||||
<br />
|
||||
{/if}
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
</div>
|
||||
{if count($categoryProducts) > 5}<a id="productscategory_scroll_right" title="{l s='Next' mod='productscategory'}" href="javascript:{ldelim}{rdelim}">{l s='Next' mod='productscategory'}</a>{/if}
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$('#productscategory_list').trigger('goto', [{$middlePosition}-3]);
|
||||
</script>
|
||||
</div>
|
||||
{/if}
|
||||
@@ -1,36 +0,0 @@
|
||||
<?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
|
||||
* @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;
|
||||
@@ -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
|
||||
@@ -1,36 +0,0 @@
|
||||
<?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
|
||||
* @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;
|
||||
|
Before Width: | Height: | Size: 359 B |
|
Before Width: | Height: | Size: 1.0 KiB |
@@ -1,284 +0,0 @@
|
||||
<?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;
|
||||
|
||||
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.').'<br>'.
|
||||
$this->l('If you activate the option above, you must activate the first option ("Save page views for each customer") of the "Data mining for statistics" (StatsData) module.'),
|
||||
'name' => 'PS_PTOOLTIP_PEOPLE',
|
||||
'values' => array(
|
||||
array(
|
||||
'id' => 'active_on',
|
||||
'value' => 1,
|
||||
'label' => $this->l('Enabled')
|
||||
),
|
||||
array(
|
||||
'id' => 'active_off',
|
||||
'value' => 0,
|
||||
'label' => $this->l('Disabled')
|
||||
)
|
||||
),
|
||||
),
|
||||
array(
|
||||
'type' => 'text',
|
||||
'label' => $this->l('Period length'),
|
||||
'desc' => $this->l('Set the reference period length.').'<br>'.
|
||||
$this->l('For instance, if set to 30 minutes, the module will display the number of visitors in the last 30 minutes.'),
|
||||
'name' => 'PS_PTOOLTIP_LIFETIME',
|
||||
'suffix' => $this->l('minutes'),
|
||||
'values' => array(
|
||||
array(
|
||||
'id' => 'active_on',
|
||||
'value' => 1,
|
||||
'label' => $this->l('Enabled')
|
||||
),
|
||||
array(
|
||||
'id' => 'active_off',
|
||||
'value' => 0,
|
||||
'label' => $this->l('Disabled')
|
||||
)
|
||||
),
|
||||
),
|
||||
array(
|
||||
'type' => 'switch',
|
||||
'label' => $this->l('Last order date'),
|
||||
'desc' => $this->l('Display the last time the product has been ordered.'),
|
||||
'name' => 'PS_PTOOLTIP_DATE_ORDER',
|
||||
'values' => array(
|
||||
array(
|
||||
'id' => 'active_on',
|
||||
'value' => 1,
|
||||
'label' => $this->l('Enabled')
|
||||
),
|
||||
array(
|
||||
'id' => 'active_off',
|
||||
'value' => 0,
|
||||
'label' => $this->l('Disabled')
|
||||
)
|
||||
),
|
||||
),
|
||||
array(
|
||||
'type' => 'switch',
|
||||
'label' => $this->l('Added to a cart'),
|
||||
'desc' => $this->l('If the product has not been ordered yet, display the last time it was added to a cart.'),
|
||||
'name' => 'PS_PTOOLTIP_DATE_CART',
|
||||
'values' => array(
|
||||
array(
|
||||
'id' => 'active_on',
|
||||
'value' => 1,
|
||||
'label' => $this->l('Enabled')
|
||||
),
|
||||
array(
|
||||
'id' => 'active_off',
|
||||
'value' => 0,
|
||||
'label' => $this->l('Disabled')
|
||||
)
|
||||
),
|
||||
),
|
||||
array(
|
||||
'type' => 'text',
|
||||
'label' => $this->l('Do not display events older than'),
|
||||
'name' => 'PS_PTOOLTIP_DAYS',
|
||||
'suffix' => $this->l('days')
|
||||
),
|
||||
),
|
||||
'submit' => array(
|
||||
'title' => $this->l('Save'),
|
||||
)
|
||||
),
|
||||
);
|
||||
|
||||
$helper = new HelperForm();
|
||||
$helper->show_toolbar = false;
|
||||
$helper->table = $this->table;
|
||||
$lang = new Language((int)Configuration::get('PS_LANG_DEFAULT'));
|
||||
$helper->default_form_language = $lang->id;
|
||||
$helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') ? Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') : 0;
|
||||
$this->fields_form = array();
|
||||
|
||||
$helper->identifier = $this->identifier;
|
||||
$helper->submit_action = 'SubmitToolTip';
|
||||
$helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false).'&configure='.$this->name.'&tab_module='.$this->tab.'&module_name='.$this->name;
|
||||
$helper->token = Tools::getAdminTokenLite('AdminModules');
|
||||
$helper->tpl_vars = array(
|
||||
'fields_value' => $this->getConfigFieldsValues(),
|
||||
'languages' => $this->context->controller->getLanguages(),
|
||||
'id_language' => $this->context->language->id
|
||||
);
|
||||
|
||||
return $helper->generateForm(array($fields_form));
|
||||
}
|
||||
|
||||
public function getConfigFieldsValues()
|
||||
{
|
||||
return array(
|
||||
'PS_PTOOLTIP_PEOPLE' => Tools::getValue('PS_PTOOLTIP_PEOPLE', Configuration::get('PS_PTOOLTIP_PEOPLE')),
|
||||
'PS_PTOOLTIP_LIFETIME' => Tools::getValue('PS_PTOOLTIP_LIFETIME', Configuration::get('PS_PTOOLTIP_LIFETIME')),
|
||||
'PS_PTOOLTIP_DATE_ORDER' => Tools::getValue('PS_PTOOLTIP_DATE_ORDER', Configuration::get('PS_PTOOLTIP_DATE_ORDER')),
|
||||
'PS_PTOOLTIP_DATE_CART' => Tools::getValue('PS_PTOOLTIP_DATE_CART', Configuration::get('PS_PTOOLTIP_DATE_CART')),
|
||||
'PS_PTOOLTIP_DAYS' => Tools::getValue('PS_PTOOLTIP_DAYS', Configuration::get('PS_PTOOLTIP_DAYS')),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 30 KiB |
@@ -1,35 +0,0 @@
|
||||
<?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;
|
||||
@@ -1,36 +0,0 @@
|
||||
<?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
|
||||
* @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;
|
||||
@@ -1,36 +0,0 @@
|
||||
<?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
|
||||
* @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;
|
||||
@@ -1,40 +0,0 @@
|
||||
{*
|
||||
* 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
|
||||
*}
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function () {ldelim}
|
||||
{if isset($nb_people)}
|
||||
$.growl({ldelim}title: '', message: '{if $nb_people == 1}{l s='%d person is currently watching this product.' sprintf=$nb_people mod='producttooltip' js=1}{else}{l s='%d people are currently watching this product.' sprintf=$nb_people mod='producttooltip' js=1}{/if}'{rdelim});
|
||||
{/if}
|
||||
|
||||
{if isset($date_last_order)}
|
||||
$.growl({ldelim}title: '', message: '{l s='Last time this product was bought: ' mod='producttooltip' js=1} {dateFormat date=$date_last_order full=1}'{rdelim});
|
||||
{/if}
|
||||
|
||||
{if isset($date_last_cart)}
|
||||
$.growl({ldelim}title: '', message: '{l s='Last time this product was added to a cart: ' mod='producttooltip' js=1} {dateFormat date=$date_last_cart full=1}'{rdelim});
|
||||
{/if}
|
||||
|
||||
{rdelim});
|
||||
</script>
|
||||
@@ -1,36 +0,0 @@
|
||||
<?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
|
||||
* @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;
|
||||
|
Before Width: | Height: | Size: 1.1 KiB |
@@ -1,35 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2017 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-2017 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;
|
||||
@@ -1,35 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2017 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-2017 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;
|
||||
@@ -1,17 +0,0 @@
|
||||
#productscategory_list .product-name {
|
||||
margin-bottom: 5px; }
|
||||
#productscategory_list .product-name a {
|
||||
font-size: 15px;
|
||||
line-height: 18px;
|
||||
color: #3a3939; }
|
||||
#productscategory_list .product-name a:hover {
|
||||
color: #515151; }
|
||||
#productscategory_list .exclusive span {
|
||||
font-size: 13px;
|
||||
line-height: 18px;
|
||||
padding: 2px 8px 3px;
|
||||
text-decoration: none; }
|
||||
#productscategory_list .exclusive span:focus, #productscategory_list .exclusive span:active {
|
||||
text-decoration: none; }
|
||||
|
||||
/*# sourceMappingURL=productscategory.css.map */
|
||||
@@ -1,35 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2017 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-2017 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;
|
||||
@@ -1,35 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2017 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-2017 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;
|
||||
@@ -1,35 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2017 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-2017 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;
|
||||
@@ -1,39 +0,0 @@
|
||||
/*
|
||||
* 2007-2017 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-2017 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
$(document).ready(function() {
|
||||
if (!!$.prototype.bxSlider)
|
||||
$('#bxslider1').bxSlider({
|
||||
minSlides: 2,
|
||||
maxSlides: 6,
|
||||
slideWidth: 178,
|
||||
slideMargin: 20,
|
||||
pager: false,
|
||||
nextText: '',
|
||||
prevText: '',
|
||||
moveSlides:1,
|
||||
infiniteLoop:false,
|
||||
hideControlOnEnd: true
|
||||
});
|
||||
});
|
||||
@@ -1,35 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2017 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-2017 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;
|
||||
@@ -1,74 +0,0 @@
|
||||
{*
|
||||
* 2007-2017 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-2017 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 count($categoryProducts) > 0 && $categoryProducts !== false}
|
||||
<section class="page-product-box blockproductscategory">
|
||||
<h3 class="productscategory_h3 page-product-heading">
|
||||
{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}
|
||||
</h3>
|
||||
<div id="productscategory_list" class="clearfix">
|
||||
<ul id="bxslider1" class="bxslider clearfix">
|
||||
{foreach from=$categoryProducts item='categoryProduct' name=categoryProduct}
|
||||
<li class="product-box item">
|
||||
<a href="{$link->getProductLink($categoryProduct.id_product, $categoryProduct.link_rewrite, $categoryProduct.category, $categoryProduct.ean13)}" class="lnk_img product-image" title="{$categoryProduct.name|htmlspecialchars}"><img src="{$link->getImageLink($categoryProduct.link_rewrite, $categoryProduct.id_image, 'home_default')|escape:'html':'UTF-8'}" alt="{$categoryProduct.name|htmlspecialchars}" /></a>
|
||||
<h5 itemprop="name" class="product-name">
|
||||
<a href="{$link->getProductLink($categoryProduct.id_product, $categoryProduct.link_rewrite, $categoryProduct.category, $categoryProduct.ean13)|escape:'html':'UTF-8'}" title="{$categoryProduct.name|htmlspecialchars}">{$categoryProduct.name|truncate:14:'...'|escape:'html':'UTF-8'}</a>
|
||||
</h5>
|
||||
{if $ProdDisplayPrice && $categoryProduct.show_price == 1 && !isset($restricted_country_mode) && !$PS_CATALOG_MODE}
|
||||
<p class="price_display">
|
||||
{if isset($categoryProduct.specific_prices) && $categoryProduct.specific_prices
|
||||
&& ($categoryProduct.displayed_price|number_format:2 !== $categoryProduct.price_without_reduction|number_format:2)}
|
||||
|
||||
<span class="price special-price">{convertPrice price=$categoryProduct.displayed_price}</span>
|
||||
{if $categoryProduct.specific_prices.reduction && $categoryProduct.specific_prices.reduction_type == 'percentage'}
|
||||
<span class="price-percent-reduction small">-{$categoryProduct.specific_prices.reduction * 100}%</span>
|
||||
{/if}
|
||||
<span class="old-price">{displayWtPrice p=$categoryProduct.price_without_reduction}</span>
|
||||
|
||||
{else}
|
||||
<span class="price">{convertPrice price=$categoryProduct.displayed_price}</span>
|
||||
{/if}
|
||||
</p>
|
||||
{else}
|
||||
<br />
|
||||
{/if}
|
||||
<div class="clearfix" style="margin-top:5px">
|
||||
{if !$PS_CATALOG_MODE && ($categoryProduct.allow_oosp || $categoryProduct.quantity > 0)}
|
||||
<div class="no-print">
|
||||
<a class="exclusive button ajax_add_to_cart_button" href="{$link->getPageLink('cart', true, NULL, "qty=1&id_product={$categoryProduct.id_product|intval}&token={$static_token}&add")|escape:'html':'UTF-8'}" data-id-product="{$categoryProduct.id_product|intval}" title="{l s='Add to cart' mod='productscategory'}">
|
||||
<span>{l s='Add to cart' mod='productscategory'}</span>
|
||||
</a>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
{/if}
|
||||