Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

E-Commerce Modules /

Discuss about the various e-commerce modules available:
Ecommerce, SS Shop, SilverCart and SwipeStripe
Alternatively, have a look the shared mailinglist.

Moderators: martimiz, Nicolaas, Sean, Ed, frankmullenger, biapar, Willr, Ingo, Jedateach, swaiba

[SOLVED] Error on checkout/OrderForm : Object of class Money could not be converted to double


Go to End


2 Posts   1309 Views

Avatar
biapar

Forum Moderator, 435 Posts

3 June 2010 at 9:00am

Edited: 09/06/2010 7:53am

Error on checkout/OrderForm : Object of class Money could not be converted to double

POST /PhPSites/ss240/checkout/OrderForm
Line 2112 in C:\xampp\htdocs\ss240\sapphire\core\model\DataObject.php

Source
2103
2104 $defaults = $this->stat('defaults');
2105 // if a field is not existing or has strictly changed
2106 if(!isset($this->record[$fieldName]) || $this->record[$fieldName] !== $val) {
2107 // TODO Add check for php-level defaults which are not set in the db
2108 // TODO Add check for hidden input-fields (readonly) which are not set in the db
2109 // At the very least, the type has changed
2110 $this->changed[$fieldName] = 1;
2111
2112 if((!isset($this->record[$fieldName]) && $val) || (isset($this->record[$fieldName]) && $this->record[$fieldName] != $val)) {
2113 // Value has changed as well, not just the type
2114 $this->changed[$fieldName] = 2;
2115 }
2116
2117 // value is always saved back when strict check succeeds
2118 $this->record[$fieldName] = $val;

Why?

Avatar
biapar

Forum Moderator, 435 Posts

9 June 2010 at 7:52am

Solved with last trunk