From bba9fe1202b65a99e9119305eeb359bc97efa3eb Mon Sep 17 00:00:00 2001 From: Abhishek Kumar Date: Tue, 26 Apr 2022 19:59:50 +0530 Subject: [PATCH] Remove blockcategories --- config/xml/themes/default.xml | 1 - controllers/admin/AdminThemesController.php | 1 - controllers/front/ProductController.php | 2 +- install/data/theme.sql | 4 - modules/blockcategories/CHANGELOG.txt | 17 - modules/blockcategories/blockcategories.php | 518 ------------------ modules/blockcategories/blockcategories.tpl | 49 -- .../blockcategories_footer.tpl | 55 -- .../blockcategories/category-tree-branch.tpl | 40 -- .../admin/AdminBlockCategoriesController.php | 119 ---- .../controllers/admin/index.php | 35 -- modules/blockcategories/controllers/index.php | 35 -- modules/blockcategories/img/arrow_right_2.png | Bin 90 -> 0 bytes modules/blockcategories/img/icon/index.php | 35 -- .../blockcategories/img/icon/open-close.png | Bin 103 -> 0 bytes modules/blockcategories/img/index.php | 35 -- modules/blockcategories/index.php | 35 -- modules/blockcategories/logo.gif | Bin 649 -> 0 bytes modules/blockcategories/logo.png | Bin 1009 -> 0 bytes modules/blockcategories/sort_alphabet.png | Bin 368 -> 0 bytes modules/blockcategories/sort_number.png | Bin 258 -> 0 bytes .../blockcategories/translations/index.php | 35 -- .../blockcategories/upgrade/install-2.1.php | 9 - .../blockcategories/upgrade/install-2.9.1.php | 25 - .../views/blockcategories_admin.tpl | 37 -- themes/hotel-reservation-theme/css/global.css | 5 - .../blockcategories/blockcategories.css | 91 --- .../css/modules/blockcategories/index.php | 35 -- .../blockcategories/blockcategories.tpl | 48 -- .../blockcategories_footer.tpl | 53 -- .../blockcategories/category-tree-branch.tpl | 42 -- .../modules/blockcategories/index.php | 35 -- 32 files changed, 1 insertion(+), 1395 deletions(-) delete mode 100644 modules/blockcategories/CHANGELOG.txt delete mode 100644 modules/blockcategories/blockcategories.php delete mode 100644 modules/blockcategories/blockcategories.tpl delete mode 100644 modules/blockcategories/blockcategories_footer.tpl delete mode 100644 modules/blockcategories/category-tree-branch.tpl delete mode 100644 modules/blockcategories/controllers/admin/AdminBlockCategoriesController.php delete mode 100644 modules/blockcategories/controllers/admin/index.php delete mode 100644 modules/blockcategories/controllers/index.php delete mode 100644 modules/blockcategories/img/arrow_right_2.png delete mode 100644 modules/blockcategories/img/icon/index.php delete mode 100644 modules/blockcategories/img/icon/open-close.png delete mode 100644 modules/blockcategories/img/index.php delete mode 100644 modules/blockcategories/index.php delete mode 100644 modules/blockcategories/logo.gif delete mode 100644 modules/blockcategories/logo.png delete mode 100644 modules/blockcategories/sort_alphabet.png delete mode 100644 modules/blockcategories/sort_number.png delete mode 100644 modules/blockcategories/translations/index.php delete mode 100644 modules/blockcategories/upgrade/install-2.1.php delete mode 100644 modules/blockcategories/upgrade/install-2.9.1.php delete mode 100644 modules/blockcategories/views/blockcategories_admin.tpl delete mode 100644 themes/hotel-reservation-theme/css/modules/blockcategories/blockcategories.css delete mode 100644 themes/hotel-reservation-theme/css/modules/blockcategories/index.php delete mode 100644 themes/hotel-reservation-theme/modules/blockcategories/blockcategories.tpl delete mode 100644 themes/hotel-reservation-theme/modules/blockcategories/blockcategories_footer.tpl delete mode 100644 themes/hotel-reservation-theme/modules/blockcategories/category-tree-branch.tpl delete mode 100644 themes/hotel-reservation-theme/modules/blockcategories/index.php diff --git a/config/xml/themes/default.xml b/config/xml/themes/default.xml index 06313b2b6..2a9cea57b 100644 --- a/config/xml/themes/default.xml +++ b/config/xml/themes/default.xml @@ -62,7 +62,6 @@ - diff --git a/controllers/admin/AdminThemesController.php b/controllers/admin/AdminThemesController.php index 1c64b6c48..919d60876 100644 --- a/controllers/admin/AdminThemesController.php +++ b/controllers/admin/AdminThemesController.php @@ -2087,7 +2087,6 @@ class AdminThemesControllerCore extends AdminController 'bankwire', 'blockadvertising', 'blockcart', - 'blockcategories', 'blockcmsinfo', 'blockcurrencies', 'blockcustomerprivacy', diff --git a/controllers/front/ProductController.php b/controllers/front/ProductController.php index 2d85e00c0..638634c6d 100644 --- a/controllers/front/ProductController.php +++ b/controllers/front/ProductController.php @@ -158,7 +158,7 @@ class ProductControllerCore extends FrontController $id_category = (int)$this->product->id_category_default; } $this->category = new Category((int)$id_category, (int)$this->context->cookie->id_lang); - if (isset($this->context->cookie) && isset($this->category->id_category) && !(Module::isInstalled('blockcategories') && Module::isEnabled('blockcategories'))) { + if (isset($this->context->cookie) && isset($this->category->id_category)) { $this->context->cookie->last_visited_category = (int)$this->category->id_category; } } diff --git a/install/data/theme.sql b/install/data/theme.sql index 72bcd6d2d..52f02f71a 100644 --- a/install/data/theme.sql +++ b/install/data/theme.sql @@ -144,10 +144,6 @@ UPDATE `PREFIX_hook_module` SET position = 2 WHERE id_module = (SELECT id_module FROM `PREFIX_module` WHERE name = 'blocksocial') AND id_hook = @id_hook; -UPDATE `PREFIX_hook_module` SET position = 3 -WHERE id_module = (SELECT id_module FROM `PREFIX_module` WHERE name = 'blockcategories') -AND id_hook = @id_hook; - UPDATE `PREFIX_hook_module` SET position = 5 WHERE id_module = (SELECT id_module FROM `PREFIX_module` WHERE name = 'blockmyaccountfooter') AND id_hook = @id_hook; diff --git a/modules/blockcategories/CHANGELOG.txt b/modules/blockcategories/CHANGELOG.txt deleted file mode 100644 index 1182ca7b2..000000000 --- a/modules/blockcategories/CHANGELOG.txt +++ /dev/null @@ -1,17 +0,0 @@ ------------------------------ -# V2.9.4 to V2.9.5 ------------------------------ - -## Improved/Changed Features: - -* [CO] : [#244] Changed Tools::jsonEncode to json_encode - - -2014-04-22 18:56:57 +0200 // Changelog updated -2014-04-01 14:17:21 +0200 // blockcategories new module version -2014-03-27 11:46:01 +0100 // follow up #PSCSX-1405 again -2014-03-27 11:18:52 +0100 // follow up #PSCSX-1405 -2014-03-26 17:37:53 +0100 [-] MO : Blockcategories, Fix bug #PSCSX-1405, could not assign current category -2014-03-24 11:43:28 +0100 / MO blockcategories : ps_versions_compliancy modified (1.5.6.1 => 1.6) -2014-03-24 11:01:30 +0100 / MO blockcategories : ps_versions_compliancy added -2014-03-20 14:20:45 +0100 Initial commit diff --git a/modules/blockcategories/blockcategories.php b/modules/blockcategories/blockcategories.php deleted file mode 100644 index 9b0a0b51b..000000000 --- a/modules/blockcategories/blockcategories.php +++ /dev/null @@ -1,518 +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 BlockCategories extends Module -{ - public function __construct() - { - $this->name = 'blockcategories'; - $this->tab = 'front_office_features'; - $this->version = '2.9.5'; - $this->author = 'PrestaShop'; - - $this->bootstrap = true; - parent::__construct(); - - $this->displayName = $this->l('Categories block'); - $this->description = $this->l('Adds a block featuring product categories.'); - $this->ps_versions_compliancy = array('min' => '1.6', 'max' => '1.6.99.99'); - } - - public function install() - { - // Prepare tab - $tab = new Tab(); - $tab->active = 1; - $tab->class_name = 'AdminBlockCategories'; - $tab->name = array(); - foreach (Language::getLanguages(true) as $lang) - $tab->name[$lang['id_lang']] = 'BlockCategories'; - $tab->id_parent = -1; - $tab->module = $this->name; - - if (!$tab->add() || - !parent::install() || - !$this->registerHook('footer') || - !$this->registerHook('header') || - !$this->registerHook('leftColumn') || - // Temporary hooks. Do NOT hook any module on it. Some CRUD hook will replace them as soon as possible. - !$this->registerHook('categoryAddition') || - !$this->registerHook('categoryUpdate') || - !$this->registerHook('categoryDeletion') || - !$this->registerHook('actionAdminMetaControllerUpdate_optionsBefore') || - !$this->registerHook('actionAdminLanguagesControllerStatusBefore') || - !$this->registerHook('displayBackOfficeCategory') || - !Configuration::updateValue('BLOCK_CATEG_MAX_DEPTH', 4) || - !Configuration::updateValue('BLOCK_CATEG_DHTML', 1) || - !Configuration::updateValue('BLOCK_CATEG_ROOT_CATEGORY', 1)) - return false; - - return true; - } - - public function uninstall() - { - $id_tab = (int)Tab::getIdFromClassName('AdminBlockCategories'); - - if ($id_tab) - { - $tab = new Tab($id_tab); - $tab->delete(); - } - - if (!parent::uninstall() || - !Configuration::deleteByName('BLOCK_CATEG_MAX_DEPTH') || - !Configuration::deleteByName('BLOCK_CATEG_DHTML') || - !Configuration::deleteByName('BLOCK_CATEG_ROOT_CATEGORY')) - return false; - return true; - } - - public function getContent() - { - $output = ''; - if (Tools::isSubmit('submitBlockCategories')) - { - $maxDepth = (int)(Tools::getValue('BLOCK_CATEG_MAX_DEPTH')); - $dhtml = Tools::getValue('BLOCK_CATEG_DHTML'); - $nbrColumns = Tools::getValue('BLOCK_CATEG_NBR_COLUMN_FOOTER', 4); - if ($maxDepth < 0) - $output .= $this->displayError($this->l('Maximum depth: Invalid number.')); - elseif ($dhtml != 0 && $dhtml != 1) - $output .= $this->displayError($this->l('Dynamic HTML: Invalid choice.')); - else - { - Configuration::updateValue('BLOCK_CATEG_MAX_DEPTH', (int)$maxDepth); - Configuration::updateValue('BLOCK_CATEG_DHTML', (int)$dhtml); - Configuration::updateValue('BLOCK_CATEG_NBR_COLUMN_FOOTER', (int)$nbrColumns); - Configuration::updateValue('BLOCK_CATEG_SORT_WAY', Tools::getValue('BLOCK_CATEG_SORT_WAY')); - Configuration::updateValue('BLOCK_CATEG_SORT', Tools::getValue('BLOCK_CATEG_SORT')); - Configuration::updateValue('BLOCK_CATEG_ROOT_CATEGORY', Tools::getValue('BLOCK_CATEG_ROOT_CATEGORY')); - - $this->_clearBlockcategoriesCache(); - - Tools::redirectAdmin(AdminController::$currentIndex.'&configure='.$this->name.'&token='.Tools::getAdminTokenLite('AdminModules').'&conf=6'); - } - } - return $output.$this->renderForm(); - } - - public function getTree($resultParents, $resultIds, $maxDepth, $id_category = null, $currentDepth = 0) - { - if (is_null($id_category)) - $id_category = $this->context->shop->getCategory(); - $children = array(); - if (isset($resultParents[$id_category]) && count($resultParents[$id_category]) && ($maxDepth == 0 || $currentDepth < $maxDepth)) - foreach ($resultParents[$id_category] as $subcat) - $children[] = $this->getTree($resultParents, $resultIds, $maxDepth, $subcat['id_category'], $currentDepth + 1); - if (isset($resultIds[$id_category])) - { - $link = $this->context->link->getCategoryLink($id_category, $resultIds[$id_category]['link_rewrite']); - $name = $resultIds[$id_category]['name']; - $desc = $resultIds[$id_category]['description']; - } - else - $link = $name = $desc = ''; - - $return = array( - 'id' => $id_category, - 'link' => $link, - 'name' => $name, - 'desc'=> $desc, - 'children' => $children - ); - return $return; - } - - public function hookDisplayBackOfficeCategory($params) - { - $category = new Category((int)Tools::getValue('id_category')); - $files = array(); - - if ($category->level_depth < 1) - return; - - for ($i = 0; $i < 3; $i++) - { - if (file_exists(_PS_CAT_IMG_DIR_.(int)$category->id.'-'.$i.'_thumb.jpg')) - { - $files[$i]['type'] = HelperImageUploader::TYPE_IMAGE; - $files[$i]['image'] = ImageManager::thumbnail(_PS_CAT_IMG_DIR_.(int)$category->id.'-'.$i.'_thumb.jpg', $this->context->controller->table.'_'.(int)$category->id.'-'.$i.'_thumb.jpg', 100, 'jpg', true, true); - $files[$i]['delete_url'] = Context::getContext()->link->getAdminLink('AdminBlockCategories').'&deleteThumb='.$i.'&id_category='.(int)$category->id; - } - } - - $images_types = ImageType::getImagesTypes('categories'); - $formated_medium = ImageType::getFormatedName('medium'); - foreach ($images_types as $k => $image_type) - if ($formated_medium == $image_type['name']) - $this->smarty->assign('format', $image_type); - - $helper = new HelperImageUploader(); - $helper->setMultiple(true)->setUseAjax(true)->setName('thumbnail')->setFiles($files)->setMaxFiles(3)->setUrl( - Context::getContext()->link->getAdminLink('AdminBlockCategories').'&ajax=1&id_category='.$category->id - .'&action=uploadThumbnailImages'); - $this->smarty->assign('helper', $helper->render()); - return $this->display(__FILE__, 'views/blockcategories_admin.tpl'); - } - - public function hookLeftColumn($params) - { - $this->setLastVisitedCategory(); - $phpself = $this->context->controller->php_self; - $current_allowed_controllers = array('category'); - - if ($phpself != null && in_array($phpself, $current_allowed_controllers) && Configuration::get('BLOCK_CATEG_ROOT_CATEGORY') && isset($this->context->cookie->last_visited_category) && $this->context->cookie->last_visited_category) - { - $category = new Category($this->context->cookie->last_visited_category, $this->context->language->id); - if (Configuration::get('BLOCK_CATEG_ROOT_CATEGORY') == 2 && !$category->is_root_category && $category->id_parent) - $category = new Category($category->id_parent, $this->context->language->id); - elseif (Configuration::get('BLOCK_CATEG_ROOT_CATEGORY') == 3 && !$category->is_root_category && !$category->getSubCategories($category->id, true)) - $category = new Category($category->id_parent, $this->context->language->id); - } - else - $category = new Category((int)Configuration::get('PS_HOME_CATEGORY'), $this->context->language->id); - - $cacheId = $this->getCacheId($category ? $category->id : null); - - if (!$this->isCached('blockcategories.tpl', $cacheId)) - { - $range = ''; - $maxdepth = Configuration::get('BLOCK_CATEG_MAX_DEPTH'); - if (Validate::isLoadedObject($category)) - { - if ($maxdepth > 0) - $maxdepth += $category->level_depth; - $range = 'AND nleft >= '.(int)$category->nleft.' AND nright <= '.(int)$category->nright; - } - - $resultIds = array(); - $resultParents = array(); - $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' - SELECT c.id_parent, c.id_category, cl.name, cl.description, cl.link_rewrite - FROM `'._DB_PREFIX_.'category` c - INNER JOIN `'._DB_PREFIX_.'category_lang` cl ON (c.`id_category` = cl.`id_category` AND cl.`id_lang` = '.(int)$this->context->language->id.Shop::addSqlRestrictionOnLang('cl').') - INNER JOIN `'._DB_PREFIX_.'category_shop` cs ON (cs.`id_category` = c.`id_category` AND cs.`id_shop` = '.(int)$this->context->shop->id.') - WHERE (c.`active` = 1 OR c.`id_category` = '.(int)Configuration::get('PS_HOME_CATEGORY').') - AND c.`id_category` != '.(int)Configuration::get('PS_ROOT_CATEGORY').' - '.((int)$maxdepth != 0 ? ' AND `level_depth` <= '.(int)$maxdepth : '').' - '.$range.' - AND c.id_category IN ( - SELECT id_category - FROM `'._DB_PREFIX_.'category_group` - WHERE `id_group` IN ('.pSQL(implode(', ', Customer::getGroupsStatic((int)$this->context->customer->id))).') - ) - ORDER BY `level_depth` ASC, '.(Configuration::get('BLOCK_CATEG_SORT') ? 'cl.`name`' : 'cs.`position`').' '.(Configuration::get('BLOCK_CATEG_SORT_WAY') ? 'DESC' : 'ASC')); - foreach ($result as &$row) - { - $resultParents[$row['id_parent']][] = &$row; - $resultIds[$row['id_category']] = &$row; - } - - $blockCategTree = $this->getTree($resultParents, $resultIds, $maxdepth, ($category ? $category->id : null)); - $this->smarty->assign('blockCategTree', $blockCategTree); - - if ((Tools::getValue('id_product') || Tools::getValue('id_category')) && isset($this->context->cookie->last_visited_category) && $this->context->cookie->last_visited_category) - { - $category = new Category($this->context->cookie->last_visited_category, $this->context->language->id); - if (Validate::isLoadedObject($category)) - $this->smarty->assign(array('currentCategory' => $category, 'currentCategoryId' => $category->id)); - } - - $this->smarty->assign('isDhtml', Configuration::get('BLOCK_CATEG_DHTML')); - if (file_exists(_PS_THEME_DIR_.'modules/blockcategories/blockcategories.tpl')) - $this->smarty->assign('branche_tpl_path', _PS_THEME_DIR_.'modules/blockcategories/category-tree-branch.tpl'); - else - $this->smarty->assign('branche_tpl_path', _PS_MODULE_DIR_.'blockcategories/category-tree-branch.tpl'); - } - return $this->display(__FILE__, 'blockcategories.tpl', $cacheId); - } - - protected function getCacheId($name = null) - { - $cache_id = parent::getCacheId(); - - if ($name !== null) - $cache_id .= '|'.$name; - - if ((Tools::getValue('id_product') || Tools::getValue('id_category')) && isset($this->context->cookie->last_visited_category) && $this->context->cookie->last_visited_category) - $cache_id .= '|'.(int)$this->context->cookie->last_visited_category; - - return $cache_id.'|'.implode('-', Customer::getGroupsStatic($this->context->customer->id)); - } - - public function setLastVisitedCategory() - { - $cache_id = 'blockcategories::setLastVisitedCategory'; - if (!Cache::isStored($cache_id)) - { - if (method_exists($this->context->controller, 'getCategory') && ($category = $this->context->controller->getCategory())) - $this->context->cookie->last_visited_category = $category->id; - elseif (method_exists($this->context->controller, 'getProduct') && ($product = $this->context->controller->getProduct())) - if (!isset($this->context->cookie->last_visited_category) - || !Product::idIsOnCategoryId($product->id, array(array('id_category' => $this->context->cookie->last_visited_category))) - || !Category::inShopStatic($this->context->cookie->last_visited_category, $this->context->shop)) - $this->context->cookie->last_visited_category = (int)$product->id_category_default; - Cache::store($cache_id, $this->context->cookie->last_visited_category); - } - return Cache::retrieve($cache_id); - } - - public function hookFooter($params) - { - $this->setLastVisitedCategory(); - if (!$this->isCached('blockcategories_footer.tpl', $this->getCacheId())) - { - $maxdepth = Configuration::get('BLOCK_CATEG_MAX_DEPTH'); - // Get all groups for this customer and concatenate them as a string: "1,2,3..." - $groups = implode(', ', Customer::getGroupsStatic((int)$this->context->customer->id)); - if (!$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' - SELECT DISTINCT c.id_parent, c.id_category, cl.name, cl.description, cl.link_rewrite - FROM `'._DB_PREFIX_.'category` c - '.Shop::addSqlAssociation('category', 'c').' - LEFT JOIN `'._DB_PREFIX_.'category_lang` cl ON (c.`id_category` = cl.`id_category` AND cl.`id_lang` = '.(int)$this->context->language->id.Shop::addSqlRestrictionOnLang('cl').') - LEFT JOIN `'._DB_PREFIX_.'category_group` cg ON (cg.`id_category` = c.`id_category`) - WHERE (c.`active` = 1 OR c.`id_category` = '.(int)Configuration::get('PS_ROOT_CATEGORY').') - '.((int)($maxdepth) != 0 ? ' AND `level_depth` <= '.(int)($maxdepth) : '').' - AND cg.`id_group` IN ('.pSQL($groups).') - ORDER BY `level_depth` ASC, '.(Configuration::get('BLOCK_CATEG_SORT') ? 'cl.`name`' : 'category_shop.`position`').' '.(Configuration::get('BLOCK_CATEG_SORT_WAY') ? 'DESC' : 'ASC'))) - return; - $resultParents = array(); - $resultIds = array(); - - foreach ($result as &$row) - { - $resultParents[$row['id_parent']][] = &$row; - $resultIds[$row['id_category']] = &$row; - } - //$nbrColumns = Configuration::get('BLOCK_CATEG_NBR_COLUMNS_FOOTER'); - $nbrColumns = (int)Configuration::get('BLOCK_CATEG_NBR_COLUMN_FOOTER'); - if (!$nbrColumns or empty($nbrColumns)) - $nbrColumns = 3; - $numberColumn = abs(count($result) / $nbrColumns); - $widthColumn = floor(100 / $nbrColumns); - $this->smarty->assign('numberColumn', $numberColumn); - $this->smarty->assign('widthColumn', $widthColumn); - - $blockCategTree = $this->getTree($resultParents, $resultIds, Configuration::get('BLOCK_CATEG_MAX_DEPTH')); - unset($resultParents, $resultIds); - - $isDhtml = (Configuration::get('BLOCK_CATEG_DHTML') == 1 ? true : false); - - $id_category = (int)Tools::getValue('id_category'); - $id_product = (int)Tools::getValue('id_product'); - - $this->smarty->assign('blockCategTree', $blockCategTree); - - if (file_exists(_PS_THEME_DIR_.'modules/blockcategories/blockcategories_footer.tpl')) - $this->smarty->assign('branche_tpl_path', _PS_THEME_DIR_.'modules/blockcategories/category-tree-branch.tpl'); - else - $this->smarty->assign('branche_tpl_path', _PS_MODULE_DIR_.'blockcategories/category-tree-branch.tpl'); - $this->smarty->assign('isDhtml', $isDhtml); - } - $display = $this->display(__FILE__, 'blockcategories_footer.tpl', $this->getCacheId()); - - return $display; - } - - public function hookRightColumn($params) - { - return $this->hookLeftColumn($params); - } - - public function hookHeader() - { - $this->context->controller->addJS(_THEME_JS_DIR_.'tools/treeManagement.js'); - $this->context->controller->addCSS(($this->_path).'blockcategories.css', 'all'); - } - - private function _clearBlockcategoriesCache() - { - $this->_clearCache('blockcategories.tpl'); - $this->_clearCache('blockcategories_footer.tpl'); - } - - public function hookCategoryAddition($params) - { - $this->_clearBlockcategoriesCache(); - } - - public function hookCategoryUpdate($params) - { - $this->_clearBlockcategoriesCache(); - } - - public function hookCategoryDeletion($params) - { - $this->_clearBlockcategoriesCache(); - } - - public function hookActionAdminMetaControllerUpdate_optionsBefore($params) - { - $this->_clearBlockcategoriesCache(); - } - - public function renderForm() - { - $fields_form = array( - 'form' => array( - 'legend' => array( - 'title' => $this->l('Settings'), - 'icon' => 'icon-cogs' - ), - 'input' => array( - array( - 'type' => 'radio', - 'label' => $this->l('Category root'), - 'name' => 'BLOCK_CATEG_ROOT_CATEGORY', - 'hint' => $this->l('Select which category is displayed in the block. The current category is the one the visitor is currently browsing.'), - 'values' => array( - array( - 'id' => 'home', - 'value' => 0, - 'label' => $this->l('Home category') - ), - array( - 'id' => 'current', - 'value' => 1, - 'label' => $this->l('Current category') - ), - array( - 'id' => 'parent', - 'value' => 2, - 'label' => $this->l('Parent category') - ), - array( - 'id' => 'current_parent', - 'value' => 3, - 'label' => $this->l('Current category, unless it has no subcategories, in which case the parent category of the current category is used') - ), - ) - ), - array( - 'type' => 'text', - 'label' => $this->l('Maximum depth'), - 'name' => 'BLOCK_CATEG_MAX_DEPTH', - 'desc' => $this->l('Set the maximum depth of category sublevels displayed in this block (0 = infinite).'), - ), - array( - 'type' => 'switch', - 'label' => $this->l('Dynamic'), - 'name' => 'BLOCK_CATEG_DHTML', - 'desc' => $this->l('Activate dynamic (animated) mode for category sublevels.'), - 'values' => array( - array( - 'id' => 'active_on', - 'value' => 1, - 'label' => $this->l('Enabled') - ), - array( - 'id' => 'active_off', - 'value' => 0, - 'label' => $this->l('Disabled') - ) - ), - ), - array( - 'type' => 'radio', - 'label' => $this->l('Sort'), - 'name' => 'BLOCK_CATEG_SORT', - 'values' => array( - array( - 'id' => 'name', - 'value' => 1, - 'label' => $this->l('By name') - ), - array( - 'id' => 'position', - 'value' => 0, - 'label' => $this->l('By position') - ), - ) - ), - array( - 'type' => 'radio', - 'label' => $this->l('Sort order'), - 'name' => 'BLOCK_CATEG_SORT_WAY', - 'values' => array( - array( - 'id' => 'name', - 'value' => 1, - 'label' => $this->l('Descending') - ), - array( - 'id' => 'position', - 'value' => 0, - 'label' => $this->l('Ascending') - ), - ) - ), - array( - 'type' => 'text', - 'label' => $this->l('How many footer columns would you like?'), - 'name' => 'BLOCK_CATEG_NBR_COLUMN_FOOTER', - ), - ), - '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 = 'submitBlockCategories'; - $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( - 'BLOCK_CATEG_MAX_DEPTH' => Tools::getValue('BLOCK_CATEG_MAX_DEPTH', Configuration::get('BLOCK_CATEG_MAX_DEPTH')), - 'BLOCK_CATEG_DHTML' => Tools::getValue('BLOCK_CATEG_DHTML', Configuration::get('BLOCK_CATEG_DHTML')), - 'BLOCK_CATEG_NBR_COLUMN_FOOTER' => Tools::getValue('BLOCK_CATEG_NBR_COLUMN_FOOTER', Configuration::get('BLOCK_CATEG_NBR_COLUMN_FOOTER')), - 'BLOCK_CATEG_SORT_WAY' => Tools::getValue('BLOCK_CATEG_SORT_WAY', Configuration::get('BLOCK_CATEG_SORT_WAY')), - 'BLOCK_CATEG_SORT' => Tools::getValue('BLOCK_CATEG_SORT', Configuration::get('BLOCK_CATEG_SORT')), - 'BLOCK_CATEG_ROOT_CATEGORY' => Tools::getValue('BLOCK_CATEG_ROOT_CATEGORY', Configuration::get('BLOCK_CATEG_ROOT_CATEGORY')) - ); - } -} diff --git a/modules/blockcategories/blockcategories.tpl b/modules/blockcategories/blockcategories.tpl deleted file mode 100644 index bf2dd27b7..000000000 --- a/modules/blockcategories/blockcategories.tpl +++ /dev/null @@ -1,49 +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 $blockCategTree && $blockCategTree.children|@count} - -
-

