From 24b7dc70d28f7b8d7891cdbbbdf8911b46ffad1a Mon Sep 17 00:00:00 2001 From: Abhishek Kumar Date: Wed, 27 Apr 2022 11:02:35 +0530 Subject: [PATCH] Remove blocksupplier and blockmanufacturer --- classes/controller/FrontController.php | 7 - config/xml/themes/default.xml | 2 - controllers/admin/AdminThemesController.php | 2 - controllers/front/SitemapController.php | 16 -- modules/blockmanufacturer/CHANGELOG.txt | 4 - .../blockmanufacturer/blockmanufacturer.php | 235 ----------------- .../blockmanufacturer/blockmanufacturer.tpl | 57 ----- .../blockmanufacturer/img/arrow_right_2.png | Bin 90 -> 0 bytes modules/blockmanufacturer/img/index.php | 35 --- modules/blockmanufacturer/index.php | 35 --- modules/blockmanufacturer/logo.gif | Bin 280 -> 0 bytes modules/blockmanufacturer/logo.png | Bin 1175 -> 0 bytes .../blockmanufacturer/translations/index.php | 35 --- modules/blocksupplier/CHANGELOG.txt | 4 - modules/blocksupplier/blocksupplier.php | 240 ------------------ modules/blocksupplier/blocksupplier.tpl | 59 ----- modules/blocksupplier/img/arrow_right_2.png | Bin 90 -> 0 bytes modules/blocksupplier/img/index.php | 35 --- modules/blocksupplier/index.php | 35 --- modules/blocksupplier/logo.gif | Bin 266 -> 0 bytes modules/blocksupplier/logo.png | Bin 1166 -> 0 bytes modules/blocksupplier/translations/index.php | 35 --- .../blockmanufacturer/blockmanufacturer.tpl | 70 ----- .../modules/blockmanufacturer/index.php | 35 --- .../modules/blocksupplier/blocksupplier.tpl | 75 ------ .../modules/blocksupplier/index.php | 35 --- themes/hotel-reservation-theme/sitemap.tpl | 18 -- 27 files changed, 1069 deletions(-) delete mode 100644 modules/blockmanufacturer/CHANGELOG.txt delete mode 100644 modules/blockmanufacturer/blockmanufacturer.php delete mode 100644 modules/blockmanufacturer/blockmanufacturer.tpl delete mode 100644 modules/blockmanufacturer/img/arrow_right_2.png delete mode 100644 modules/blockmanufacturer/img/index.php delete mode 100644 modules/blockmanufacturer/index.php delete mode 100644 modules/blockmanufacturer/logo.gif delete mode 100644 modules/blockmanufacturer/logo.png delete mode 100644 modules/blockmanufacturer/translations/index.php delete mode 100644 modules/blocksupplier/CHANGELOG.txt delete mode 100644 modules/blocksupplier/blocksupplier.php delete mode 100644 modules/blocksupplier/blocksupplier.tpl delete mode 100644 modules/blocksupplier/img/arrow_right_2.png delete mode 100644 modules/blocksupplier/img/index.php delete mode 100644 modules/blocksupplier/index.php delete mode 100644 modules/blocksupplier/logo.gif delete mode 100644 modules/blocksupplier/logo.png delete mode 100644 modules/blocksupplier/translations/index.php delete mode 100644 themes/hotel-reservation-theme/modules/blockmanufacturer/blockmanufacturer.tpl delete mode 100644 themes/hotel-reservation-theme/modules/blockmanufacturer/index.php delete mode 100644 themes/hotel-reservation-theme/modules/blocksupplier/blocksupplier.tpl delete mode 100644 themes/hotel-reservation-theme/modules/blocksupplier/index.php diff --git a/classes/controller/FrontController.php b/classes/controller/FrontController.php index 521b68c63..e0812ce8b 100644 --- a/classes/controller/FrontController.php +++ b/classes/controller/FrontController.php @@ -1582,17 +1582,10 @@ class FrontControllerCore extends Controller */ public function setMobileTemplate($template) { - // Needed for site map - $blockmanufacturer = Module::getInstanceByName('blockmanufacturer'); - $blocksupplier = Module::getInstanceByName('blocksupplier'); - $this->context->smarty->assign(array( 'categoriesTree' => Category::getRootCategory()->recurseLiteCategTree(0), 'categoriescmsTree' => CMSCategory::getRecurseCategory($this->context->language->id, 1, 1, 1), 'voucherAllowed' => (int)CartRule::isFeatureActive(), - 'display_manufacturer_link' => (bool)$blockmanufacturer->active, - 'display_supplier_link' => (bool)$blocksupplier->active, - 'PS_DISPLAY_SUPPLIERS' => Configuration::get('PS_DISPLAY_SUPPLIERS'), 'PS_DISPLAY_BEST_SELLERS' => Configuration::get('PS_DISPLAY_BEST_SELLERS'), 'display_store' => Configuration::get('PS_STORES_DISPLAY_SITEMAP'), 'conditions' => Configuration::get('PS_CONDITIONS'), diff --git a/config/xml/themes/default.xml b/config/xml/themes/default.xml index 257ab3b78..66a593bcb 100644 --- a/config/xml/themes/default.xml +++ b/config/xml/themes/default.xml @@ -67,14 +67,12 @@ - - diff --git a/controllers/admin/AdminThemesController.php b/controllers/admin/AdminThemesController.php index 5ad96ee4b..d6969afc6 100644 --- a/controllers/admin/AdminThemesController.php +++ b/controllers/admin/AdminThemesController.php @@ -2094,7 +2094,6 @@ class AdminThemesControllerCore extends AdminController 'blocklanguages', 'blocklayered', 'blocklink', - 'blockmanufacturer', 'blockmyaccount', 'blockmyaccountfooter', 'blocknewsletter', @@ -2104,7 +2103,6 @@ class AdminThemesControllerCore extends AdminController 'blocksearch', 'blocksharefb', 'blocksocial', - 'blocksupplier', 'blockuserinfo', 'carriercompare', 'cashondelivery', diff --git a/controllers/front/SitemapController.php b/controllers/front/SitemapController.php index cd355fa97..049fbcf1b 100644 --- a/controllers/front/SitemapController.php +++ b/controllers/front/SitemapController.php @@ -46,22 +46,6 @@ class SitemapControllerCore extends FrontController $this->context->smarty->assign('categoriesTree', Category::getRootCategory()->recurseLiteCategTree(0)); $this->context->smarty->assign('categoriescmsTree', CMSCategory::getRecurseCategory($this->context->language->id, 1, 1, 1)); $this->context->smarty->assign('voucherAllowed', (int)CartRule::isFeatureActive()); - - if (Module::isInstalled('blockmanufacturer') && Module::isEnabled('blockmanufacturer')) { - $blockmanufacturer = Module::getInstanceByName('blockmanufacturer'); - $this->context->smarty->assign('display_manufacturer_link', isset($blockmanufacturer->active) ? (bool)$blockmanufacturer->active : false); - } else { - $this->context->smarty->assign('display_manufacturer_link', 0); - } - - if (Module::isInstalled('blocksupplier') && Module::isEnabled('blocksupplier')) { - $blocksupplier = Module::getInstanceByName('blocksupplier'); - $this->context->smarty->assign('display_supplier_link', isset($blocksupplier->active) ? (bool)$blocksupplier->active : false); - } else { - $this->context->smarty->assign('display_supplier_link', 0); - } - - $this->context->smarty->assign('PS_DISPLAY_SUPPLIERS', Configuration::get('PS_DISPLAY_SUPPLIERS')); $this->context->smarty->assign('PS_DISPLAY_BEST_SELLERS', Configuration::get('PS_DISPLAY_BEST_SELLERS')); $this->context->smarty->assign('display_store', Configuration::get('PS_STORES_DISPLAY_SITEMAP')); diff --git a/modules/blockmanufacturer/CHANGELOG.txt b/modules/blockmanufacturer/CHANGELOG.txt deleted file mode 100644 index 7c302302a..000000000 --- a/modules/blockmanufacturer/CHANGELOG.txt +++ /dev/null @@ -1,4 +0,0 @@ -2014-04-22 18:57:21 +0200 // Changelog updated -2014-03-24 11:43:28 +0100 / MO blockmanufacturer : ps_versions_compliancy modified (1.5.6.1 => 1.6) -2014-03-24 11:02:41 +0100 / MO blockmanufacturer : ps_versions_compliancy added -2014-03-20 14:22:51 +0100 Initial commit diff --git a/modules/blockmanufacturer/blockmanufacturer.php b/modules/blockmanufacturer/blockmanufacturer.php deleted file mode 100644 index 2c01da1c3..000000000 --- a/modules/blockmanufacturer/blockmanufacturer.php +++ /dev/null @@ -1,235 +0,0 @@ - -* @copyright 2007-2016 PrestaShop SA -* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) -* International Registered Trademark & Property of PrestaShop SA -*/ - -if (!defined('_PS_VERSION_')) - exit; - -class BlockManufacturer extends Module -{ - public function __construct() - { - $this->name = 'blockmanufacturer'; - $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('Manufacturers block'); - $this->description = $this->l('Displays a block listing product manufacturers and/or brands.'); - $this->ps_versions_compliancy = array('min' => '1.6', 'max' => '1.6.99.99'); - } - - public function install() - { - Configuration::updateValue('MANUFACTURER_DISPLAY_TEXT', true); - Configuration::updateValue('MANUFACTURER_DISPLAY_TEXT_NB', 5); - Configuration::updateValue('MANUFACTURER_DISPLAY_FORM', false); - $success = (parent::install() && - $this->registerHook('header') && $this->registerHook('leftColumn') && - $this->registerHook('actionObjectManufacturerDeleteAfter') && - $this->registerHook('actionObjectManufacturerAddAfter') && - $this->registerHook('actionObjectManufacturerUpdateAfter') - ); - - return $success; - } - - public function uninstall() - { - if (!parent::uninstall() || - !Configuration::deleteByName('MANUFACTURER_DISPLAY_TEXT') || - !Configuration::deleteByName('MANUFACTURER_DISPLAY_TEXT_NB') || - !Configuration::deleteByName('MANUFACTURER_DISPLAY_FORM') - ) - return false; - - return true; - } - - public function hookLeftColumn($params) - { - if (!$this->isCached('blockmanufacturer.tpl', $this->getCacheId())) - { - $manufacturers = Manufacturer::getManufacturers(); - foreach ($manufacturers as &$manufacturer) - { - $manufacturer['image'] = $this->context->language->iso_code.'-default'; - if (file_exists(_PS_MANU_IMG_DIR_.$manufacturer['id_manufacturer'].'-'.ImageType::getFormatedName('medium').'.jpg')) - $manufacturer['image'] = $manufacturer['id_manufacturer']; - } - - $this->smarty->assign(array( - 'manufacturers' => $manufacturers, - 'text_list' => Configuration::get('MANUFACTURER_DISPLAY_TEXT'), - 'text_list_nb' => Configuration::get('MANUFACTURER_DISPLAY_TEXT_NB'), - 'form_list' => Configuration::get('MANUFACTURER_DISPLAY_FORM'), - 'display_link_manufacturer' => Configuration::get('PS_DISPLAY_SUPPLIERS'), - )); - } - return $this->display(__FILE__, 'blockmanufacturer.tpl', $this->getCacheId()); - } - - public function hookRightColumn($params) - { - return $this->hookLeftColumn($params); - } - - public function getContent() - { - $output = ''; - if (Tools::isSubmit('submitBlockManufacturers')) - { - $text_list = (int)(Tools::getValue('MANUFACTURER_DISPLAY_TEXT')); - $text_nb = (int)(Tools::getValue('MANUFACTURER_DISPLAY_TEXT_NB')); - $form_list = (int)(Tools::getValue('MANUFACTURER_DISPLAY_FORM')); - if ($text_list && !Validate::isUnsignedInt($text_nb)) - $errors[] = $this->l('There is an invalid number of elements.'); - elseif (!$text_list && !$form_list) - $errors[] = $this->l('Please activate at least one system list.'); - else - { - Configuration::updateValue('MANUFACTURER_DISPLAY_TEXT', $text_list); - Configuration::updateValue('MANUFACTURER_DISPLAY_TEXT_NB', $text_nb); - Configuration::updateValue('MANUFACTURER_DISPLAY_FORM', $form_list); - $this->_clearCache('blockmanufacturer.tpl'); - } - if (isset($errors) && count($errors)) - $output .= $this->displayError(implode('
', $errors)); - else - $output .= $this->displayConfirmation($this->l('Settings updated.')); - } - return $output.$this->renderForm(); - } - - public function hookHeader($params) - { - $this->context->controller->addCSS(($this->_path).'blockmanufacturer.css', 'all'); - } - - public function hookActionObjectManufacturerUpdateAfter($params) - { - $this->_clearCache('blockmanufacturer.tpl'); - } - - public function hookActionObjectManufacturerAddAfter($params) - { - $this->_clearCache('blockmanufacturer.tpl'); - } - - public function hookActionObjectManufacturerDeleteAfter($params) - { - $this->_clearCache('blockmanufacturer.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('Use a plain-text list'), - 'name' => 'MANUFACTURER_DISPLAY_TEXT', - 'desc' => $this->l('Display manufacturers in a plain-text list.'), - '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('Number of elements to display'), - 'name' => 'MANUFACTURER_DISPLAY_TEXT_NB', - 'class' => 'fixed-width-xs' - ), - array( - 'type' => 'switch', - 'label' => $this->l('Use a drop-down list'), - 'name' => 'MANUFACTURER_DISPLAY_FORM', - 'desc' => $this->l('Display manufacturers in a drop-down list.'), - '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 = 'submitBlockManufacturers'; - $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( - 'MANUFACTURER_DISPLAY_TEXT' => Tools::getValue('MANUFACTURER_DISPLAY_TEXT', Configuration::get('MANUFACTURER_DISPLAY_TEXT')), - 'MANUFACTURER_DISPLAY_TEXT_NB' => Tools::getValue('MANUFACTURER_DISPLAY_TEXT_NB', Configuration::get('MANUFACTURER_DISPLAY_TEXT_NB')), - 'MANUFACTURER_DISPLAY_FORM' => Tools::getValue('MANUFACTURER_DISPLAY_FORM', Configuration::get('MANUFACTURER_DISPLAY_FORM')), - ); - } -} diff --git a/modules/blockmanufacturer/blockmanufacturer.tpl b/modules/blockmanufacturer/blockmanufacturer.tpl deleted file mode 100644 index a543b0b76..000000000 --- a/modules/blockmanufacturer/blockmanufacturer.tpl +++ /dev/null @@ -1,57 +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 -* @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 $display_link_manufacturer}{/if}{l s='Manufacturers' mod='blockmanufacturer'}{if $display_link_manufacturer}{/if}

