Ultim8pc Posted February 11, 2019 Share Posted February 11, 2019 So, I've just built a new Cubecart site. When you go through the checkout process, everything works as expected and you can successfully make your payment (I'm using Braintree). However, no order is created, but the customers details are all present/created within the 'customer list'. Interrogating the customer details shows no orders. I have noticed that when this occurs there is a entry in the error log which seems to indicate that it's not writing the order details into the database: File: [order.class.php] Line: [1350] "INSERT INTO `cc_CubeCart_order_summary` (`cart_order_id.....LOTS OF DATA RELATED TO ORDER .....');" - Duplicate entry '' for key 'custom_oid_2' I also note that even though the customer has successfully paid there is no corresponding entry in the 'transaction logs'/// I would appreciate any help or thoughts on this.. Thanks in advance. Link to comment Share on other sites More sharing options...
havenswift-hosting Posted February 11, 2019 Share Posted February 11, 2019 What version of CubeCart have you used to build this site ? There were problems with the custom order ID when it was first released but fixes were added but the fact the key is called “custom_oid_2” indicates you may also have database issues Link to comment Share on other sites More sharing options...
Ultim8pc Posted February 11, 2019 Author Share Posted February 11, 2019 Running v6.2.2. I built and configured the site and then tested it. All working OK. Gone live and now have the order issue. Link to comment Share on other sites More sharing options...
bsmither Posted February 11, 2019 Share Posted February 11, 2019 In the table CubeCart_order_summary, there should be a column with the name of "custom_oid" (that recently had its characteristics changed to solve a 'duplicate key' problem). If there is a different column with the name of "custom_oid_2", then it is either mistakenly added, or added for some other purpose. If this other column "custom_oid_2" copied the characteristics of "custom_oid" before "custom_oid" got fixed, then "custom_oid_2", as well, will have 'duplicate key' problems. Please verify that CubeCart_order_summary has a column "custom_oid" (see: https://github.com/cubecart/v6/issues/1987). Also, if "custom_oid_2" is present verify that there is an actual requirement for it, and that it has the same characteristics as "custom_oid". Link to comment Share on other sites More sharing options...
bsmither Posted February 11, 2019 Share Posted February 11, 2019 Research shows that the "custom_oid" fix for the 'duplicate key' problem will not appear until CC623. Please review: https://forums.cubecart.com/topic/54311-new-orders-not-showing-in-the-order-section/ Link to comment Share on other sites More sharing options...
Ultim8pc Posted February 11, 2019 Author Share Posted February 11, 2019 Bsmither, Thanks, I'll try the ALTER TABLE `CubeCart_order_summary` CHANGE `custom_oid` `custom_oid` VARCHAR(50) NULL DEFAULT NULL;' fix and let you know. Just to add that I am puzzled as to how this has happened... Anyway, the custom_oid column is present in the CubeCart_order_summary table. There is no custom_oid2 column. Link to comment Share on other sites More sharing options...
bsmither Posted February 11, 2019 Share Posted February 11, 2019 It could be the case that the database engine was told to create a key/index called 'custom_oid' when there was already a key/index by that name. (Not referring to a column, but an index against that column.) If that was the case (create a KEY when a KEY already exists), then the database engine could have created a second KEY called 'custom_oid_2' instead of issuing a warning or a failure message. (Doing this may be a database engine configuration setting.) So, yes, the column "custom_oid_2" may very well not exist, but there could be a second KEY by that name. If so, then delete that second KEY having the name "custom_oid_2". Link to comment Share on other sites More sharing options...
Ultim8pc Posted February 12, 2019 Author Share Posted February 12, 2019 I understand what you're saying, but why would that database issue occur on a site which has never been modified from stock, uses two basic plug-ins (Braintree and All in one shipping), has never had any code modifications and never had any database operations other than that Cubecart carries out.. I have to say that in my 12 months or so of running Cubecart, I have found it to be exceedingly problematic.. I have used other platforms previously and had no where near as many problems. Link to comment Share on other sites More sharing options...
Ultim8pc Posted May 4, 2019 Author Share Posted May 4, 2019 As a follow up, I simply haven't had the time to do anything further with this.. I'd be willing to pay someone to resolve this issue for me. (Or maybe just take up a month of CC support?). Thanks Link to comment Share on other sites More sharing options...
Ultim8pc Posted May 31, 2019 Author Share Posted May 31, 2019 Carried out the upgrade to 6.2.5 and now the database issue has gone and orders are being created correctly. Looked in the db and there is no now no key called 'custom_oid_2. I can only assume that the upgrade process checks the DB integrity? However I now have some other problems which I will list in another thread. Thanks to everyone for the help/suggestions. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.