lam Posted August 26, 2012 Share Posted August 26, 2012 Hi there, I'm using v1.4.9 with the alt theme, plus a couple of custom modules (inclding one payment module) for my shop. everything works fine until I got the error "Order creation failed" when I tried to validate an order. have tested on both the "bankwire" module and my custom one, neither works. and I have scanned the forum for solution with no luck. it would be highly appreciated if any one can provide some advice. here's my "Tools::dieObject($order)" Order Object ( [id_address_delivery] => 5 [id_address_invoice] => 5 [id_cart] => 36 [id_currency] => 4 [id_lang] => 7 [id_customer] => 2 [id_carrier] => 7 [secure_key] => 1d240f2b25c76dd54eea913de37585a2 [payment] => 银行电汇 [module] => bankwire [conversion_rate] => 1.000000 [recyclable] => 0 [gift] => 0 [gift_message] => [shipping_number] => [total_discounts] => 0 [total_paid] => 205 [total_paid_real] => 205 [total_products] => 95 [total_products_wt] => 95 [total_shipping] => 110 [carrier_tax_rate] => 0 [total_wrapping] => 0 [invoice_number] => [delivery_number] => [invoice_date] => 0000-00-00 00:00:00 [delivery_date] => 0000-00-00 00:00:00 [valid] => [date_add] => 2012-08-26 21:26:33 [date_upd] => 2012-08-26 21:26:33 [tables:protected] => Array ( [0] => orders ) [fieldsRequired:protected] => Array ( [0] => conversion_rate [1] => id_address_delivery [2] => id_address_invoice [3] => id_cart [4] => id_currency [5] => id_lang [6] => id_customer [7] => id_carrier [8] => payment [9] => total_paid [10] => total_paid_real [11] => total_products [12] => total_products_wt ) [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_products_wt] => isPrice [total_shipping] => isPrice [carrier_tax_rate] => isFloat [total_wrapping] => isPrice [shipping_number] => isUrl [conversion_rate] => isFloat ) [webserviceParameters:protected] => Array ( [objectMethods] => Array ( [add] => addWs ) [objectNodeName] => order [objectsNodeName] => orders [fields] => Array ( [id_address_delivery] => Array ( [xlink_resource] => addresses ) [id_address_invoice] => Array ( [xlink_resource] => addresses ) [id_cart] => Array ( [xlink_resource] => carts ) [id_currency] => Array ( [xlink_resource] => currencies ) [id_lang] => Array ( [xlink_resource] => languages ) [id_customer] => Array ( [xlink_resource] => customers ) [id_carrier] => Array ( [xlink_resource] => carriers ) [module] => Array ( [required] => 1 ) [invoice_number] => Array ( ) [invoice_date] => Array ( ) [delivery_number] => Array ( ) [delivery_date] => Array ( ) [valid] => Array ( ) [current_state] => Array ( [getter] => getCurrentState [setter] => setCurrentState [xlink_resource] => order_states ) ) [associations] => Array ( [order_rows] => Array ( [resource] => order_row [setter] => [virtual_entity] => 1 [fields] => Array ( [id] => Array ( ) [product_id] => Array ( [required] => 1 ) [product_attribute_id] => Array ( [required] => 1 ) [product_quantity] => Array ( [required] => 1 ) [product_name] => Array ( [setter] => ) [product_price] => Array ( [setter] => ) ) ) ) ) [table:protected] => orders [identifier:protected] => id_order [_taxCalculationMethod:protected] => 0 [id] => [fieldsSize:protected] => Array ( ) [fieldsRequiredLang:protected] => Array ( ) [fieldsSizeLang:protected] => Array ( ) [fieldsValidateLang:protected] => Array ( ) [image_dir:protected] => [image_format:protected] => jpg ) END Link to comment Share on other sites More sharing options...
shokinro Posted August 26, 2012 Share Posted August 26, 2012 Have you tried other payment modules like Cheque? If it fails on all payment modules, then issue might be on Order. Otherwise, most cases the issue is the payment module Bank wire and the module you customized. Try to set "display_errors" to 'on' in file /config/config.inc.php to see if there is any error displayed that will give you some hints. Link to comment Share on other sites More sharing options...
lam Posted August 27, 2012 Author Share Posted August 27, 2012 Have you tried other payment modules like Cheque? If it fails on all payment modules, then issue might be on Order. Otherwise, most cases the issue is the payment module Bank wire and the module you customized. Try to set "display_errors" to 'on' in file /config/config.inc.php to see if there is any error displayed that will give you some hints. Thank you shokinro. I tried the validating orders using the Cheque module as well, same error. So I would assume it's not module specific. Setting "display_errors" to 'on' in file /config/config.inc.php doesn't give me much help. If Order is the issue, how you think I should debug? thanks again. Link to comment Share on other sites More sharing options...
shokinro Posted August 27, 2012 Share Posted August 27, 2012 I just downloaded the latest version and installed it and made simple test. Everything seems working fine. I tried both bank wire and cheque. I guess your custom module break the system if your modules has a Hook to new orders. Try to uninstall the custom modules and try again to see if the issue still persists. Or you can install a brand new empty store and start from there, try to figure out which module break the system By the way, you have tried to set "display_errors" to "on" to see any detailed errors? Link to comment Share on other sites More sharing options...
lam Posted August 28, 2012 Author Share Posted August 28, 2012 I just downloaded the latest version and installed it and made simple test. Everything seems working fine. I tried both bank wire and cheque. I guess your custom module break the system if your modules has a Hook to new orders. Try to uninstall the custom modules and try again to see if the issue still persists. Or you can install a brand new empty store and start from there, try to figure out which module break the system By the way, you have tried to set "display_errors" to "on" to see any detailed errors? I uninstall almost all modules and it still gives me the error. After I turn the "display_errors" to "on", I had: Notice: Undefined index: HOOK_CENTER_COLUMN in E:\Project Web\xampp-win32-1.8.0-VC9\htdocs\prestashop\tools\smarty\compile\7c7e8e4b1ef726e0ff0e83858774eef758bd092b.file.header.tpl.php on line 148 Notice: Trying to get property of non-object in E:\Project Web\xampp-win32-1.8.0-VC9\htdocs\prestashop\tools\smarty\compile\7c7e8e4b1ef726e0ff0e83858774eef758bd092b.file.header.tpl.php on line 148 I had a look at that file, line 148 is: <?php echo $_smarty_tpl->tpl_vars['HOOK_CENTER_COLUMN']->value;?> Really don't want to start from scratch as I already had many products entered, and it would take me forever to redo the whole thing. So I really appreciate your help. Link to comment Share on other sites More sharing options...
musicmaster Posted August 29, 2012 Share Posted August 29, 2012 http://forge.prestashop.com/browse/PSCFI-2028 http://forge.prestashop.com/browse/PSCFI-5214 1 Link to comment Share on other sites More sharing options...
lam Posted August 30, 2012 Author Share Posted August 30, 2012 http://forge.prestas...owse/PSCFI-2028 http://forge.prestas...owse/PSCFI-5214 thank you musicmaster. that explains the smarty error message, but do you think it also relates to the "order creation failed" error? I tried upgrading with all the custom module disabled and uninstalled, and still get "order creation failed", would it be mysql's problem? I tried define('_PS_DEBUG_SQL_', true); in config.inc.php and define('_PS_MODE_DEV_', true); in defines.inc.php but couldn't get any mysql error message. Link to comment Share on other sites More sharing options...
PS User Posted October 13, 2012 Share Posted October 13, 2012 According to my PrestaShop Bible (my Troubleshooting Guide), it is the database structure error, please follow the steps below, make sure oyu have phpMyAdmin installed before continue. Solving Order creation failed error message You must have phpMyAdmin install under PrestaShop and access it through a web browser. Select the database that is belonging to the shop that displays such error. Find ps_orders on your left-hand panel and click once. Select Structure link on the top of the right-hand panel. And find #9 reference and click the link Change. Check the selection Null and click Save. That should do the trick! Link to comment Share on other sites More sharing options...
jhnstcks Posted October 13, 2012 Share Posted October 13, 2012 Please don't spam the forum with the exact same question in 4 different posts, within 2 minutes of each other. The other posts have been deleted and I have left this one, for the moment. Anymore breaches of the forum rules could lead to a ban or suspension of your account. You can read the forum rules ---->here Link to comment Share on other sites More sharing options...
musicmaster Posted October 14, 2012 Share Posted October 14, 2012 iam, did you change your config.inc.php? @ini_set('display_errors', 'on'); define('_PS_DEBUG_SQL_', true); Link to comment Share on other sites More sharing options...
lam Posted October 14, 2012 Author Share Posted October 14, 2012 iam, did you change your config.inc.php? @ini_set('display_errors', 'on'); define('_PS_DEBUG_SQL_', true); Yes I did. Never mind, I'm migrating to 1.5 Link to comment Share on other sites More sharing options...
lam Posted October 16, 2012 Author Share Posted October 16, 2012 According to my PrestaShop Bible (my Troubleshooting Guide), it is the database structure error, please follow the steps below, make sure oyu have phpMyAdmin installed before continue. Solving Order creation failed error message You must have phpMyAdmin install under PrestaShop and access it through a web browser. Select the database that is belonging to the shop that displays such error. Find ps_orders on your left-hand panel and click once. Select Structure link on the top of the right-hand panel. And find #9 reference and click the link Change. Check the selection Null and click Save. That should do the trick! not quite sure about step 4, which field exactly are we talking about? Here's what i've got 1 Link to comment Share on other sites More sharing options...
Recommended Posts