Closed thpierce closed 9 years ago
Ok, we are at the point now where the expected date is null; @mikegfink can you look at this? I don't understand your code.
It's still giving errors, but it's moved off of the expected date stuff.. I don't know what's happening in the rest. I get Undefined index cart: in ..... as my error along with cannot update a child row because foreight key constraint fails. @gminaker
can you push your code, and I'll pickup?
I pushed as soon as i changed it. hopefully you picked it up.
Just tested, still not working:
Error: Cannot add or update a child row: a foreign key constraint fails (test
.purchase
, CONSTRAINT purchase_ibfk_1
FOREIGN KEY (p_cid
) REFERENCES customer
(cid
)) at line number 145
Error: This transaction was rolled back
Input:
Also, why is title all weird? And company.
Other than the title column not being wide enough, it works for me.... check the database settings?
That's an issue with your user database I think. Try adding yourself as a user and try again. ie logout login and/or register
This should be working. It works on my computer.
Someone please close when you believe it works on yours.
Works but 2 issues:
Not updating stock (another ticket) Not setting expected date correctly
In what way is it not setting the expected correctly?
Hang on, might have been a problem on my end
Nope. I might be misunderstanding your code, but I don' think it's doing what it's supposed to. We should just count all deliveries that have not been delivered, divide that by 5, round and add that number to today's date to get the right output. In your version, its keeping something stored, and so if I do a bunch of deliveries, and then make a new purchase (with no outstanding purchases) it still expects a delivery date in the future (not today/tomorrow). I'm going to change it.
Done
That’s fine with me. As an explanation: mine was an appropriate interpretation, and other groups used it as well. As an expected delivery date it was just taking the latest expected delivery and assuming we can’t deliver before then. Because if every delivery was done according to the same system, by induction we couldn’t expect to deliver anything earlier than the latest expected date.
From: thpierce [mailto:notifications@github.com] Sent: November-26-14 6:37 PM To: gminaker/databases Cc: Mike Fink Subject: Re: [databases] Cannot Purchase items (#23)
Nope. I might be misunderstanding your code, but I don' think it's doing what it's supposed to. We should just count all deliveries that have not been delivered, divide that by 5, round and add that number to today's date to get the right output. In your version, its keeping something stored, and so if I do a bunch of deliveries, and then make a new purchase (with no outstanding purchases) it still expects a delivery date in the future (not today/tomorrow). I'm going to change it.
— Reply to this email directly or view it on GitHub https://github.com/gminaker/databases/issues/23#issuecomment-64739081 .Image removed by sender.
After adding to cart, can't purchase Also should check vals, credentials, or whatever Display receipt and credit card authentication stuff