mausbaus Posted July 12, 2019 Share Posted July 12, 2019 (edited) I had PS 1.75.2. I installed the 1-click upgrade 4.9.0 and ran the upgrade to 1.7.6. After upgrade, the BO seemed fine but the FO is not working anymore. Error 500. AH01071: Got error 'PHP message: PHP Fatal error: Uncaught InvalidArgumentException: "1.0E+15" cannot be interpreted as a number in /vendor/prestashop/decimal/src/Number.php:466\nStack trace:\n#0 /vendor/prestashop/decimal/src/Number.php(72): PrestaShop\\Decimal\\Number->initFromString('1.0E+15')\n#1 /src/Core/Localization/Number/Formatter.php(149): PrestaShop\\Decimal\\Number->__construct('1.0E+15')\n#2 /src/Core/Localization/Number/Formatter.php(106): PrestaShop\\PrestaShop\\Core\\Localization\\Number\\Formatter->prepareNumber(1.0E+15)\n#3/src/Core/Localization/Locale.php(155): PrestaShop\\PrestaShop\\Core\\Localization\\Number\\Formatter->format(1.0E+15, Object(PrestaShop\\PrestaShop\\Core\\Localization\\Specification\\Price))\n#4/classes/Tools.php(776): PrestaShop\\PrestaShop\\Core\\Localization\\Lo...\n' At the same time, on another website, I did a clean install of PS 1.7.6 and everything works fine. So... is it a problem with the 1-click upgrade module or with the files it downloads before the upgrade? Edited July 16, 2019 by mausbaus (see edit history) Link to comment Share on other sites More sharing options...
mausbaus Posted July 14, 2019 Author Share Posted July 14, 2019 Nobody else having this problem? Link to comment Share on other sites More sharing options...
JBW Posted July 15, 2019 Share Posted July 15, 2019 Can you post the full stack trace of the error message to see where the error is coming from? Have you tried to disable modules/overrides and cleared the cache? Link to comment Share on other sites More sharing options...
mausbaus Posted July 15, 2019 Author Share Posted July 15, 2019 (2/2) LocalizationException Invalid $number parameter: "1.0E+15" cannot be interpreted as a number in Formatter.php line 108 at Formatter->format(1000000000000000.0, object(Price)) in Locale.php line 155 at Locale->formatPrice(1000000000000000.0, 'RON') in Tools.php line 776 at ToolsCore::displayPrice(1000000000000000.0, object(Currency)) in PriceFormatter.php line 55 at PriceFormatter->format(1000000000000000.0) in CartPresenter.php line 470 at CartPresenter->present(object(Cart)) in FrontController.php line 490 at FrontControllerCore->assignGeneralPurposeVariables() in FrontController.php line 548 at FrontControllerCore->initContent() in IndexController.php line 37 at IndexControllerCore->initContent() in Controller.php line 291 at ControllerCore->run() in Dispatcher.php line 515 at DispatcherCore->dispatch() in index.php line 28 (1/2) InvalidArgumentException "1.0E+15" cannot be interpreted as a number in Number.php line 466 at Number->initFromString('1.0E+15') in Number.php line 72 at Number->__construct('1.0E+15') in Formatter.php line 149 at Formatter->prepareNumber(1000000000000000.0) in Formatter.php line 106 at Formatter->format(1000000000000000.0, object(Price)) in Locale.php line 155 at Locale->formatPrice(1000000000000000.0, 'RON') in Tools.php line 776 at ToolsCore::displayPrice(1000000000000000.0, object(Currency)) in PriceFormatter.php line 55 at PriceFormatter->format(1000000000000000.0) in CartPresenter.php line 470 at CartPresenter->present(object(Cart)) in FrontController.php line 490 at FrontControllerCore->assignGeneralPurposeVariables() in FrontController.php line 548 at FrontControllerCore->initContent() in IndexController.php line 37 at IndexControllerCore->initContent() in Controller.php line 291 at ControllerCore->run() in Dispatcher.php line 515 at DispatcherCore->dispatch() in index.php line 28 Link to comment Share on other sites More sharing options...
JBW Posted July 15, 2019 Share Posted July 15, 2019 Alright, I can't see a hint towards a module or override but I cann see that there seems to be a price which seems very unrealistic: 1000000000000000 This prices seems to cause some formatting issue. As a quick fix you can try to find this product/price/cart (wherever it's coming from) and reduce it to "normal" lenght. Link to comment Share on other sites More sharing options...
mausbaus Posted July 15, 2019 Author Share Posted July 15, 2019 (edited) I've been looking but can't find that number anywhere. Especially that this PS installment is catalogue only, not as a shop. How can I find that number? In DB? Edited July 15, 2019 by mausbaus (see edit history) Link to comment Share on other sites More sharing options...
mausbaus Posted July 15, 2019 Author Share Posted July 15, 2019 Searched the DB, there is no such number in the entire DB. Link to comment Share on other sites More sharing options...
JBW Posted July 16, 2019 Share Posted July 16, 2019 Line 470 in CartPresenter.php from your error trace is pointing to a code with a value for $minimalPurchase. This value is coming from configuration. Whats the value you have set there? $minimalPurchase = $this->priceFormatter->convertAmount((float) Configuration::get('PS_PURCHASE_MINIMUM')); 'minimalPurchaseRequired' => ($productsTotalExcludingTax < $minimalPurchase) ? $this->translator->trans( 'A minimum shopping cart total of %amount% (tax excl.) is required to validate your order. Current cart total is %total% (tax excl.).', array( '%amount%' => $this->priceFormatter->format($minimalPurchase), '%total%' => $this->priceFormatter->format($productsTotalExcludingTax), ), 'Shop.Theme.Checkout' ) : As there is a hook that can manipulate the value, check if there is any module attached to "overrideMinimalPurchasePrice" Hook::exec('overrideMinimalPurchasePrice', array( 'minimalPurchase' => &$minimalPurchase, )); Link to comment Share on other sites More sharing options...
mausbaus Posted July 16, 2019 Author Share Posted July 16, 2019 Thank you! It was the "min. purchase total required in order to validate order" from Preferences > Orders. 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