Jump to content

Can't save Order at line 268 in file classes/PaymentModule.php


Magnux

Recommended Posts

[PrestaShopException]

Can't save Order

at line 268 in file classes/PaymentModule.php

262.

263.                     // Creating order

264.                     $result = $order->add();

265.

266.                     if (!$result)

267.                         throw new PrestaShopException('Can\'t save Order');

268.

269.                     // Amount paid by customer is not the right one -> Status = payment error

270.                     // We don't use the following condition to avoid the float precision issues : http://www.php.net/manual/en/language.types.float.php

271.                     // if ($order->total_paid != $order->total_paid_real)

272.                     // We use number_format in order to compare two string

cant save order.

post-707505-0-23250100-1380886087_thumb.jpg

Link to comment
Share on other sites

  • 2 months later...
Same problem here. What is strange is, if i copy the cache from the source to the server, it works. When i do a smarty clean and clear all the files (except index.php)in cache/smarty/compile and cache/smarty/cache, then it goes wrong. 

 

In the past i added an extra field in the order class. This is gone now but somehow it still shows up in the order. The ps_orders table does not have this field, so insert fails resulting in the above message :(
Edited by amavis (see edit history)
Link to comment
Share on other sites

I found my problem. In the past i override the classes/Order.php OrderCore class and added 1 property. In my development environment i added this extra field in the database but not in the production. After removing the override everything is working as it should.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...