movieseals Posted December 19, 2022 Share Posted December 19, 2022 (edited) The bestseller module is causing issues with the search module this morning. I get the following error unless I disable Bestsellers: Additional info: I tried and rseted the module and now even the front page does not work. Decoded exception Call to undefined method Tools::roundPrice() in file modules/blockbestsellers/blockbestsellers.php at line 399 Source file: modules/blockbestsellers/blockbestsellers.php 380: */ 381: protected function resolveBestSellers() 382: { 383: if (Configuration::get('PS_CATALOG_MODE')) { 384: return false; 385: } 386: 387: if (!($result = $this->getBestSalesLight( 388: (int) $this->context->language->id, 389: 0, 390: (int) Configuration::get(static::BESTSELLERS_TO_DISPLAY), 391: Configuration::get(static::BESTSELLERS_PRICE_ABOVE))) 392: ) { 393: return (Configuration::get(static::BESTSELLERS_DISPLAY) ? [] : false); 394: } 395: 396: $currency = new Currency($this->context->currency->id); 397: $usetax = (Product::getTaxCalculationMethod((int) $this->context->customer->id) != PS_TAX_EXC); 398: foreach ($result as &$row) { 399: $row['price_raw'] = Tools::roundPrice(Product::getPriceStatic((int) $row['id_product'], $usetax)); 400: $row['price'] = Tools::displayPrice($row['price_raw'], $currency); 401: } 402: 403: return $result; 404: } 405: 406: /** 407: * Get required informations on best sales products 408: * 409: * @param int $idLang Language id Edited December 19, 2022 by movieseals Additional information Link to comment Share on other sites More sharing options...
0 datakick Posted December 19, 2022 Share Posted December 19, 2022 Update module to new version 2.2.4. Link to comment Share on other sites More sharing options...
0 movieseals Posted December 20, 2022 Author Share Posted December 20, 2022 Perfect. It worksnormally now. Thank you. Link to comment Share on other sites More sharing options...
Question
movieseals
The bestseller module is causing issues with the search module this morning. I get the following error unless I disable Bestsellers:
Additional info: I tried and rseted the module and now even the front page does not work.
Call to undefined method Tools::roundPrice()
Source file: modules/blockbestsellers/blockbestsellers.php
Additional information
Link to comment
Share on other sites
2 answers to this question
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