Jump to content

Default value orders_statue_history

Recommended Posts

I am currently going through the process of moving an OSCommerce 2.3.4 website from a php 5 server to a PHP 7.4 server. Boss wants it doing even though ideally it should be written with a newer version of OSC. Nearly finished updating and now going through the checkout pages. Having an issue on checkout_process.php. The order process is fine until I click confirm order and then I get this error:

1364 - Field 'Sp_Status' doesn't have a default value

insert into orders_status_history (orders_id, orders_status_id, date_added, customer_notified, comments) values ('464786', '1', now(), '1', '')

A bit more information:

The live website uses Sage-Pay as a payment module so I thought I would use the standard pay on delivery module as a test to see if the checkout is working and then I can clear any errors with Sage-Pay once I go live. Having looked at the above error, I think I understand it to mean the query can't insert the field 'Sp_Status' as there is no value given for it. I tried looking for any reference for the field and values needed but I can't find any. I've also tried setting a default value in the table but it still doesn't fix the issue. Any ideas on what may be causing this? This appears to be the only issue I'm having (fingers crossed). Thanks.

Ah, the world wide web. What a wonderful place.

Share this post

Link to post
Share on other sites

@freakystreakAsk your host to disable strict mode in mysql or edit the database and add a default value for that field.

Share this post

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now