noesac Posted July 28, 2010 Share Posted July 28, 2010 I've had a very unusual bug that I have only just managed to fix after many months.I thought I would share this in case anyone else comes across something similar in the future.Anyway for a while now, my shopping cart would automatically empty itself for a lot of existing customers (when trying to checkout).Secondly, some customers also received a "birthday is invalid" message, even if A) the birthday field was not filled out, it was filled out correctly, or C) even if the whole field was disabled!Because both problems occurred in the shopping cart I always assumed it was the same bug causing this, but after examining the 'ps_customer' table, it turns out it was two separate problems.Firstly I found a common pattern between users that experienced this auto-emptying cart issue and users that did not. Users that got this issue had "0" in the deleted column! The Back Office doesn't allow you to delete customers, so I suspect this has to do with me adding $this->delete = true; to the AdminOrders.php page, so that I could delete test orders. Secondly, users with the "birthday is invalid" error had a birthday of "0000-00-00", while everyone else had "NULL". How did some customer records get into this state? My theory is that "0000-00-00" is added by default if no birthday is entered. HOWEVER, the OnePageCheckout module (which I installed a few months after I started), inserts "NULL" in the same situation. My theory is that the OnePageCheckout module looks for "NULL" but finds "0000-00-00" which causes it to display the error incorrectly. Anyway both these scenarios - deleting test orders (which I got from a popular thread on this forum) and the OnePageCheckout mods - are very popular so I'm surprised no one else has come across these issues? I have since fixed the data and run many tests which seem to confirm my theories, but I would be curious to see if anyone more technically minded than myself might be able to confirm if I am correct.Cheers Link to comment Share on other sites More sharing options...
zelarg Posted July 30, 2010 Share Posted July 30, 2010 My theory is that "0000-00-00" is added by default if no birthday is entered. Hi,As for this problem, AFAIK the NULL value should be inserted to DB anytime there is no birthday selected, no matter if one page checkout module is installed or not. Database related operation on customer table are encapsulated in Customer class and modules are normally just using Presta's API (or better said - core classes methods) to work with customer data. Link to comment Share on other sites More sharing options...
noesac Posted July 30, 2010 Author Share Posted July 30, 2010 Thanks for the feedback. Any idea how those customer records ended up in that state? It's still quite a mystery to me! Link to comment Share on other sites More sharing options...
jeepsterdk Posted January 20, 2011 Share Posted January 20, 2011 Noesac: How did you fix this problem? I have the same problem. It says "01. birthday is invalid". what to do? Link to comment Share on other sites More sharing options...
noesac Posted January 20, 2011 Author Share Posted January 20, 2011 Did you install the customer delete mod? That's what caused it. Just to and reenable your customer by changing the deleted flag from 1 back to 0 (ps_customer table). Or create a new customer account when doing your testing. Link to comment Share on other sites More sharing options...
jeepsterdk Posted January 21, 2011 Share Posted January 21, 2011 No, I have not installed customer delete mod....what could be the problem. All customers are set "active" in ps_customer Link to comment Share on other sites More sharing options...
noesac Posted January 21, 2011 Author Share Posted January 21, 2011 Hi it's not the active flag, it's the "deleted" flag (the next one to the right). Can you check that to see if any of them are set to 1? Link to comment Share on other sites More sharing options...
jeepsterdk Posted January 22, 2011 Share Posted January 22, 2011 Hi it's not the active flag, it's the "deleted" flag (the next one to the right). Can you check that to see if any of them are set to 1? I can not find that column. I am using 1.2.5. What version are you using? Link to comment Share on other sites More sharing options...
noesac Posted January 22, 2011 Author Share Posted January 22, 2011 It's definitely in 1.2.5 because I used to have that, go to the ps_customer table, right at the end. Link to comment Share on other sites More sharing options...
jeepsterdk Posted January 23, 2011 Share Posted January 23, 2011 Ok, I checked ps_customer. All, except one, customer are set to "0" in the "deleted" column Link to comment Share on other sites More sharing options...
noesac Posted January 23, 2011 Author Share Posted January 23, 2011 Ok, is the one that was set to 1 the customer you were testing with (and seeing the birthday error with)? Link to comment Share on other sites More sharing options...
jeepsterdk Posted January 23, 2011 Share Posted January 23, 2011 No, the customer I was testing with was sert to 0 Link to comment Share on other sites More sharing options...
noesac Posted January 23, 2011 Author Share Posted January 23, 2011 Ok can you run another test using a ***brand new*** customer, and make sure his email address is definitely new (not in your ps_customer) database. I'll help you isolate the problem. I suspect it is existing bad data that is causing this. Link to comment Share on other sites More sharing options...
jeepsterdk Posted January 23, 2011 Share Posted January 23, 2011 I created a new customer and tried to check out. Then I just get pushed back to the main page like nothing happened.... Link to comment Share on other sites More sharing options...
noesac Posted January 23, 2011 Author Share Posted January 23, 2011 can you post or PM me a link to your site or test site? I'll take a look. Unfortunately if it's not exactly the same problem I encountered I'm not sure if I will be able to help you much as I'm not a very technical person! It took weeks of investigation to find my issue Link to comment Share on other sites More sharing options...
jeepsterdk Posted January 23, 2011 Share Posted January 23, 2011 It is www.jeepster.dk Link to comment Share on other sites More sharing options...
noesac Posted January 23, 2011 Author Share Posted January 23, 2011 I just tried to place an order and it was successful. Link to comment Share on other sites More sharing options...
jeepsterdk Posted January 23, 2011 Share Posted January 23, 2011 Thank you for trying. It seems to be working now. I uninstalled OnePagecheckout and re-uploaded all involved files. I do however still have a problem. It is a "left-over" from OPC I think. I think you can see it here:http://www.jeepster.dk/authentication.php?back=order.php?step=1Why is there a "hurtig ekspedition" box? It seems as though there is no use for it Link to comment Share on other sites More sharing options...
jeepsterdk Posted January 23, 2011 Share Posted January 23, 2011 Well, sorted out the last problem too. I had to clear all files in "compile" and now it works flawlessly. But the second I install OPC, it doesn't work. Anyone know of a better fast checkout module? Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now