-
-{if $manufacturers} - {if $text_list} -
    - {foreach from=$manufacturers item=manufacturer name=manufacturer_list} - {if $smarty.foreach.manufacturer_list.iteration <= $text_list_nb} -
  • {$manufacturer.name|escape:'html':'UTF-8'}
  • - {/if} - {/foreach} -
- {/if} - {if $form_list} -
-

- -

-
- {/if} -{else} -

{l s='No manufacturer' mod='blockmanufacturer'}

-{/if} -
-
- diff --git a/modules/blockmanufacturer/img/arrow_right_2.png b/modules/blockmanufacturer/img/arrow_right_2.png deleted file mode 100644 index 6b076ee2f5e75da5c803df37ffb226b2632f5ecc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 90 zcmeAS@N?(olHy`uVBq!ia0vp^EI`c80U}#-RHA{DqNj^vh(vg@!N33W8CfKI{yWb| nVC&#amH6*2+PJFm1rx)yAM&C;@m?Q*iWxjz{an^LB{Ts5aI6>z diff --git a/modules/blockmanufacturer/img/index.php b/modules/blockmanufacturer/img/index.php deleted file mode 100644 index e5064df41..000000000 --- a/modules/blockmanufacturer/img/index.php +++ /dev/null @@ -1,35 +0,0 @@ - -* @copyright 2007-2016 PrestaShop SA -* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) -* International Registered Trademark & Property of PrestaShop SA -*/ - -header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); -header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); - -header("Cache-Control: no-store, no-cache, must-revalidate"); -header("Cache-Control: post-check=0, pre-check=0", false); -header("Pragma: no-cache"); - -header("Location: ../"); -exit; \ No newline at end of file diff --git a/modules/blockmanufacturer/index.php b/modules/blockmanufacturer/index.php deleted file mode 100644 index e5064df41..000000000 --- a/modules/blockmanufacturer/index.php +++ /dev/null @@ -1,35 +0,0 @@ - -* @copyright 2007-2016 PrestaShop SA -* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) -* International Registered Trademark & Property of PrestaShop SA -*/ - -header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); -header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); - -header("Cache-Control: no-store, no-cache, must-revalidate"); -header("Cache-Control: post-check=0, pre-check=0", false); -header("Pragma: no-cache"); - -header("Location: ../"); -exit; \ No newline at end of file diff --git a/modules/blockmanufacturer/logo.gif b/modules/blockmanufacturer/logo.gif deleted file mode 100644 index 659aace81c639dac0e3905c1a6d792c94051c20a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 280 zcmZ?wbhEHb6krfwIKsf-=jV6k%$dD=_by$!w56rx-o1Op#l_E_J=?Nn%gmWGv$M00 z9zFX0{rhXzuBD}=O`be?_3G8%zkjc(sp;zKVju!2{$ycfXAor20jUMq$-p`_L8Z^< zvP|+Sw&RT*Jyk4@TSSg_^PH{_={e+-(Bu%&5%;9P*wWXeGa)470!wF0!bS%lUSu@dqsemBSV>Nkhb4}ekAst$vC6)liHVDgO^G)qMxcvBKz{=B yM3eS*CPuCqycNtWEHQnvganj1*w}c4+c)qr@Ea)!H}EOdXen{C1npO3um%7GB3L{C diff --git a/modules/blockmanufacturer/logo.png b/modules/blockmanufacturer/logo.png deleted file mode 100644 index debbc734a87c939b5fe0b99594d8b9fcbbc3bea7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1175 zcmV;I1Zew-P)9(E6vuz(-uvF0H&d+w4f0j|AejOcF={M9q!rN+(HM23!31H03t5r4X@VM}A;CoB zM_3RN6QXhBN+L0UU}!K%Bw~mLgE44|&}p&IcKSZAi#P3brY&^ia5pcxzyF={f9ITg z=RUF4aw~^4D2}`8=?y_@vxp*!9}XS#fY3C^K;ixVv$W4!$hFdChWbmiL7|Zboa<4< z_0f>)Va!mP%>k%J)!KdH8RmX;fLUAKz$-2rpKq7}8->^~$ewZ1cmv|Ni0frfqsQkP z)dK{Fzoz$>pSU(qVq|de7Gz+W`Gy(DJ-LzjAAe5E*6rlmmff@j>haF5SJ8T33g*O- z!yXV$ z0P3;M&P}N@dz*8vzopp9{JclUH2k$lov|uw)U> z&1oVybsTl3AHeHayY>~O&AvN)&)-~J%(}Z~arN{`(u)_S<^88mQvT~t05|yV8!nyu znQH@m1cU$97;slVwIOg6ym;S2o}YU=__qZ8CB!%&a&r!xDD^=CsRa?x8nkQrwq1-D7{F;69>kwJkIUzO zL;O5isZ43J6-!pFqjcmTw4k|vO*b=-m#5J5y^ld49rSpZe}4Q(I{>vn;F4MvgFGQWFwwqI>p zZ4^<6>(cx74i@a(gAKzPJ`>FtzqIR32u7zk2ci%W!C$(9bYwVtgYnZrq5M3=F@D<$ z((*_xpNU2(RK9?S!cNKnAaR6oUHs)Mvy|2?20=S6e*1%y`AjqwZX6ehg7Ml`4J0wz z%X9vb#n>pEv{;OTX}X>B54U3DXi5V&)F_2GF51sS6xC+H0un}OqiN~hjST{rSmR3l zN_%!Pr+asn!nz)~sYVpyc?^8G3yGq!O;T+_Nn(@|a>aJi@-SojBy%sQoR6dlx#Dut z(Q+-HiAD*^FQAk{>N7A_0_D26ZS7+_eA2(Uc0JssE2iKx(PUh?E)qvm^+1a8o9KPE z1LAn{T5WKeXVJT{1Cn^^_&3rBU<}4DAQMVcDS@D@#rSz_&aWIS_2#8|JlFG?XewMp zP)VHuB??azs?gM!j|2gw6p&&7JA~@l|J8xjX?I1n3eymzx6ex46$A2v43BN3_R(Jpa002ovPDHLkV1jI3JNf_s diff --git a/modules/blockmanufacturer/translations/index.php b/modules/blockmanufacturer/translations/index.php deleted file mode 100644 index e5064df41..000000000 --- a/modules/blockmanufacturer/translations/index.php +++ /dev/null @@ -1,35 +0,0 @@ - -* @copyright 2007-2016 PrestaShop SA -* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) -* International Registered Trademark & Property of PrestaShop SA -*/ - -header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); -header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); - -header("Cache-Control: no-store, no-cache, must-revalidate"); -header("Cache-Control: post-check=0, pre-check=0", false); -header("Pragma: no-cache"); - -header("Location: ../"); -exit; \ No newline at end of file diff --git a/modules/blocksupplier/CHANGELOG.txt b/modules/blocksupplier/CHANGELOG.txt deleted file mode 100644 index 1b0b14b0d..000000000 --- a/modules/blocksupplier/CHANGELOG.txt +++ /dev/null @@ -1,4 +0,0 @@ -2014-04-22 18:57:53 +0200 // Changelog updated -2014-03-24 11:43:29 +0100 / MO blocksupplier : ps_versions_compliancy modified (1.5.6.1 => 1.6) -2014-03-24 11:04:13 +0100 / MO blocksupplier : ps_versions_compliancy added -2014-03-20 14:26:54 +0100 Initial commit diff --git a/modules/blocksupplier/blocksupplier.php b/modules/blocksupplier/blocksupplier.php deleted file mode 100644 index 054a66819..000000000 --- a/modules/blocksupplier/blocksupplier.php +++ /dev/null @@ -1,240 +0,0 @@ - -* @copyright 2007-2016 PrestaShop SA -* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) -* International Registered Trademark & Property of PrestaShop SA -*/ - -if (!defined('_PS_VERSION_')) - exit; - -class BlockSupplier extends Module -{ - function __construct() - { - $this->name = 'blocksupplier'; - $this->tab = 'front_office_features'; - $this->version = '1.2.1'; - $this->author = 'PrestaShop'; - $this->need_instance = 0; - - $this->bootstrap = true; - parent::__construct(); - - $this->displayName = $this->l('Suppliers block'); - $this->description = $this->l('Adds a block displaying your product suppliers.'); - $this->ps_versions_compliancy = array('min' => '1.6', 'max' => '1.6.99.99'); - } - - function install() - { - if (!parent::install()) - return false; - if (!$this->registerHook('displayHeader') || - !$this->registerHook('actionObjectSupplierDeleteAfter') || - !$this->registerHook('actionObjectSupplierAddAfter') || - !$this->registerHook('actionObjectSupplierUpdateAfter') - ) - return false; - - $theme = new Theme(Context::getContext()->shop->id_theme); - if ((!$theme->default_right_column || !$this->registerHook('rightColumn')) - && (!$theme->default_left_column || !$this->registerHook('leftColumn')) - ) - { - parent::uninstall(); - - return false; - } - Configuration::updateValue('SUPPLIER_DISPLAY_TEXT', true); - Configuration::updateValue('SUPPLIER_DISPLAY_TEXT_NB', 5); - Configuration::updateValue('SUPPLIER_DISPLAY_FORM', false); - - return true; - } - - public function uninstall() - { - if (!parent::uninstall()) - return false; - - /* remove the configuration variable */ - $result = Configuration::deleteByName('SUPPLIER_DISPLAY_TEXT'); - $result &= Configuration::deleteByName('SUPPLIER_DISPLAY_TEXT_NB'); - $result &= Configuration::deleteByName('SUPPLIER_DISPLAY_FORM'); - - return $result; - } - - function hookDisplayLeftColumn($params) - { - $id_lang = (int)Context::getContext()->language->id; - if (!$this->isCached('blocksupplier.tpl', $this->getCacheId())) - $this->smarty->assign(array( - 'suppliers' => Supplier::getSuppliers(false, $id_lang), - 'link' => $this->context->link, - 'text_list' => Configuration::get('SUPPLIER_DISPLAY_TEXT'), - 'text_list_nb' => Configuration::get('SUPPLIER_DISPLAY_TEXT_NB'), - 'form_list' => Configuration::get('SUPPLIER_DISPLAY_FORM'), - 'display_link_supplier' => Configuration::get('PS_DISPLAY_SUPPLIERS') - )); - return $this->display(__FILE__, 'blocksupplier.tpl', $this->getCacheId()); - } - - function getContent() - { - $output = ''; - if (Tools::isSubmit('submitBlockSuppliers')) - { - $text_list = (int)(Tools::getValue('SUPPLIER_DISPLAY_TEXT')); - $text_nb = (int)(Tools::getValue('SUPPLIER_DISPLAY_TEXT_NB')); - $form_list = (int)(Tools::getValue('SUPPLIER_DISPLAY_FORM')); - if ($text_list AND !Validate::isUnsignedInt($text_nb)) - $errors[] = $this->l('Invalid number of elements.'); - elseif (!$text_list AND !$form_list) - $errors[] = $this->l('Please activate at least one type of list.'); - else - { - Configuration::updateValue('SUPPLIER_DISPLAY_TEXT', $text_list); - Configuration::updateValue('SUPPLIER_DISPLAY_TEXT_NB', $text_nb); - Configuration::updateValue('SUPPLIER_DISPLAY_FORM', $form_list); - $this->_clearCache('blocksupplier.tpl'); - } - if (isset($errors) AND sizeof($errors)) - $output .= $this->displayError(implode('
', $errors)); - else - $output .= $this->displayConfirmation($this->l('Settings updated.')); - } - return $output.$this->renderForm(); - } - - public function hookDisplayRightColumn($params) - { - return $this->hookDisplayLeftColumn($params); - } - - public function hookDisplayHeader($params) - { - $this->context->controller->addCSS(($this->_path).'blocksupplier.css', 'all'); - } - - public function hookActionObjectSupplierUpdateAfter($params) - { - $this->_clearCache('blocksupplier.tpl'); - } - - public function hookActionObjectSupplierAddAfter($params) - { - $this->_clearCache('blocksupplier.tpl'); - } - - public function hookActionObjectSupplierDeleteAfter($params) - { - $this->_clearCache('blocksupplier.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('Use a plain-text list'), - 'name' => 'SUPPLIER_DISPLAY_TEXT', - 'desc' => $this->l('Display suppliers in a plain-text list.'), - '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('Number of elements to display'), - 'name' => 'SUPPLIER_DISPLAY_TEXT_NB', - 'class' => 'fixed-width-xs' - ), - array( - 'type' => 'switch', - 'label' => $this->l('Use a drop-down list'), - 'name' => 'SUPPLIER_DISPLAY_FORM', - 'desc' => $this->l('Display suppliers in a drop-down list.'), - '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 = 'submitBlockSuppliers'; - $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( - 'SUPPLIER_DISPLAY_TEXT' => Tools::getValue('SUPPLIER_DISPLAY_TEXT', Configuration::get('SUPPLIER_DISPLAY_TEXT')), - 'SUPPLIER_DISPLAY_TEXT_NB' => Tools::getValue('SUPPLIER_DISPLAY_TEXT_NB', Configuration::get('SUPPLIER_DISPLAY_TEXT_NB')), - 'SUPPLIER_DISPLAY_FORM' => Tools::getValue('SUPPLIER_DISPLAY_FORM', Configuration::get('SUPPLIER_DISPLAY_FORM')), - ); - } -} diff --git a/modules/blocksupplier/blocksupplier.tpl b/modules/blocksupplier/blocksupplier.tpl deleted file mode 100644 index dbb8f891d..000000000 --- a/modules/blocksupplier/blocksupplier.tpl +++ /dev/null @@ -1,59 +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 -* @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 $display_link_supplier}{/if}{l s='Suppliers' mod='blocksupplier'}{if $display_link_supplier}{/if}

