Jump to content

[Free module] Featured Categories on HomePage


Recommended Posts

"Featured Categories on Home Page" module (hook 'displayHome'):


  • Header + additional description (multi-languages)
  • Displays images of the Categories
  • Dynamic counter of active products in the category
  • Counter of "selected categories"
  • Compatible with PrestaShop 1.7 - 8
  • Language versions: EN (PL and soon more languages...)







Edited by trio12 (see edit history)
  • Thanks 1
Link to comment
Share on other sites

  • 2 months later...


It is not working for me PHP7.4 PS1.7.8.9

1/1) ContextErrorException

Notice: Undefined index: selectedCategoryCount

in 9e166e8a6f508d38b98e22ab2b721e608a127acf_2.file.categories_homepage.tpl.php line 36

at content_64fb2bb98a7b89_45491311(object(SmartyDevTemplate))in smarty_template_resource_base.php line 123

at Smarty_Template_Resource_Base->getRenderedTemplateCode(object(SmartyDevTemplate))in smarty_template_compiled.php line 114

at Smarty_Template_Compiled->render(object(SmartyDevTemplate))in smarty_internal_template.php line 216

at Smarty_Internal_Template->render(false, 0)in smarty_internal_templatebase.php line 232

at Smarty_Internal_TemplateBase->_execute(object(SmartyDevTemplate), null, null, null, 0)in smarty_internal_templatebase.php line 116

at Smarty_Internal_TemplateBase->fetch(null, null, null, null, false, true, false)in SmartyDevTemplate.php line 40

at SmartyDevTemplateCore->fetch()in Module.php line 2449

at ModuleCore->display('/var/www/vig/parts-shop/modules/mkd_categories_homepage/mkd_categories_homepage.php', 'views/templates/hook/categories_homepage.tpl')in mkd_categories_homepage.php line 180

at MKD_categories_homepage->hookDisplayHome(array('cookie' => object(Cookie), 'cart' => object(Cart), 'altern' => 1))in Hook.php line 1007

at HookCore::coreCallHook(object(MKD_categories_homepage), 'hookDisplayHome', array('cookie' => object(Cookie), 'cart' => object(Cart), 'altern' => 1))in Hook.php line 431

at HookCore::callHookOn(object(MKD_categories_homepage), 'displayHome', array('cookie' => object(Cookie), 'cart' => object(Cart), 'altern' => 1))in Hook.php line 944

at HookCore::exec('displayHome')in IndexController.php line 39

at IndexControllerCore->initContent()in Controller.php line 306

at ControllerCore->run()in Dispatcher.php line 525

at DispatcherCore->dispatch()in index.php line 28

Link to comment
Share on other sites

There are 2 possible solutions:
1. No category in the module has been selected
2. Or add a checking condition in the template (categories_homepage.tpl)

{if isset($selectedCategoryCount)}
     {foreach $selectedCategories as $category}


Edited by trio12 (see edit history)
Link to comment
Share on other sites

  • 3 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...