Turbo-CMS / TurboShop

TurboCMS Shop is an open source PHP-based online e-commerce solution.
GNU General Public License v3.0
5 stars 5 forks source link

currencies #9

Open Ang8r2 opened 3 months ago

Ang8r2 commented 3 months ago

When I try to add a currency and disable an existing one, I get a critical error. The attempt to return to the previous state did not lead to success - switching to the default jibmre template does not eliminate

Fatal error: Uncaught DivisionByZeroError: Division by zero in /home/admin/web/site/public_html/api/Variants.php:74 Stack trace: #0 /home/admin/web/site/public_html/view/View.php(552): Variants->getVariants() #1 /home/admin/web/site/public_html/vendor/smarty/smarty/src/FunctionHandler/BCPluginWrapper.php(18): View->getBrowsedProductsPlugin() #2 /home/admin/web/site/public_html/compiled/default/6a350f75a257e8342d2cfef4b3f82934e996becc_0.file_index.tpl.php(557): Smarty\FunctionHandler\BCPluginWrapper->handle() #3 /home/admin/web/site/public_html/vendor/smarty/smarty/src/Template/GeneratedPhpFile.php(111): content_66a6028a2a95f6_13481293() #4 /home/admin/web/site/public_html/vendor/smarty/smarty/src/Template/Compiled.php(110): Smarty\Template\GeneratedPhpFile->getRenderedTemplateCode() #5 /home/admin/web/site/public_html/vendor/smarty/smarty/src/Template.php(180): Smarty\Template\Compiled->render() #6 /home/admin/web/site/public_html/vendor/smarty/smarty/src/Template.php(655): Smarty\Template->render() #7 /home/admin/web/site/public_html/vendor/smarty/smarty/src/Template.php(589): Smarty\Template->_execute() #8 /home/admin/web/site/public_html/vendor/smarty/smarty/src/Smarty.php(2121): Smarty\Template->fetch() #9 /home/admin/web/site/public_html/api/Design.php(94): Smarty\Smarty->fetch() #10 /home/admin/web/site/public_html/view/IndexView.php(218): Design->fetch() #11 /home/admin/web/site/public_html/index.php(27): IndexView->fetch() #12 {main} thrown in /home/admin/web/site/public_html/api/Variants.php on line 74

Turbo-CMS commented 3 months ago

First, add a new currency, and to make it the main one, drag it to the top.