Jump to:

2082 Posts in 1002 Topics by 452 members

E-Commerce Modules

SilverStripe Forums » E-Commerce Modules » [SOLVED] Error on checkout/OrderForm : Object of class Money could not be converted to double

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, frankmullenger, biapar, Willr, Ingo, Jedateach, swaiba, simon_w

Page: 1
Go to End
Author Topic: 787 Views
  • biapar
    Avatar
    Forum Moderator
    435 Posts

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

    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?

  • biapar
    Avatar
    Forum Moderator
    435 Posts
    787 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.