Evelina1 Posted October 30, 2015 Share Posted October 30, 2015 Hello, after update to 1.6.1.1 (also 1.6.1.2) do not display color attributes in the category. The problem with cahce? When I turn off the cache, so everything works. web: http://italske-spodni-pradlo.cz/ Link to comment Share on other sites More sharing options...
NemoPS Posted October 31, 2015 Share Posted October 31, 2015 Since you mention caching, did you try clearing it already? Link to comment Share on other sites More sharing options...
Evelina1 Posted October 31, 2015 Author Share Posted October 31, 2015 Yes, clearing cache, it works for a while, but after a while disappears. I found this, but the treatment does not work https://www.prestashop.com/forums/topic/461761-color-index-issue/ Link to comment Share on other sites More sharing options...
programmer85 Posted November 2, 2015 Share Posted November 2, 2015 (edited) Same problem here. When the built in prestashop smarty cache is enabled, and the blocklayered module us used on frontend for color filtering, the small color boxes are not shown or are showed randomly in the product list. I also have third party pagecache module, with that there is no problem. But if I turn off prestashop smarty cache the admin is slow, so this is not the proper solution. The problem appeared after updating from 1.6.0.14 to 1.6.1.1 and is still there in 1.6.1.2. Edited November 2, 2015 by programmer85 (see edit history) Link to comment Share on other sites More sharing options...
Evelina1 Posted November 2, 2015 Author Share Posted November 2, 2015 for me there was a problem from 1.6.0.11 to 1.6.1.1 neither 1.6.1.2 did not help I now have a cache off and it works, but it is not the solution Link to comment Share on other sites More sharing options...
programmer85 Posted November 7, 2015 Share Posted November 7, 2015 for me there was a problem from 1.6.0.11 to 1.6.1.1 neither 1.6.1.2 did not help I now have a cache off and it works, but it is not the solution I came up with a hotfix, till the problem is resolved. Check my last comment: http://forge.prestashop.com/browse/PSCSX-6778 Link to comment Share on other sites More sharing options...
Tamara F Posted December 2, 2015 Share Posted December 2, 2015 I came up with a hotfix, till the problem is resolved. Check my last comment: http://forge.prestashop.com/browse/PSCSX-6778 I would not like to charge evene more my shared server... Any news? Thanks Link to comment Share on other sites More sharing options...
TiaNex Shopping Posted May 9, 2017 Share Posted May 9, 2017 Yes, clearing cache, it works for a while, but after a while disappears. I found this, but the treatment does not work https://www.prestashop.com/forums/topic/461761-color-index-issue/ i have the same problem,could you help? Link to comment Share on other sites More sharing options...
TiaNex Shopping Posted May 10, 2017 Share Posted May 10, 2017 (edited) hello,please test this,thanks https://github.com/PrestaShop/PrestaShop/pull/7876 public function addColorsToProductList(&$products) { if (!is_array($products) || !count($products) || !file_exists(_PS_THEME_DIR_.'product-list-colors.tpl')) { return; } $products_need_cache = array(); foreach ($products as &$product) { if (!$this->isCached(_PS_THEME_DIR_.'product-list-colors.tpl', $this->getColorsListCacheId($product['id_product']))) { $products_need_cache[] = (int)$product['id_product']; }else{ $product['color_list'] = $this->context->smarty->createTemplate(_PS_THEME_DIR_.'product-list-colors.tpl', $this->getColorsListCacheId($product['id_product']))->fetch(); } } unset($product); $colors = false; if (count($products_need_cache)) { var_dump($products_need_cache); $colors = Product::getAttributesColorList($products_need_cache); Tools::enableCache(); foreach ($products as &$product) { if (in_array($product['id_product'], $products_need_cache)){ $tpl = $this->context->smarty->createTemplate(_PS_THEME_DIR_.'product-list-colors.tpl', $this->getColorsListCacheId($product['id_product'])); if (isset($colors[$product['id_product']])) { $tpl->assign(array( 'id_product' => $product['id_product'], 'colors_list' => $colors[$product['id_product']], 'link' => Context::getContext()->link, 'img_col_dir' => _THEME_COL_DIR_, 'col_img_dir' => _PS_COL_IMG_DIR_ )); $product['color_list'] = $tpl->fetch(_PS_THEME_DIR_.'product-list-colors.tpl', $this->getColorsListCacheId($product['id_product'])); } else { $product['color_list'] = ''; } } } Tools::restoreCacheSettings(); } } this code can fix the bug ,but i don't know why Edited May 10, 2017 by Irder (see edit history) 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