{if isset($currentCategory)}{$currentCategory->name|escape}{else}{l s='Categories' mod='blockcategories'}{/if}

-
-
    - {foreach from=$blockCategTree.children item=child name=blockCategTree} - {if $smarty.foreach.blockCategTree.last} - {include file="$branche_tpl_path" node=$child last='true'} - {else} - {include file="$branche_tpl_path" node=$child} - {/if} - {/foreach} -
- {* Javascript moved here to fix bug #PSCFI-151 *} - -
-
- -{/if} diff --git a/modules/blockcategories/blockcategories_footer.tpl b/modules/blockcategories/blockcategories_footer.tpl deleted file mode 100644 index 862b18d0a..000000000 --- a/modules/blockcategories/blockcategories_footer.tpl +++ /dev/null @@ -1,55 +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 -*} - - diff --git a/modules/blockcategories/category-tree-branch.tpl b/modules/blockcategories/category-tree-branch.tpl deleted file mode 100644 index 5e92b6576..000000000 --- a/modules/blockcategories/category-tree-branch.tpl +++ /dev/null @@ -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 -* @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 -*} - -
  • - {$node.name|escape:'html':'UTF-8'} - {if $node.children|@count > 0} -
      - {foreach from=$node.children item=child name=categoryTreeBranch} - {if $smarty.foreach.categoryTreeBranch.last} - {include file="$branche_tpl_path" node=$child last='true'} - {else} - {include file="$branche_tpl_path" node=$child last='false'} - {/if} - {/foreach} -
    - {/if} -
  • diff --git a/modules/blockcategories/controllers/admin/AdminBlockCategoriesController.php b/modules/blockcategories/controllers/admin/AdminBlockCategoriesController.php deleted file mode 100644 index 4a95beb6a..000000000 --- a/modules/blockcategories/controllers/admin/AdminBlockCategoriesController.php +++ /dev/null @@ -1,119 +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 -*/ - -/** - * @since 1.6.0 - */ -class AdminBlockCategoriesController extends ModuleAdminController -{ - public function postProcess() - { - if (($id_thumb = Tools::getValue('deleteThumb', false)) !== false) - { - if (file_exists(_PS_CAT_IMG_DIR_.(int)Tools::getValue('id_category').'-'.(int)$id_thumb.'_thumb.jpg') - && !unlink(_PS_CAT_IMG_DIR_.(int)Tools::getValue('id_category').'-'.(int)$id_thumb.'_thumb.jpg')) - $this->context->controller->errors[] = Tools::displayError('Error while delete'); - - if (empty($this->context->controller->errors)) - Tools::clearSmartyCache(); - - Tools::redirectAdmin(Context::getContext()->link->getAdminLink('AdminCategories').'&id_category=' - .(int)Tools::getValue('id_category').'&updatecategory'); - } - - parent::postProcess(); - } - - public function ajaxProcessuploadThumbnailImages() - { - $category = new Category((int)Tools::getValue('id_category')); - - if (isset($_FILES['thumbnail'])) - { - //Get total of image already present in directory - $files = scandir(_PS_CAT_IMG_DIR_); - $assigned_keys = array(); - $allowed_keys = array(0, 1, 2); - - foreach ($files as $file) { - $matches = array(); - - if (preg_match('/^'.$category->id.'-([0-9])?_thumb.jpg/i', $file, $matches) === 1) - $assigned_keys[] = (int)$matches[1]; - } - - $available_keys = array_diff($allowed_keys, $assigned_keys); - $helper = new HelperImageUploader('thumbnail'); - $files = $helper->process(); - $total_errors = array(); - - if (count($available_keys) < count($files)) - { - $total_errors['name'] = sprintf(Tools::displayError('An error occurred while uploading the image :')); - $total_errors['error'] = sprintf(Tools::displayError('You cannot upload more files')); - die(json_encode(array('thumbnail' => array($total_errors)))); - } - - foreach ($files as $key => &$file) - { - $id = array_shift($available_keys); - $errors = array(); - // Evaluate the memory required to resize the image: if it's too much, you can't resize it. - if (isset($file['save_path']) && !ImageManager::checkImageMemoryLimit($file['save_path'])) - $errors[] = Tools::displayError('Due to memory limit restrictions, this image cannot be loaded. Please increase your memory_limit value via your server\'s configuration settings. '); - // Copy new image - if (!isset($file['save_path']) || (empty($errors) && !ImageManager::resize($file['save_path'], _PS_CAT_IMG_DIR_ - .(int)Tools::getValue('id_category').'-'.$id.'_thumb.jpg'))) - $errors[] = Tools::displayError('An error occurred while uploading the image.'); - - if (count($errors)) - $total_errors = array_merge($total_errors, $errors); - - if (isset($file['save_path']) && is_file($file['save_path'])) - unlink($file['save_path']); - //Necesary to prevent hacking - if (isset($file['save_path'])) - unset($file['save_path']); - - if (isset($file['tmp_name'])) - unset($file['tmp_name']); - - //Add image preview and delete url - $file['image'] = ImageManager::thumbnail(_PS_CAT_IMG_DIR_.(int)$category->id.'-'.$id.'_thumb.jpg', - $this->context->controller->table.'_'.(int)$category->id.'-'.$id.'_thumb.jpg', 100, 'jpg', true, true); - $file['delete_url'] = Context::getContext()->link->getAdminLink('AdminBlockCategories').'&deleteThumb=' - .$id.'&id_category='.(int)$category->id.'&updatecategory'; - } - - if (count($total_errors)) - $this->context->controller->errors = array_merge($this->context->controller->errors, $total_errors); - else - Tools::clearSmartyCache(); - - die(json_encode(array('thumbnail' => $files))); - } - } -} diff --git a/modules/blockcategories/controllers/admin/index.php b/modules/blockcategories/controllers/admin/index.php deleted file mode 100644 index e5064df41..000000000 --- a/modules/blockcategories/controllers/admin/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/blockcategories/controllers/index.php b/modules/blockcategories/controllers/index.php deleted file mode 100644 index e5064df41..000000000 --- a/modules/blockcategories/controllers/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/blockcategories/img/arrow_right_2.png b/modules/blockcategories/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/blockcategories/img/icon/index.php b/modules/blockcategories/img/icon/index.php deleted file mode 100644 index 7b5015776..000000000 --- a/modules/blockcategories/img/icon/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/blockcategories/img/icon/open-close.png b/modules/blockcategories/img/icon/open-close.png deleted file mode 100644 index 5e9c5d4bcf3a6fabe5a71fb105c86fffe1886bae..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 103 zcmeAS@N?(olHy`uVBq!ia0vp^oIotZ!2%?eJ8cdFDLqdY#}JM4$p-)W`6PS(|4(;l z^Kjyjnl5liM#wbjM#s_EB^FaR2=FbRlqhD!!q6nM;bj*i*HxfS22WQ%mvv4FO#lH& B9T5Nk diff --git a/modules/blockcategories/img/index.php b/modules/blockcategories/img/index.php deleted file mode 100644 index 19a328b3b..000000000 --- a/modules/blockcategories/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/blockcategories/index.php b/modules/blockcategories/index.php deleted file mode 100644 index e5064df41..000000000 --- a/modules/blockcategories/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/blockcategories/logo.gif b/modules/blockcategories/logo.gif deleted file mode 100644 index 779ad58efc5776825ef81064a042eceba274a928..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 649 zcmV;40(Sk0P)sm$HQ(N)Ek< zrc#vXMLdW}TWpphCZsGREkUZr{Mg;M&b;luZ0IGA9rnH1`DVU1->eh_0hG(-dw<@) z-1S-xc+D!@wd^?Z=a`M%%phe@J_EnT0QpH7V3 jcG~XA#&PRl)Zh6(yXt(^KFGF}00000NkvXXu0mjfDwr>g diff --git a/modules/blockcategories/logo.png b/modules/blockcategories/logo.png deleted file mode 100644 index d42a4ba211b2570aed27292947cb801a4bc3f6d9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1009 zcmVyPt3@AEw8IqxUV zId-xXJ6v}G2;f~lapa7~j5uon*YYz_3Lo$6@aXu9faw$f59rpIkwdS)55|C#HZV04 zCtrOY=mrX%1kmNI1!JgQJB~w#9h=K1*8ei5Qs&CLPvk{pdo(MJk9Tf(bo}Ug_PlyG zYj7$G5`pFh4sbrUl4bbV#~ZP2+1-H`VdCT~Bdyr;8jTDn55!x`fCOHxWxs~`^R4A+ zSI!~$L?3#Kz+ZH=2S61O1)^G zXb#~QL@Qo+JpP?fLr`2gapYWLbo^+O2mF8m6o}B0SOGy0tw>$I0ksN=(GS3yO+jps zB@$uc)N3O^cS8bK1JQ_RMC*W7*(jTcko@5~&iM2l8lZY(jP?PxzAU<@A9g=Su28)Q zM7?IMl+q|2A$e(%?9CaZ<)Mn*eS7JDbP#JDC>{FCZ8e$|W9q;~lX6ItBz#nAy`<7pRN+r_YH62kM>!a&=cnh*1!+F(EhL6l3+vH$Q>P@Vx54e!5f zBYie`db{?Jo&J%@)Y6AQ1+ZR-4a9M0xk#)xN^IADOz}5FM?3Ul2mVm82PkANF!tH> zM?iUP5-OkU9~t5U4})05=7VVdm(#A-Um|g=sga+(S(!{1{t6ig0f>M=;dYjxClgRz z2og~`wXaxIEY4!;8tM7c*>HNl4nRb3D>+Q1O4t4Sa4U02$EFWG6X_+FzQ8xvbDytH zzlMS0tyy**=m+O;+zIKYBl?Ti1JQz zr+?>muJRR7YFQTgFF#}5OUW)BE(FE9wiJIniqAjknJU@6Gu27n0A14RGhUw~?;e~tfB f$=#pRod)nX|8HRFz6*Sy^R!K@?$4 zLT(rqR`YviFA*X8aps>hd@~HQMKHFtcHtrb O0000`8_ z72X^I1E(7T0#5f1wR@O*NC*TfE>Ngwe9$nxp38sBhnD`MX$N0z6VTeTpg=@ -* @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/blockcategories/upgrade/install-2.1.php b/modules/blockcategories/upgrade/install-2.1.php deleted file mode 100644 index ace16ef68..000000000 --- a/modules/blockcategories/upgrade/install-2.1.php +++ /dev/null @@ -1,9 +0,0 @@ -registerHook('displayBackOfficeCategory'); -} diff --git a/modules/blockcategories/upgrade/install-2.9.1.php b/modules/blockcategories/upgrade/install-2.9.1.php deleted file mode 100644 index cfdf30762..000000000 --- a/modules/blockcategories/upgrade/install-2.9.1.php +++ /dev/null @@ -1,25 +0,0 @@ -active = 1; - $tab->class_name = 'AdminBlockCategories'; - $tab->name = array(); - foreach (Language::getLanguages(true) as $lang) { - $tab->name[$lang['id_lang']] = 'BlockCategories'; - } - $tab->id_parent = -1; - $tab->module = $object->name; - - return $tab->add(); - } - return true; -} diff --git a/modules/blockcategories/views/blockcategories_admin.tpl b/modules/blockcategories/views/blockcategories_admin.tpl deleted file mode 100644 index e2ca22e58..000000000 --- a/modules/blockcategories/views/blockcategories_admin.tpl +++ /dev/null @@ -1,37 +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 -*} -
    - -
    - {$helper} -
    -
    -
    {l s='Recommended dimensions (for the default theme): %1spx x %2spx' sprintf=[$format.width, $format.height]}
    -
    -
    diff --git a/themes/hotel-reservation-theme/css/global.css b/themes/hotel-reservation-theme/css/global.css index a13cb81e4..c4ea99b2e 100644 --- a/themes/hotel-reservation-theme/css/global.css +++ b/themes/hotel-reservation-theme/css/global.css @@ -7380,8 +7380,6 @@ div.star a:hover { padding-right: 12px; float: left; color: #908f8f; } - .footer-container #footer .blockcategories_footer { - clear: left; } .footer-container #footer #social_block { /* By Webkul */ /*display: table; @@ -8424,9 +8422,6 @@ div.star.star_hover:after { margin-bottom: 1em; text-align: center; } -.blockcategories_footer ul ul { - display: none !important; } - .form-group.form-error input, .form-group.form-error textarea { border: 1px solid #f13340; color: #f13340; diff --git a/themes/hotel-reservation-theme/css/modules/blockcategories/blockcategories.css b/themes/hotel-reservation-theme/css/modules/blockcategories/blockcategories.css deleted file mode 100644 index 16929b9e8..000000000 --- a/themes/hotel-reservation-theme/css/modules/blockcategories/blockcategories.css +++ /dev/null @@ -1,91 +0,0 @@ -#categories_block_top { - clear: both; - position: relative; - top: 30px; } - #categories_block_top .sf-menu { - position: relative; } - #categories_block_top .sf-menu > li { - position: static; } - #categories_block_top .sf-menu > li > ul { - width: 100%; - top: 60px; - margin: 0 20px; } - #categories_block_top .sf-menu > li > ul > li { - display: block; - float: left; - width: 20%; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; - padding: 0 10px; } - #categories_block_top .sf-menu > li > ul > .category_thumb { - display: block; - clear: both; - overflow: hidden; - width: 100%; } - #categories_block_top .sf-menu > li > ul > .category_thumb img { - display: inline-block; - width: 33%; } - #categories_block_top .sf-menu > li h4 a { - font-size: 1.1em; } - #categories_block_top .sf-menu > li h4 a:before { - display: none; } - #categories_block_top .sf-menu > li .main-level-submenus { - position: relative; - display: block !important; - visibility: visible !important; - top: 0; - background: none; - box-shadow: none; - padding: 0; - left: 0; } - #categories_block_top .sf-menu .category_thumb { - display: none; } - -#categories_block_left .block_content > ul { - border-top: 1px solid #d6d4d4; } -#categories_block_left li { - position: relative; } - #categories_block_left li a { - font-weight: bold; - color: #333; - display: block; - font-size: 13px; - line-height: 30px; - padding: 0 30px 0 19px; - border-bottom: 1px solid #d6d4d4; } - #categories_block_left li span.grower { - display: block; - background: #f6f6f6; - position: absolute; - right: 0; - top: 0; - cursor: pointer; - font-family: "FontAwesome"; - font-size: 14px; } - #categories_block_left li span.grower.OPEN:before, #categories_block_left li span.grower.CLOSE:before { - content: "\f068"; - display: block; - vertical-align: middle; - width: 30px; - height: 30px; - color: #333; - line-height: 30px; - text-align: center; } - #categories_block_left li span.grower.CLOSE:before { - content: "\f067"; - color: silver; } - #categories_block_left li span.grower:hover + a, - #categories_block_left li a:hover, - #categories_block_left li a.selected { - background: #f6f6f6; } - #categories_block_left li li a { - font-weight: normal; - color: #777777; } - #categories_block_left li li a:before { - content: "\f105"; - font-family: "FontAwesome"; - line-height: 29px; - padding-right: 8px; } - -/*# sourceMappingURL=blockcategories.css.map */ diff --git a/themes/hotel-reservation-theme/css/modules/blockcategories/index.php b/themes/hotel-reservation-theme/css/modules/blockcategories/index.php deleted file mode 100644 index 9a99a8662..000000000 --- a/themes/hotel-reservation-theme/css/modules/blockcategories/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/blockcategories/blockcategories.tpl b/themes/hotel-reservation-theme/modules/blockcategories/blockcategories.tpl deleted file mode 100644 index 6d051b0c1..000000000 --- a/themes/hotel-reservation-theme/modules/blockcategories/blockcategories.tpl +++ /dev/null @@ -1,48 +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 $blockCategTree && $blockCategTree.children|@count} - -
    -

    - {if isset($currentCategory)} - {$currentCategory->name|escape} - {else} - {l s='Categories' mod='blockcategories'} - {/if} -

    -
    -
      - {foreach from=$blockCategTree.children item=child name=blockCategTree} - {if $smarty.foreach.blockCategTree.last} - {include file="$branche_tpl_path" node=$child last='true'} - {else} - {include file="$branche_tpl_path" node=$child} - {/if} - {/foreach} -
    -
    -
    - -{/if} diff --git a/themes/hotel-reservation-theme/modules/blockcategories/blockcategories_footer.tpl b/themes/hotel-reservation-theme/modules/blockcategories/blockcategories_footer.tpl deleted file mode 100644 index 3d9fa70fb..000000000 --- a/themes/hotel-reservation-theme/modules/blockcategories/blockcategories_footer.tpl +++ /dev/null @@ -1,53 +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 -*} - - - - diff --git a/themes/hotel-reservation-theme/modules/blockcategories/category-tree-branch.tpl b/themes/hotel-reservation-theme/modules/blockcategories/category-tree-branch.tpl deleted file mode 100644 index f797d30bc..000000000 --- a/themes/hotel-reservation-theme/modules/blockcategories/category-tree-branch.tpl +++ /dev/null @@ -1,42 +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 -*} - -
  • - - {$node.name|escape:'html':'UTF-8'} - - {if $node.children|@count > 0} -
      - {foreach from=$node.children item=child name=categoryTreeBranch} - {if $smarty.foreach.categoryTreeBranch.last} - {include file="$branche_tpl_path" node=$child last='true'} - {else} - {include file="$branche_tpl_path" node=$child last='false'} - {/if} - {/foreach} -
    - {/if} -
  • diff --git a/themes/hotel-reservation-theme/modules/blockcategories/index.php b/themes/hotel-reservation-theme/modules/blockcategories/index.php deleted file mode 100644 index 9a99a8662..000000000 --- a/themes/hotel-reservation-theme/modules/blockcategories/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;