oriolroca Posted December 28, 2009 Share Posted December 28, 2009 Hi,I've just installed Prestashop and everything seems to work fine but for the checkout process.Whenever I try cheking out I get a final "Order creation failed" error.I've inserted the recommended line Tools::dieObject($order) in PaymentModule.php and this is what I got:Order Object( [id_address_delivery] => 3 [id_address_invoice] => 3 [id_cart] => 2 [id_currency] => 2 [id_lang] => 1 [id_customer] => 2 [id_carrier] => 5 [secure_key] => cf7b29ed7fc8919d1f45ddf84ddb46b6 [payment] => Cheque [module] => cheque [recyclable] => 1 [gift] => 0 [gift_message] => [shipping_number] => [total_discounts] => 0 [total_paid] => 31 [total_paid_real] => 31 [total_products] => 24 [total_shipping] => 7 [total_wrapping] => 0 [invoice_number] => [delivery_number] => [invoice_date] => [delivery_date] => [valid] => [date_add] => 2009-12-28 11:51:29 [date_upd] => 2009-12-28 11:51:29 [tables:protected] => Array ( [0] => orders ) [fieldsRequired:protected] => Array ( [0] => id_address_delivery [1] => id_address_invoice [2] => id_cart [3] => id_currency [4] => id_lang [5] => id_customer [6] => id_carrier [7] => payment [8] => total_paid [9] => total_paid_real [10] => total_products ) [fieldsSize:protected] => Array ( [payment] => 32 ) [fieldsValidate:protected] => Array ( [id_address_delivery] => isUnsignedId [id_address_invoice] => isUnsignedId [id_cart] => isUnsignedId [id_currency] => isUnsignedId [id_lang] => isUnsignedId [id_customer] => isUnsignedId [id_carrier] => isUnsignedId [secure_key] => isMd5 [payment] => isGenericName [recyclable] => isBool [gift] => isBool [gift_message] => isMessage [total_discounts] => isPrice [total_paid] => isPrice [total_paid_real] => isPrice [total_products] => isPrice [total_shipping] => isPrice [total_wrapping] => isPrice [shipping_number] => isUrl ) [table:protected] => orders [identifier:protected] => id_order [id] => [fieldsRequiredLang:protected] => Array ( ) [fieldsSizeLang:protected] => Array ( ) [fieldsValidateLang:protected] => Array ( ))ENDCould anyone tell me what is wrong in the order data or simply how to proceed from here?ThanksOriol Link to comment Share on other sites More sharing options...
Om Posted January 9, 2010 Share Posted January 9, 2010 Bump! - Hi first time user and have just finished configuring my site. Am running 1.2.5 and i'm getting the same problem:Order Object( [id_address_delivery] => 5 [id_address_invoice] => 5 [id_cart] => 8 [id_currency] => 3 [id_lang] => 1 [id_customer] => 4 [id_carrier] => 3 [secure_key] => ed7f0445cbf384efbec43e7cf167aed1 [payment] => Cash on delivery (COD) [module] => cashondelivery [recyclable] => 0 [gift] => 0 [gift_message] => [shipping_number] => [total_discounts] => 0 [total_paid] => 17 [total_paid_real] => 17 [total_products] => 10 [total_shipping] => 7 [total_wrapping] => 0 [invoice_number] => [delivery_number] => [invoice_date] => [delivery_date] => [valid] => [date_add] => 2010-01-09 19:18:36 [date_upd] => 2010-01-09 19:18:36 [tables:protected] => Array ( [0] => orders ) [fieldsRequired:protected] => Array ( [0] => id_address_delivery [1] => id_address_invoice [2] => id_cart [3] => id_currency [4] => id_lang [5] => id_customer [6] => id_carrier [7] => payment [8] => total_paid [9] => total_paid_real [10] => total_products ) [fieldsSize:protected] => Array ( [payment] => 32 ) [fieldsValidate:protected] => Array ( [id_address_delivery] => isUnsignedId [id_address_invoice] => isUnsignedId [id_cart] => isUnsignedId [id_currency] => isUnsignedId [id_lang] => isUnsignedId [id_customer] => isUnsignedId [id_carrier] => isUnsignedId [secure_key] => isMd5 [payment] => isGenericName [recyclable] => isBool [gift] => isBool [gift_message] => isMessage [total_discounts] => isPrice [total_paid] => isPrice [total_paid_real] => isPrice [total_products] => isPrice [total_shipping] => isPrice [total_wrapping] => isPrice [shipping_number] => isUrl ) [table:protected] => orders [identifier:protected] => id_order [id] => [fieldsRequiredLang:protected] => Array ( ) [fieldsSizeLang:protected] => Array ( ) [fieldsValidateLang:protected] => Array ( ))END)Just this part left to sort and I'm ready to go. Any help you guys can provide would be really appreciated.*Edit* - i've tried uninstalling and reinstalling all payment methods. I'll cross the paypal/google modules later, but I would expect order creation to work at this stage using just cash or cheques. Link to comment Share on other sites More sharing options...
Om Posted January 11, 2010 Share Posted January 11, 2010 Potential Solution - I've found a resolution to this problem. I recreated my site this time using MySQL4 as my database - this solved the problem.I then tried it again with MySQL5 and encountered the same Order Creation Failed error.So i'm currently running MySQL4 and everything seems to be ok.I'm told by my host (csnewmedia) that we are running the current stable version of MySQL5 - I wonder if anyone has any ideas why this may have a problem with order creation? Link to comment Share on other sites More sharing options...
Fabio Rufino Gallo Posted January 11, 2010 Share Posted January 11, 2010 Hi,I'm getting the same problem. After reading the forum and looking into the code I have come up with a solution...that works for me at least ;-)In /classes/PaymentModule.php, near line #118 (prestashop 1.2.5), replace: // Creating order if ($cart->OrderExists() === 0) $result = $order->add();with: // Creating order if ($cart->OrderExists() === 0) { if(!sizeof($order->invoice_date)) $order->invoice_date = date('Y-m-d H:i:s'); if(!sizeof($order->delivery_date)) $order->delivery_date = date('Y-m-d H:i:s'); $result = $order->add(); }it seems that invoice_date and delivery_date are NULL...Hope this helps Link to comment Share on other sites More sharing options...
baudav Posted February 24, 2010 Share Posted February 24, 2010 pb with MySQL 5.1.40....44can't write '' in date fieldwork with SVN now Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now