-
-{if $suppliers} - {if $text_list} - - {/if} - {if $form_list} -
-

- -

-
- {/if} -{else} -

{l s='No supplier' mod='blocksupplier'}

-{/if} -
-
- diff --git a/modules/blocksupplier/img/arrow_right_2.png b/modules/blocksupplier/img/arrow_right_2.png deleted file mode 100644 index 6b076ee2f5e75da5c803df37ffb226b2632f5ecc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 90 zcmeAS@N?(olHy`uVBq!ia0vp^EI`c80U}#-RHA{DqNj^vh(vg@!N33W8CfKI{yWb| nVC&#amH6*2+PJFm1rx)yAM&C;@m?Q*iWxjz{an^LB{Ts5aI6>z diff --git a/modules/blocksupplier/img/index.php b/modules/blocksupplier/img/index.php deleted file mode 100644 index e5064df41..000000000 --- a/modules/blocksupplier/img/index.php +++ /dev/null @@ -1,35 +0,0 @@ - -* @copyright 2007-2016 PrestaShop SA -* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) -* International Registered Trademark & Property of PrestaShop SA -*/ - -header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); -header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); - -header("Cache-Control: no-store, no-cache, must-revalidate"); -header("Cache-Control: post-check=0, pre-check=0", false); -header("Pragma: no-cache"); - -header("Location: ../"); -exit; \ No newline at end of file diff --git a/modules/blocksupplier/index.php b/modules/blocksupplier/index.php deleted file mode 100644 index e5064df41..000000000 --- a/modules/blocksupplier/index.php +++ /dev/null @@ -1,35 +0,0 @@ - -* @copyright 2007-2016 PrestaShop SA -* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) -* International Registered Trademark & Property of PrestaShop SA -*/ - -header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); -header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); - -header("Cache-Control: no-store, no-cache, must-revalidate"); -header("Cache-Control: post-check=0, pre-check=0", false); -header("Pragma: no-cache"); - -header("Location: ../"); -exit; \ No newline at end of file diff --git a/modules/blocksupplier/logo.gif b/modules/blocksupplier/logo.gif deleted file mode 100644 index e5cb1f263cafa5c94545520fd8d7dc129be0eef3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 266 zcmZ?wbhEHb6krfwIKsg29|+Ez`G02S|CvCPb_U1;@_A!vh=Dc=Ffg#T zD=74(WX@Ar$m6wI$7{(HuZ9~;N-7>9Lc10?Oq`t3BXodgsild8)KZrw$FxD{ z>8e;!db{?o1Tw%-r2uJT9I2TL$bR)Y7z;Aa%BTYuGi}8VJSkGwdiH~wD!ajG%s<@} z7#@1z#I_|L1FjrEtO%}{13xGMFkTlFT#O5ISP`UZ@`lw9d7v?>pjz5$WY!!$r|$xv z0{LrnnYD5~s8j|ZO1^&>V};l$^QKp^^P9^wOwSNIFaq7#VLF=Yh>%oaNBhRp zZ#I53;z9|)2*z~OGu8Ab$?2x5e)ltB?h zBzYahVJO&1e3eTpB1k#()#g;Tcc_XM9p=z5! zj|0$o^f+hFUu6FL1-Ox6Rn8!SZ-x9omMN1baq`qj=GN8o*wSSHbafu(LU%U}4Gky) z#^Q{n`T0#L54a9wfBX3yA`TD>Tu90=b|Cib-nHuG zS6)4IwQqp6iyon^Z4Ur1Zr;Mt<0rUysTWn3q(T6yJs<@7_wIgsapH#G)U>WWpU>m_ z0RZ`Y9*v5$wd`yJiZ{vPA3(0PW!Do;P3t;xW%^t`PaH+Gw!BlW?;p)T;=)hBWngj` zhL^gIb5V`~vjdq6D|4ms@O71q8`;2;|1`@c&BxKYkV8 g`8B%(Fwp>i0%66;cqiK-9{>OV07*qoM6N<$f^wt};Q#;t diff --git a/modules/blocksupplier/translations/index.php b/modules/blocksupplier/translations/index.php deleted file mode 100644 index e5064df41..000000000 --- a/modules/blocksupplier/translations/index.php +++ /dev/null @@ -1,35 +0,0 @@ - -* @copyright 2007-2016 PrestaShop SA -* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) -* International Registered Trademark & Property of PrestaShop SA -*/ - -header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); -header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); - -header("Cache-Control: no-store, no-cache, must-revalidate"); -header("Cache-Control: post-check=0, pre-check=0", false); -header("Pragma: no-cache"); - -header("Location: ../"); -exit; \ No newline at end of file diff --git a/themes/hotel-reservation-theme/modules/blockmanufacturer/blockmanufacturer.tpl b/themes/hotel-reservation-theme/modules/blockmanufacturer/blockmanufacturer.tpl deleted file mode 100644 index c667023d9..000000000 --- a/themes/hotel-reservation-theme/modules/blockmanufacturer/blockmanufacturer.tpl +++ /dev/null @@ -1,70 +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 -* @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 $display_link_manufacturer} - - {/if} - {l s='Manufacturers' mod='blockmanufacturer'} - {if $display_link_manufacturer} - - {/if} -

