Jump to content

Orders not being created


Ultim8pc

Recommended Posts

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

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

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

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

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

  • 2 months later...
  • 4 weeks later...

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...