killerkhan Posted October 13, 2013 Share Posted October 13, 2013 Hello, My website was working fine but all of a sudden there is a getCacheId() error in the homeslider module. Can someone help please. My prestashop version is 1.5.2.0 Thanks, Link to comment Share on other sites More sharing options...
vekia Posted October 13, 2013 Share Posted October 13, 2013 it appeared without any reason? or you just changed this module? installed new version etc? Link to comment Share on other sites More sharing options...
killerkhan Posted October 13, 2013 Author Share Posted October 13, 2013 i did nothing when i visited the website i saw the blank page then i changed the error reporting from the config folder and i get this error. Fatal error: Call to undefined method HomeSlider::getCacheId() in /home4/surfcoas/public_html/modules/homeslider/homeslider.php on line 630 Link to comment Share on other sites More sharing options...
vekia Posted October 13, 2013 Share Posted October 13, 2013 ok, can you try to clear shop cache, and let me know if this helps Link to comment Share on other sites More sharing options...
killerkhan Posted October 13, 2013 Author Share Posted October 13, 2013 Did you meant deleting from the cache folder?? Link to comment Share on other sites More sharing options...
vekia Posted October 13, 2013 Share Posted October 13, 2013 yes, more info on this videotutorial: http://www.youtube.com/watch?feature=player_detailpage&v=wOPJuODWm40#t=64 Link to comment Share on other sites More sharing options...
killerkhan Posted October 13, 2013 Author Share Posted October 13, 2013 Yes, i did the suggested changes but still the error is coming. Link to comment Share on other sites More sharing options...
vekia Posted October 13, 2013 Share Posted October 13, 2013 ok, so you've got some issue with cache there. what to do? if i were you I will remove cache code from module .php file: homefeatured.php (from module directory) instead of: public function hookDisplayHome($params) { if (!$this->isCached('homefeatured.tpl', $this->getCacheId('homefeatured'))) { $category = new Category(Context::getContext()->shop->getCategory(), (int)Context::getContext()->language->id); $nb = (int)Configuration::get('HOME_FEATURED_NBR'); $products = $category->getProducts((int)Context::getContext()->language->id, 1, ($nb ? $nb : 8)); $this->smarty->assign(array( 'products' => $products, 'add_prod_display' => Configuration::get('PS_ATTRIBUTE_CATEGORY_DISPLAY'), 'homeSize' => Image::getSize(ImageType::getFormatedName('home')), )); } return $this->display(__FILE__, 'homefeatured.tpl', $this->getCacheId('homefeatured')); } just use this one: public function hookDisplayHome($params) { $category = new Category(Context::getContext()->shop->getCategory(), (int)Context::getContext()->language->id); $nb = (int)Configuration::get('HOME_FEATURED_NBR'); $products = $category->getProducts((int)Context::getContext()->language->id, 1, ($nb ? $nb : 8)); $this->smarty->assign(array( 'products' => $products, 'add_prod_display' => Configuration::get('PS_ATTRIBUTE_CATEGORY_DISPLAY'), 'homeSize' => Image::getSize(ImageType::getFormatedName('home')), )); return $this->display(__FILE__, 'homefeatured.tpl'); } Link to comment Share on other sites More sharing options...
killerkhan Posted October 13, 2013 Author Share Posted October 13, 2013 But my problem is with the homeslider not with the homefeatured module.... Link to comment Share on other sites More sharing options...
vekia Posted October 13, 2013 Share Posted October 13, 2013 ohh my bad, sry, do the same just for homeslider module: (so sorry it was my mistake, very similar module names) open homeslider.php (from module directory) instead of: private function _prepareHook() { if (!$this->isCached('homeslider.tpl', $this->getCacheId())) { $slider = array( 'width' => Configuration::get('HOMESLIDER_WIDTH'), 'height' => Configuration::get('HOMESLIDER_HEIGHT'), 'speed' => Configuration::get('HOMESLIDER_SPEED'), 'pause' => Configuration::get('HOMESLIDER_PAUSE'), 'loop' => Configuration::get('HOMESLIDER_LOOP'), ); $slides = $this->getSlides(true); if (!$slides) return false; $this->smarty->assign('homeslider_slides', $slides); $this->smarty->assign('homeslider', $slider); } return true; } use this one: private function _prepareHook() { $slider = array( 'width' => Configuration::get('HOMESLIDER_WIDTH'), 'height' => Configuration::get('HOMESLIDER_HEIGHT'), 'speed' => Configuration::get('HOMESLIDER_SPEED'), 'pause' => Configuration::get('HOMESLIDER_PAUSE'), 'loop' => Configuration::get('HOMESLIDER_LOOP'), ); $slides = $this->getSlides(true); if (!$slides) return false; $this->smarty->assign('homeslider_slides', $slides); $this->smarty->assign('homeslider', $slider); return true; } and instead of: public function hookDisplayHome() { if(!$this->_prepareHook()) return; // Check if not a mobile theme if ($this->context->getMobileDevice() != false) return false; $this->context->controller->addJS($this->_path.'js/jquery.bxSlider.min.js'); $this->context->controller->addCSS($this->_path.'bx_styles.css'); $this->context->controller->addJS($this->_path.'js/homeslider.js'); return $this->display(__FILE__, 'homeslider.tpl', $this->getCacheId()); } use this one: public function hookDisplayHome() { if(!$this->_prepareHook()) return; // Check if not a mobile theme if ($this->context->getMobileDevice() != false) return false; $this->context->controller->addJS($this->_path.'js/jquery.bxSlider.min.js'); $this->context->controller->addCSS($this->_path.'bx_styles.css'); $this->context->controller->addJS($this->_path.'js/homeslider.js'); return $this->display(__FILE__, 'homeslider.tpl'); } Link to comment Share on other sites More sharing options...
killerkhan Posted October 13, 2013 Author Share Posted October 13, 2013 Thanks Vekia, This worked for me. Thanks, Link to comment Share on other sites More sharing options...
vekia Posted October 13, 2013 Share Posted October 13, 2013 you're welcome glad to hear that i could help you i marked this thread as [solved] with regards, Milos Link to comment Share on other sites More sharing options...
giovanniciquera Posted July 30, 2015 Share Posted July 30, 2015 Fatal error: Call to undefined method Module::getBatchMode() in /home/wfhgdhzt/public_html/classes/Tag.php on line 137 This error appears in back office products/ car parts filter (module) when i add items and save. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now