fmc82 Posted March 27, 2014 Share Posted March 27, 2014 Hello I would like to substitute in place of the configuration of the theme in the displayTopColumn block categories and put everything right. I tried to add to positions, but he told me that it is not possible thanks Link to comment Share on other sites More sharing options...
fmc82 Posted March 30, 2014 Author Share Posted March 30, 2014 help me Link to comment Share on other sites More sharing options...
vekia Posted March 30, 2014 Share Posted March 30, 2014 hello in this case it's necessary to add function to module to handle this hook, public function hookdisplayTopColumn($params) Link to comment Share on other sites More sharing options...
fmc82 Posted April 1, 2014 Author Share Posted April 1, 2014 I put these two blocks of code in the file blockcategories.php I do not know if they are correct, the fact is that if I enter this code in the block and graft from the back office I get a Pacina only with the logo disappear the rest of the content. thanks 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('displayTopColumn') || -------- 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 hookdisplayTopColumn() { return $this->hookdisplayTop(); } 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'); } Link to comment Share on other sites More sharing options...
fmc82 Posted April 9, 2014 Author Share Posted April 9, 2014 help Link to comment Share on other sites More sharing options...
fmc82 Posted April 9, 2014 Author Share Posted April 9, 2014 sorry I'm trying now with the block manufacturer, I inserted this code and finally are inserts the block. But not positioned close to the slider above but how can I do thanks help public function hookdisplayTopColumn($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()); } Link to comment Share on other sites More sharing options...
vekia Posted April 10, 2014 Share Posted April 10, 2014 hello you if it isn't positioned as you want - there are two possibilities: - modules is "far away" from your slider on disaplyTopColumn modules list. go to modules > positions and search for modules list named displayTopColumn and move block manufacturers module right after the slider module. - you have to use correct css styles for your manufacturers block. in some cases problems are also related to construction of blocks (both of the manufacturers and slider) - in this case - modification will be a bit more complicated (modification related to slider files and other related modules) Link to comment Share on other sites More sharing options...
krane Posted February 22, 2015 Share Posted February 22, 2015 -( you have to use correct css styles for your manufacturers block.) So how exactly do we do this? where is the CSS for manufacturer block found? Cheers Link to comment Share on other sites More sharing options...
Recommended Posts