Fra29 Posted December 17, 2019 Share Posted December 17, 2019 Hi, I don't know why but from yesterday the module is not working properly. I can see only the title and the price of the first product. I run Prestashop 1.7.6.2 with Warehouse theme and in theme config I've only turned off the arrows and dots navigation and It has always worked properly (Even if I turn that back On nothing change). I tryed to disinstall or reset the module but still same problems. How can I fix it ? Link to comment Share on other sites More sharing options...
p00pstar Posted March 29, 2020 Share Posted March 29, 2020 Same here, on Prestashop 1.7.6.1 with Warehouse theme 4.3.2 Link to comment Share on other sites More sharing options...
p00pstar Posted March 29, 2020 Share Posted March 29, 2020 After further investigation, it seems the problem is with "themes/warehouse/templates/catalog/_partials/miniatures/_partials/product-miniature-thumb.tpl" If you comment the last 3 blocks from the template "product_flags", "product_list_functional_buttons" and "product_availability" it will work. But it will not show those blocks in categories list. Link to comment Share on other sites More sharing options...
sem1986 Posted August 29, 2020 Share Posted August 29, 2020 On 3/30/2020 at 12:01 AM, p00pstar said: After further investigation, it seems the problem is with "themes/warehouse/templates/catalog/_partials/miniatures/_partials/product-miniature-thumb.tpl" If you comment the last 3 blocks from the template "product_flags", "product_list_functional_buttons" and "product_availability" it will work. But it will not show those blocks in categories list. @p00pstar Thank you, that you found the problem. And I found solution. If you will remove in these 3 blocks all block code (I mean {block name='product_flags'} {/block} etc) then it will solve the problem. And all inside html will be there, so you will be able to see everywhere all flags and so on. 2 Link to comment Share on other sites More sharing options...
lakeup Posted August 9, 2021 Share Posted August 9, 2021 Thanks a lot, i had the same issue ! Link to comment Share on other sites More sharing options...
Shabab Posted August 9, 2021 Share Posted August 9, 2021 Hi, you need t change css for this block Link to comment Share on other sites More sharing options...
martina_conte Posted October 1, 2021 Share Posted October 1, 2021 On 29/8/2020 at 5:06 PM, asdasd1234 dice: @p00pstar Thank you, that you found the problem. And I found solution. If you will remove in these 3 blocks all block code (I mean {block name='product_flags'} {/block} etc) then it will solve the problem. And all inside html will be there, so you will be able to see everywhere all flags and so on. I have the same problem but doesn't work, can you help me? Link to comment Share on other sites More sharing options...
Holohugo Posted February 15, 2022 Share Posted February 15, 2022 Its wrong cache key in ps_categoryproducts. This issue is there even for ps_viewedproducts module, especially for people using Warehouse theme, but its not related to the theme, but to the smarty cache (it works if its turned off). Simple solution is to disable smarty cache funccionality for those modules. Products in the same category: modules/ps_categoryproducts/ps_categoryproducts.php and find renderWidget function and replace it with following (cache is commented out) public function renderWidget($hookName = null, array $configuration = array()) { $params = $this->getInformationFromConfiguration($configuration); if ($params) { if ((int)Configuration::get('CATEGORYPRODUCTS_DISPLAY_PRODUCTS') > 0) { // Need variables only if this template isn't cached //if (!$this->isCached($this->templateFile, $params['cache_id'])) { if (!empty($params['id_category'])) { $category = new Category($params['id_category']); } if (empty($category) || !Validate::isLoadedObject($category) || !$category->active) { return false; } $variables = $this->getWidgetVariables($hookName, $configuration); if (empty($variables)) { return false; } $this->smarty->assign($variables); // } return $this->fetch( $this->templateFile ); } } return false; } Viewed products: modules/ps_viewedproducts/ps_viewedproducts.php and find renderWidget function and replace it with following (cache is commented out) public function renderWidget($hookName = null, array $configuration = array()) { if (isset($configuration['product']['id_product'])) { $this->currentProductId = $configuration['product']['id_product']; } if ('displayProductButtons' === $hookName || 'displayProductAdditionalInfo' === $hookName) { $this->addViewedProduct($this->currentProductId); return; } if (!isset($this->context->cookie->viewed) || empty($this->context->cookie->viewed)) { return; } // if (!$this->isCached($this->templateFile, $this->getCacheId())) { $variables = $this->getWidgetVariables($hookName, $configuration); if (empty($variables)) { return false; } $this->smarty->assign($variables); // } // return $this->fetch($this->templateFile, $this->getCacheId()); return $this->fetch($this->templateFile); } I have this fix on my 1.7.8.1 with PHP 7.4 and it works like a charm 3 Link to comment Share on other sites More sharing options...
Hart Posted July 15, 2023 Share Posted July 15, 2023 On 2/15/2022 at 8:42 PM, Holohugo said: Its wrong cache key in ps_categoryproducts. This issue is there even for ps_viewedproducts module, especially for people using Warehouse theme, but its not related to the theme, but to the smarty cache (it works if its turned off). Simple solution is to disable smarty cache funccionality for those modules. Products in the same category: modules/ps_categoryproducts/ps_categoryproducts.php and find renderWidget function and replace it with following (cache is commented out) public function renderWidget($hookName = null, array $configuration = array()) { $params = $this->getInformationFromConfiguration($configuration); if ($params) { if ((int)Configuration::get('CATEGORYPRODUCTS_DISPLAY_PRODUCTS') > 0) { // Need variables only if this template isn't cached //if (!$this->isCached($this->templateFile, $params['cache_id'])) { if (!empty($params['id_category'])) { $category = new Category($params['id_category']); } if (empty($category) || !Validate::isLoadedObject($category) || !$category->active) { return false; } $variables = $this->getWidgetVariables($hookName, $configuration); if (empty($variables)) { return false; } $this->smarty->assign($variables); // } return $this->fetch( $this->templateFile ); } } return false; } Viewed products: modules/ps_viewedproducts/ps_viewedproducts.php and find renderWidget function and replace it with following (cache is commented out) public function renderWidget($hookName = null, array $configuration = array()) { if (isset($configuration['product']['id_product'])) { $this->currentProductId = $configuration['product']['id_product']; } if ('displayProductButtons' === $hookName || 'displayProductAdditionalInfo' === $hookName) { $this->addViewedProduct($this->currentProductId); return; } if (!isset($this->context->cookie->viewed) || empty($this->context->cookie->viewed)) { return; } // if (!$this->isCached($this->templateFile, $this->getCacheId())) { $variables = $this->getWidgetVariables($hookName, $configuration); if (empty($variables)) { return false; } $this->smarty->assign($variables); // } // return $this->fetch($this->templateFile, $this->getCacheId()); return $this->fetch($this->templateFile); } I have this fix on my 1.7.8.1 with PHP 7.4 and it works like a charm removing cache from the modules is a fast solution but not the better one, The problem is on the theme because with other themes and classic theme the problem is not there. 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