Remove blockbestsellers
This commit is contained in:
@@ -62,7 +62,6 @@
|
||||
<module action="enable" name="blockcart"/>
|
||||
<module action="enable" name="blockuserinfo"/>
|
||||
<module action="disable" name="blockadvertising"/>
|
||||
<module action="disable" name="blockbestsellers"/>
|
||||
<module action="disable" name="blockcategories"/>
|
||||
<module action="disable" name="blockcms"/>
|
||||
<module action="disable" name="blockcmsinfo"/>
|
||||
|
||||
@@ -2086,7 +2086,6 @@ class AdminThemesControllerCore extends AdminController
|
||||
'addsharethis',
|
||||
'bankwire',
|
||||
'blockadvertising',
|
||||
'blockbestsellers',
|
||||
'blockcart',
|
||||
'blockcategories',
|
||||
'blockcms',
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
2014-04-22 18:56:53 +0200 // Changelog updated
|
||||
2014-03-24 11:43:28 +0100 / MO blockbestsellers : ps_versions_compliancy modified (1.5.6.1 => 1.6)
|
||||
2014-03-24 10:59:58 +0100 // MO blockbestsellers : ps_versions_compliancy added
|
||||
2014-03-20 14:20:39 +0100 Initial commit
|
||||
@@ -1,37 +0,0 @@
|
||||
# Top-sellers block
|
||||
|
||||
## About
|
||||
|
||||
Adds a block displaying your store\'s top-selling products.
|
||||
|
||||
## Contributing
|
||||
|
||||
PrestaShop modules are open-source extensions to the PrestaShop e-commerce solution. Everyone is welcome and even encouraged to contribute with their own improvements.
|
||||
|
||||
### Requirements
|
||||
|
||||
Contributors **must** follow the following rules:
|
||||
|
||||
* **Make your Pull Request on the "dev" branch**, NOT the "master" branch.
|
||||
* Do not update the module's version number.
|
||||
* Follow [the coding standards][1].
|
||||
|
||||
### Process in details
|
||||
|
||||
Contributors wishing to edit a module's files should follow the following process:
|
||||
|
||||
1. Create your GitHub account, if you do not have one already.
|
||||
2. Fork the blockbestsellers project to your GitHub account.
|
||||
3. Clone your fork to your local machine in the ```/modules``` directory of your PrestaShop installation.
|
||||
4. Create a branch in your local clone of the module for your changes.
|
||||
5. Change the files in your branch. Be sure to follow [the coding standards][1]!
|
||||
6. Push your changed branch to your fork in your GitHub account.
|
||||
7. Create a pull request for your changes **on the _'dev'_ branch** of the module's project. Be sure to follow [the commit message norm][2] in your pull request. If you need help to make a pull request, read the [Github help page about creating pull requests][3].
|
||||
8. Wait for one of the core developers either to include your change in the codebase, or to comment on possible improvements you should make to your code.
|
||||
|
||||
That's it: you have contributed to this open-source project! Congratulations!
|
||||
|
||||
[1]: http://doc.prestashop.com/display/PS16/Coding+Standards
|
||||
[2]: http://doc.prestashop.com/display/PS16/How+to+write+a+commit+message
|
||||
[3]: https://help.github.com/articles/using-pull-requests
|
||||
|
||||
@@ -1,273 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2015 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-2015 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 BlockBestSellers extends Module
|
||||
{
|
||||
protected static $cache_best_sellers;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->name = 'blockbestsellers';
|
||||
$this->tab = 'front_office_features';
|
||||
$this->version = '1.7.0';
|
||||
$this->author = 'PrestaShop';
|
||||
$this->need_instance = 0;
|
||||
$this->bootstrap = true;
|
||||
|
||||
parent::__construct();
|
||||
|
||||
$this->displayName = $this->l('Top-sellers block');
|
||||
$this->description = $this->l('Adds a block displaying your store\'s top-selling products.');
|
||||
$this->ps_versions_compliancy = array('min' => '1.6', 'max' => _PS_VERSION_);
|
||||
}
|
||||
|
||||
public function install()
|
||||
{
|
||||
$this->_clearCache('*');
|
||||
|
||||
if (!parent::install()
|
||||
|| !$this->registerHook('header')
|
||||
|| !$this->registerHook('leftColumn')
|
||||
|| !$this->registerHook('actionOrderStatusPostUpdate')
|
||||
|| !$this->registerHook('addproduct')
|
||||
|| !$this->registerHook('updateproduct')
|
||||
|| !$this->registerHook('deleteproduct')
|
||||
|| !$this->registerHook('displayHomeTab')
|
||||
|| !$this->registerHook('displayHomeTabContent')
|
||||
|| !ProductSale::fillProductSales()
|
||||
)
|
||||
return false;
|
||||
|
||||
Configuration::updateValue('PS_BLOCK_BESTSELLERS_TO_DISPLAY', 10);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public function uninstall()
|
||||
{
|
||||
$this->_clearCache('*');
|
||||
|
||||
return parent::uninstall();
|
||||
}
|
||||
|
||||
public function hookAddProduct($params)
|
||||
{
|
||||
$this->_clearCache('*');
|
||||
}
|
||||
|
||||
public function hookUpdateProduct($params)
|
||||
{
|
||||
$this->_clearCache('*');
|
||||
}
|
||||
|
||||
public function hookDeleteProduct($params)
|
||||
{
|
||||
$this->_clearCache('*');
|
||||
}
|
||||
|
||||
public function hookActionOrderStatusPostUpdate($params)
|
||||
{
|
||||
$this->_clearCache('*');
|
||||
}
|
||||
|
||||
public function _clearCache($template, $cache_id = null, $compile_id = null)
|
||||
{
|
||||
parent::_clearCache('blockbestsellers.tpl', 'blockbestsellers-col');
|
||||
parent::_clearCache('blockbestsellers-home.tpl', 'blockbestsellers-home');
|
||||
parent::_clearCache('tab.tpl', 'blockbestsellers-tab');
|
||||
}
|
||||
|
||||
/**
|
||||
* Called in administration -> module -> configure
|
||||
*/
|
||||
public function getContent()
|
||||
{
|
||||
$output = '';
|
||||
if (Tools::isSubmit('submitBestSellers'))
|
||||
{
|
||||
Configuration::updateValue('PS_BLOCK_BESTSELLERS_DISPLAY', (int)Tools::getValue('PS_BLOCK_BESTSELLERS_DISPLAY'));
|
||||
Configuration::updateValue('PS_BLOCK_BESTSELLERS_TO_DISPLAY', (int)Tools::getValue('PS_BLOCK_BESTSELLERS_TO_DISPLAY'));
|
||||
$this->_clearCache('*');
|
||||
$output .= $this->displayConfirmation($this->l('Settings updated'));
|
||||
}
|
||||
|
||||
return $output.$this->renderForm();
|
||||
}
|
||||
|
||||
public function renderForm()
|
||||
{
|
||||
$fields_form = array(
|
||||
'form' => array(
|
||||
'legend' => array(
|
||||
'title' => $this->l('Settings'),
|
||||
'icon' => 'icon-cogs'
|
||||
),
|
||||
'input' => array(
|
||||
array(
|
||||
'type' => 'text',
|
||||
'label' => $this->l('Products to display'),
|
||||
'name' => 'PS_BLOCK_BESTSELLERS_TO_DISPLAY',
|
||||
'desc' => $this->l('Determine the number of product to display in this block'),
|
||||
'class' => 'fixed-width-xs',
|
||||
),
|
||||
array(
|
||||
'type' => 'switch',
|
||||
'label' => $this->l('Always display this block'),
|
||||
'name' => 'PS_BLOCK_BESTSELLERS_DISPLAY',
|
||||
'desc' => $this->l('Show the block even if no best sellers are available.'),
|
||||
'is_bool' => true,
|
||||
'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;
|
||||
$this->fields_form = array();
|
||||
|
||||
$helper->identifier = $this->identifier;
|
||||
$helper->submit_action = 'submitBestSellers';
|
||||
$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_BLOCK_BESTSELLERS_TO_DISPLAY' => (int)Tools::getValue('PS_BLOCK_BESTSELLERS_TO_DISPLAY', Configuration::get('PS_BLOCK_BESTSELLERS_TO_DISPLAY')),
|
||||
'PS_BLOCK_BESTSELLERS_DISPLAY' => (int)Tools::getValue('PS_BLOCK_BESTSELLERS_DISPLAY', Configuration::get('PS_BLOCK_BESTSELLERS_DISPLAY')),
|
||||
);
|
||||
}
|
||||
|
||||
public function hookHeader($params)
|
||||
{
|
||||
if (Configuration::get('PS_CATALOG_MODE'))
|
||||
return;
|
||||
if (isset($this->context->controller->php_self) && $this->context->controller->php_self == 'index')
|
||||
$this->context->controller->addCSS(_THEME_CSS_DIR_.'product_list.css');
|
||||
$this->context->controller->addCSS($this->_path.'blockbestsellers.css', 'all');
|
||||
}
|
||||
|
||||
public function hookDisplayHomeTab($params)
|
||||
{
|
||||
if (!$this->isCached('tab.tpl', $this->getCacheId('blockbestsellers-tab')))
|
||||
{
|
||||
BlockBestSellers::$cache_best_sellers = $this->getBestSellers($params);
|
||||
$this->smarty->assign('best_sellers', BlockBestSellers::$cache_best_sellers);
|
||||
}
|
||||
|
||||
if (BlockBestSellers::$cache_best_sellers === false)
|
||||
return false;
|
||||
|
||||
return $this->display(__FILE__, 'tab.tpl', $this->getCacheId('blockbestsellers-tab'));
|
||||
}
|
||||
|
||||
public function hookDisplayHomeTabContent($params)
|
||||
{
|
||||
if (!$this->isCached('blockbestsellers-home.tpl', $this->getCacheId('blockbestsellers-home')))
|
||||
{
|
||||
$this->smarty->assign(array(
|
||||
'best_sellers' => BlockBestSellers::$cache_best_sellers,
|
||||
'homeSize' => Image::getSize(ImageType::getFormatedName('home'))
|
||||
));
|
||||
}
|
||||
|
||||
if (BlockBestSellers::$cache_best_sellers === false)
|
||||
return false;
|
||||
|
||||
return $this->display(__FILE__, 'blockbestsellers-home.tpl', $this->getCacheId('blockbestsellers-home'));
|
||||
}
|
||||
|
||||
public function hookRightColumn($params)
|
||||
{
|
||||
if (!$this->isCached('blockbestsellers.tpl', $this->getCacheId('blockbestsellers-col')))
|
||||
{
|
||||
if (!isset(BlockBestSellers::$cache_best_sellers))
|
||||
BlockBestSellers::$cache_best_sellers = $this->getBestSellers($params);
|
||||
$this->smarty->assign(array(
|
||||
'best_sellers' => BlockBestSellers::$cache_best_sellers,
|
||||
'display_link_bestsellers' => Configuration::get('PS_DISPLAY_BEST_SELLERS'),
|
||||
'mediumSize' => Image::getSize(ImageType::getFormatedName('medium')),
|
||||
'smallSize' => Image::getSize(ImageType::getFormatedName('small'))
|
||||
));
|
||||
}
|
||||
|
||||
if (BlockBestSellers::$cache_best_sellers === false)
|
||||
return false;
|
||||
|
||||
return $this->display(__FILE__, 'blockbestsellers.tpl', $this->getCacheId('blockbestsellers-col'));
|
||||
}
|
||||
|
||||
public function hookLeftColumn($params)
|
||||
{
|
||||
return $this->hookRightColumn($params);
|
||||
}
|
||||
|
||||
protected function getBestSellers($params)
|
||||
{
|
||||
if (Configuration::get('PS_CATALOG_MODE'))
|
||||
return false;
|
||||
|
||||
if (!($result = ProductSale::getBestSalesLight((int)$params['cookie']->id_lang, 0, (int)Configuration::get('PS_BLOCK_BESTSELLERS_TO_DISPLAY'))))
|
||||
return (Configuration::get('PS_BLOCK_BESTSELLERS_DISPLAY') ? array() : false);
|
||||
|
||||
$currency = new Currency($params['cookie']->id_currency);
|
||||
$usetax = (Product::getTaxCalculationMethod((int)$this->context->customer->id) != PS_TAX_EXC);
|
||||
foreach ($result as &$row)
|
||||
$row['price'] = Tools::displayPrice(Product::getPriceStatic((int)$row['id_product'], $usetax), $currency);
|
||||
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
{
|
||||
"name": "PrestaShop/blockbestsellers",
|
||||
"description": "PrestaShop module blockbestsellers",
|
||||
"homepage": "https://github.com/PrestaShop/blockbestsellers",
|
||||
"license": "AFL - Academic Free License (AFL 3.0)",
|
||||
"authors": [
|
||||
{
|
||||
"name": "PrestaShop SA",
|
||||
"email": "contact@prestashop.com"
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"php": ">=5.3.2"
|
||||
},
|
||||
"config": {
|
||||
"preferred-install": "dist"
|
||||
},
|
||||
"type": "prestashop-module"
|
||||
}
|
||||
@@ -1,55 +0,0 @@
|
||||
/* Block best sellers */
|
||||
#best-sellers_block_right ul {margin-bottom:5px}
|
||||
#best-sellers_block_right li {
|
||||
float:none;
|
||||
padding:10px 0;
|
||||
border-bottom:1px dotted #ccc
|
||||
}
|
||||
#best-sellers_block_right li.last_item {border:none}
|
||||
#best-sellers_block_right li a.content_img {
|
||||
display:block;
|
||||
float:left;
|
||||
padding:1px;
|
||||
height:47px;
|
||||
width:67px;
|
||||
text-decoration:none;
|
||||
background:#333
|
||||
}
|
||||
#best-sellers_block_right li span.number {
|
||||
display:block;
|
||||
float:left;
|
||||
margin-top:6px;
|
||||
width:20px;
|
||||
font-weight:bold;
|
||||
font-size:18px;
|
||||
color:#fff;
|
||||
text-align:center
|
||||
}
|
||||
#best-sellers_block_right li img {
|
||||
border:1px solid #ededed;
|
||||
}
|
||||
#best-sellers_block_right li p {
|
||||
float:left;
|
||||
margin-left:7px;
|
||||
padding:0;
|
||||
width:125px;
|
||||
font-weight:bold;
|
||||
font-size:12px
|
||||
}
|
||||
#best-sellers_block_right li .price {
|
||||
font-weight:bold;
|
||||
font-size:14px;
|
||||
color:#990000;
|
||||
|
||||
}
|
||||
|
||||
#best-sellers_block_right p.lnk {
|
||||
padding:0;
|
||||
text-align:right
|
||||
}
|
||||
#best-sellers_block_right .lnk .button_large {
|
||||
padding:0;
|
||||
border:none;
|
||||
background:none
|
||||
}
|
||||
#best-sellers_block_right .lnk .button_large:hover {text-decoration:underline}
|
||||
@@ -1,35 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2015 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-2015 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.
|
Before Width: | Height: | Size: 601 B |
@@ -1,35 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2015 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-2015 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.
|
Before Width: | Height: | Size: 601 B |
Binary file not shown.
|
Before Width: | Height: | Size: 1.5 KiB |
@@ -1,35 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2015 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-2015 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,9 +0,0 @@
|
||||
<?php
|
||||
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
|
||||
function upgrade_module_1_2($object)
|
||||
{
|
||||
return ($object->registerHook('addproduct') && $object->registerHook('updateproduct') && $object->registerHook('deleteproduct') && $object->registerHook('actionOrderStatusPostUpdate'));
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
<?php
|
||||
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
|
||||
function upgrade_module_1_3($object)
|
||||
{
|
||||
return ($object->registerHook('displayHomeTab') && $object->registerHook('displayHomeTabContent'));
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2015 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Open Software License (OSL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/osl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2015 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
|
||||
function upgrade_module_1_5_5($object)
|
||||
{
|
||||
return Configuration::updateValue('PS_BLOCK_BESTSELLERS_TO_DISPLAY', 10);
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2015 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-2015 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,32 +0,0 @@
|
||||
{*
|
||||
* 2007-2015 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-2015 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($best_sellers) && $best_sellers}
|
||||
{include file="$tpl_dir./product-list.tpl" products=$best_sellers class='blockbestsellers tab-pane' id='blockbestsellers'}
|
||||
{else}
|
||||
<ul id="blockbestsellers" class="blockbestsellers tab-pane">
|
||||
<li class="alert alert-info">{l s='No best sellers at this time.' mod='blockbestsellers'}</li>
|
||||
</ul>
|
||||
{/if}
|
||||
@@ -1,69 +0,0 @@
|
||||
{*
|
||||
* 2007-2015 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-2015 PrestaShop SA
|
||||
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
<!-- MODULE Block best sellers -->
|
||||
<div id="best-sellers_block_right" class="block products_block">
|
||||
<h4 class="title_block">
|
||||
<a href="{$link->getPageLink('best-sales')|escape:'html'}" title="{l s='View a top sellers products' mod='blockbestsellers'}">
|
||||
{l s='Top sellers' mod='blockbestsellers'}
|
||||
</a>
|
||||
</h4>
|
||||
|
||||
<div class="block_content">
|
||||
{if $best_sellers && $best_sellers|@count > 0}
|
||||
<ul class="product_images">
|
||||
{foreach from=$best_sellers item=product name=myLoop}
|
||||
<li class="{if $smarty.foreach.myLoop.first}first_item{elseif $smarty.foreach.myLoop.last}last_item{else}item{/if} clearfix">
|
||||
<a href="{$product.link|escape:'html'}" title="{$product.legend|escape:'html':'UTF-8'}" class="content_img clearfix">
|
||||
<span class="number">{$smarty.foreach.myLoop.iteration}</span>
|
||||
<img src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'small_default')|escape:'html'}"
|
||||
height="{$smallSize.height}" width="{$smallSize.width}"
|
||||
alt="{$product.legend|escape:'html':'UTF-8'}"/>
|
||||
|
||||
</a>
|
||||
{if !$PS_CATALOG_MODE}
|
||||
<p>
|
||||
<a href="{$product.link|escape:'html'}" title="{$product.legend|escape:'html':'UTF-8'}">
|
||||
{$product.name|strip_tags:'UTF-8'|escape:'html':'UTF-8'}<br/>
|
||||
{if !$PS_CATALOG_MODE}
|
||||
<span class="price">{$product.price}</span>
|
||||
{hook h="displayProductPriceBlock" product=$product type="price"}
|
||||
{/if}
|
||||
</a>
|
||||
</p>
|
||||
{/if}
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
<p class="lnk"><a href="{$link->getPageLink('best-sales')|escape:'html'}"
|
||||
title="{l s='All best sellers' mod='blockbestsellers'}"
|
||||
class="button_large">» {l s='All best sellers' mod='blockbestsellers'}</a></p>
|
||||
{else}
|
||||
<p>{l s='No best sellers at this time' mod='blockbestsellers'}</p>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
<!-- /MODULE Block best sellers -->
|
||||
@@ -1,35 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2015 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-2015 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,25 +0,0 @@
|
||||
{*
|
||||
* 2007-2015 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-2015 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
<li><a data-toggle="tab" href="#blockbestsellers" class="blockbestsellers">{l s='Best Sellers' mod='blockbestsellers'}</a></li>
|
||||
@@ -1,35 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2015 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-2015 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,3 +0,0 @@
|
||||
|
||||
|
||||
/*# sourceMappingURL=blockbestsellers.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,65 +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
|
||||
*}
|
||||
|
||||
<!-- MODULE Block best sellers -->
|
||||
<div id="best-sellers_block_right" class="block products_block">
|
||||
<h4 class="title_block">
|
||||
<a href="{$link->getPageLink('best-sales')|escape:'html'}" title="{l s='View a top sellers products' mod='blockbestsellers'}">{l s='Top sellers' mod='blockbestsellers'}</a>
|
||||
</h4>
|
||||
<div class="block_content">
|
||||
{if $best_sellers && $best_sellers|@count > 0}
|
||||
<ul class="block_content products-block">
|
||||
{foreach from=$best_sellers item=product name=myLoop}
|
||||
<li class="clearfix">
|
||||
<a href="{$product.link|escape:'html'}" title="{$product.legend|escape:'html':'UTF-8'}" class="products-block-image content_img clearfix">
|
||||
<img class="replace-2x img-responsive" src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'small_default')|escape:'html'}" alt="{$product.legend|escape:'html':'UTF-8'}" />
|
||||
</a>
|
||||
<div class="product-content">
|
||||
<h5>
|
||||
<a class="product-name" href="{$product.link|escape:'html'}" title="{$product.legend|escape:'html':'UTF-8'}">
|
||||
{$product.name|strip_tags:'UTF-8'|escape:'html':'UTF-8'}
|
||||
</a>
|
||||
</h5>
|
||||
<p class="product-description">{$product.description_short|strip_tags:'UTF-8'|truncate:75:'...'}</p>
|
||||
{if !$PS_CATALOG_MODE}
|
||||
<div class="price-box">
|
||||
<span class="price">{$product.price}</span>
|
||||
{hook h="displayProductPriceBlock" product=$product type="price"}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
<div class="lnk">
|
||||
<a href="{$link->getPageLink('best-sales')|escape:'html'}" title="{l s='All best sellers' mod='blockbestsellers'}" class="btn btn-default button button-small"><span>{l s='All best sellers' mod='blockbestsellers'}<i class="icon-chevron-right right"></i></span></a>
|
||||
</div>
|
||||
{else}
|
||||
<p>{l s='No best sellers at this time' mod='blockbestsellers'}</p>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
<!-- /MODULE Block best sellers -->
|
||||
@@ -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;
|
||||
Reference in New Issue
Block a user