TomatoCart

TomatoCart Community
Welcome, Guest
Please Login or Register.    Lost Password?

Warning: number_format() expects parameter 1 to be double, string given in...
(1 viewing) (1) Guest
Go to bottomPage: 1
TOPIC: Warning: number_format() expects parameter 1 to be double, string given in...
*
#12649
Warning: number_format() expects parameter 1 to be double, string given in... 3 Years, 3 Months ago Karma: 0
Hello people:

Images attached error. I have defined 2 coins, dollar and Argentine pesos. the problem is when I select the currency to the Argentine peso from the client side, which does not occur when selecting dollar.



any idea how to fix this error?


this is the function:
function displayRawPrice($number, $currency_code = '') {
global $osC_Language;

if (empty($currency_code) || ($this->exists($currency_code) == false)) {
$currency_code = (isset($_SESSION['currency']) ? $_SESSION['currency'] : DEFAULT_CURRENCY);
}

return $this->currencies[$currency_code]['symbol_left'] . number_format(osc_round($number, $this->currencies[$currency_code]['decimal_places']), $this->currencies[$currency_code]['decimal_places'], $osC_Language->getNumericDecimalSeparator(), $osC_Language->getNumericThousandsSeparator()) . $this->currencies[$currency_code]['symbol_right'];
}


and this is de line 108:

return $this->currencies[$currency_code]['symbol_left'] . number_format(osc_round($number, $this->currencies[$currency_code]['decimal_places']), $this->currencies[$currency_code]['decimal_places'], $osC_Language->getNumericDecimalSeparator(), $osC_Language->getNumericThousandsSeparator()) . $this->currencies[$currency_code]['symbol_right'];
santo_pendorcho
Fresh Boarder
Posts: 10
graphgraph
User Offline Click here to see the profile of this user
Last Edit: 2011/05/08 22:11 By santo_pendorcho.
The administrator has disabled public write access.
 
#12722
Re: Warning: number_format() expects parameter 1 to be double, string given in... 3 Years, 3 Months ago Karma: 0
is not a bug in the core, "is" and "is not" a failure in one module boxes "shop by price" ... price interval configuration (Price SEPARATED by ";").

to disable this module are removed from the database -> configuration table all configuration_key: "BOX_SHOP_BY_PRICE_% currency%" and then re-enable this module is inserted the configurations keys in "table configuration" but price interval is set in empty string (configuration_value in the table configuration on database).
santo_pendorcho
Fresh Boarder
Posts: 10
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#15898
Re:Warning: number_format() expects parameter 1 to be double, string given in... 2 Years, 10 Months ago Karma: 1
go to the language & set the currency in the language.
now go to template module boxes>>shop by price>> type 500;1000;5000;10000;20000
it works.
ashishpatel
Ashish
Fresh Boarder
Posts: 12
graphgraph
User Offline Click here to see the profile of this user
Gender: Male ashishpatel.1992 Location: India Birthday: 07/02
Ashish
The administrator has disabled public write access.
 
Go to top Page: 1
Moderators: creativegenius

Latest Blog Post

TomatoCart v1.1.7 to v1.1.8 Upgrade Guide!

The upgrade guide is a step-by-step tutorial to help users to upgrade TomatoCart v1.1.7 to v1.1.8. If you have not yet updated to v1.1.7, please review its upgrade guide before applying these changes. [...]

By TomatoCart | august 21, 2012

contact_us

info@tomatocart.com
partner@tomatocart.com
Facebook Google+ Linkedin Twitter

Newsletter Subscription

Fork us on GitHub