Page 1 of 1

Error After create User

Posted: Tue Sep 25, 2007 3:37 am
by derwydd
This is what I get after I try to add a user.

eStore/index.php?controller=account_create


Error: Field 'cart' doesn't have a default value
Error No: 1364
insert into customer set firstname = 'dfff', lastname = 'dfff', email = 'ecomrms@rms-electric.com', telephone = '2222222222', fax = '', password = '0f8e77efbd7e1a4d4e3a069d84789fd2', newsletter = '0', status = '1', date_added = now()

What happened?

Re: Error After create User

Posted: Tue Sep 25, 2007 3:43 am
by derwydd
I set cart to NULL Instead of Not Null

This kind of seemed to fix the problem.

Is there a way to turn off error messages?

Re: Error After create User

Posted: Tue Sep 25, 2007 4:46 am
by Daniel
I have fixed this bug and it will be in the next release.

Re: Error After create User

Posted: Tue Sep 25, 2007 5:30 am
by derwydd
Thank you,

With new releases can I just copy files over each other to update or would I have to start from scratch...

Re: Error After create User

Posted: Thu Sep 27, 2007 5:50 am
by Daniel
I wil work on an update script this time.

Re: Error After create User

Posted: Thu Sep 27, 2007 6:01 am
by derwydd
Well I can't really update now. I had to do nasty hacks to make it do some stuff. Can you tell me what is changed, maybe in a change log, and I can do it manually.

Thanks

Re: Error After create User

Posted: Thu Sep 27, 2007 10:10 am
by d77
i can't say i've done any "nasty hacks" ;D, but i have made a few minor changes to the core opencart code to fix small issues. the best advice i can give is to carefully keep track of what files you change. every change i've made, i have documented for myself as a mini "mod" so i can re-apply it to a new version. a database upgrade script is going to help loads as this is the most critical piece when we're talking about beginning to load live data into the shop.

Re: Error After create User

Posted: Thu Sep 27, 2007 9:29 pm
by derwydd
OK I guess I will have to do a test server then transfer when successful. OHH, When I do new upgrades, can I keep the old DB inpace with all the data? Or do I have to start from scratch?

Re: Error After create User

Posted: Fri Sep 28, 2007 12:23 am
by d77
the update script daniel is talking about will upgrade your database so you don't have to re-enter data.

if this is a live shop, i would recommend creating a copy of your entire site (both database and code), upgrading that, then move it in place of the old shop once everything is working. that way you will always have a fall-back copy of your data.

Re: Error After create User

Posted: Thu Mar 13, 2008 12:09 pm
by brucehu
Yes,I also have a same problem,how solve? thanks

Re: Error After create User

Posted: Thu Mar 13, 2008 9:38 pm
by derwydd
See if this works:

Go to customers table, find cart field. Set "cart" field to NULL.

This field is originally set to not null. So if you are starting the cart from scratch and don't haveĀ  the sample data anymore, you will then get this error.
Basically PHP Tells you want to do in the error messages.

Good Luck