-
- {if $manufacturers} - {if $text_list} - - {/if} - {if $form_list} -
-
- -
-
- {/if} - {else} -

{l s='No manufacturer' mod='blockmanufacturer'}

- {/if} -
-
- diff --git a/themes/hotel-reservation-theme/modules/blockmanufacturer/index.php b/themes/hotel-reservation-theme/modules/blockmanufacturer/index.php deleted file mode 100644 index 9a99a8662..000000000 --- a/themes/hotel-reservation-theme/modules/blockmanufacturer/index.php +++ /dev/null @@ -1,35 +0,0 @@ - -* @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; diff --git a/themes/hotel-reservation-theme/modules/blocksupplier/blocksupplier.tpl b/themes/hotel-reservation-theme/modules/blocksupplier/blocksupplier.tpl deleted file mode 100644 index 5cfccc65d..000000000 --- a/themes/hotel-reservation-theme/modules/blocksupplier/blocksupplier.tpl +++ /dev/null @@ -1,75 +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 -* @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 $display_link_supplier} - - {/if} - {l s='Suppliers' mod='blocksupplier'} - {if $display_link_supplier} - - {/if} -

-
- {if $suppliers} - {if $text_list} - - {/if} - {if $form_list} -
-
- -
-
- {/if} - {else} -

{l s='No supplier' mod='blocksupplier'}

- {/if} -
-
- diff --git a/themes/hotel-reservation-theme/modules/blocksupplier/index.php b/themes/hotel-reservation-theme/modules/blocksupplier/index.php deleted file mode 100644 index 9a99a8662..000000000 --- a/themes/hotel-reservation-theme/modules/blocksupplier/index.php +++ /dev/null @@ -1,35 +0,0 @@ - -* @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; diff --git a/themes/hotel-reservation-theme/sitemap.tpl b/themes/hotel-reservation-theme/sitemap.tpl index aa060ebef..7987292bb 100644 --- a/themes/hotel-reservation-theme/sitemap.tpl +++ b/themes/hotel-reservation-theme/sitemap.tpl @@ -58,24 +58,6 @@ {/if} - {if $display_manufacturer_link OR $PS_DISPLAY_SUPPLIERS} -
  • - - {l s='Manufacturers'} - -
  • - {/if} - {if $display_supplier_link OR $PS_DISPLAY_SUPPLIERS} -
  • - - {l s='Suppliers'} - -
  • - {/if}