lnilni Posted January 7, 2009 Share Posted January 7, 2009 I did my first installation of the latest version: oscommerce-2.2rc2a And I get this error all over the website: Call to undefined method currencies::calculate_price() Especially the one in the right shopping-cart view is unbearable: currencies::calculate_price() in /usr/home/web/web2626/oscommerce/catalog/includes/classes/shopping_cart.php on line 272 I'm not trying anything fancy, just a basic installation - Please help Link to comment Share on other sites More sharing options...
Guest Posted January 7, 2009 Share Posted January 7, 2009 I did my first installation of the latest version: oscommerce-2.2rc2a And I get this error all over the website: Call to undefined method currencies::calculate_price() Especially the one in the right shopping-cart view is unbearable: currencies::calculate_price() in /usr/home/web/web2626/oscommerce/catalog/includes/classes/shopping_cart.php on line 272 I'm not trying anything fancy, just a basic installation - Please help did you do anything that could affect currencies? Link to comment Share on other sites More sharing options...
lnilni Posted January 7, 2009 Author Share Posted January 7, 2009 I did just a basic installation - very strange indeed ! Anyway I found a solution elsewhere: in file /catalog/includes/classes/curriencies.php add this function: function calculate_price($products_price, $products_tax, $quantity = 1) { global $currency; $currency = $_SESSION['currency']; return tep_round(tep_add_tax($products_price, $products_tax), $this->currencies[$currency]['decimal_places']) * $quantity; } inside the class - And it worked :D Link to comment Share on other sites More sharing options...
Guest Posted January 7, 2009 Share Posted January 7, 2009 The basic installation of RC2a does not produce errors on its own. The default says function calculate_price($products_price, $products_tax, $quantity = 1) { global $currency; return tep_round(tep_add_tax($products_price, $products_tax), $this->currencies[$currency]['decimal_places']) * $quantity; } Where did you get the solution? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.