webspider Posted August 9, 2016 Share Posted August 9, 2016 (edited) Bonjour, je viens de remarquer un problème avec le module homefeatured sur mon site, problème qui est apparu sans raison apparente Si je désactive le cache, l'affichage aléatoire fonctionne mais dès que je le réactive , l'affichage aléatoire des produits ne fonctionne que une ou deux fois puis stagne. J'ai essayé de vider le cache mais rien à faire je plante sur la solution ! a noter que je n'ai fait aucune modification sur la boutique et que le problème est apparu spontanement. d'avance merci a ceux qui pourrons m'éclairer Edited August 9, 2016 by webspider (see edit history) Link to comment Share on other sites More sharing options...
webspider Posted August 9, 2016 Author Share Posted August 9, 2016 problème reglé, j'ai oublier de remodifier la fonction hookDisplayHome après la mise à jour.... public function hookDisplayHome($params) { $category = new Category(Context::getContext()->shop->getCategory(), (int)Context::getContext()->language->id); $nb = (int)Configuration::get('HOME_FEATURED_NBR'); HomeFeatured::$cache_products = $category->getProducts((int)Context::getContext()->language->id, 1, ($nb ? $nb : 10), NULL, NULL, false, true, true, ($nb ? $nb : 2000), 'position'); $this->smarty->assign( array( 'products' => HomeFeatured::$cache_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...
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