I recently had a program written in php for e-commerce, but there seems to be a problem with the posting of the cart id to the SQL table. The designer is no longer available for questions, so I had hoped to get some help here. I have a brief knowledge of php, but just cant seem to track the problem down. There are two tables used for the cart:
store_shopping_cart and
store_shopping_cart_items
Everything works fine until you try to add an item to the cart. It tries to enter a null value into store_shopping_cart_items for the column shopping_cart_id
The shopping cart obviously cannot be null or there could be major confusion between different customers.
I know you need more information and to look at the code to give me an answer, but there are many dependent php files (classes.php,common.php, etc.) I didn't want to post them all here and waste a bunch of space.
Could some1 contact me and help me track this problem down? I'd like to get the site up and working asap because its a much better design than our current site.
Thanks
Timmy
TimmyC@5thavenuebling.com
Shopping Cart malfuction
Started by TimmyC, Feb 02 2007 06:15 PM
1 reply to this topic
#1
Posted 02 February 2007 - 06:15 PM
#2
Posted 03 February 2007 - 03:50 PM
I would only be concerned about the line that actually executes the SQL command to insert the database when adding an item to the cart.
If you can track that down and match it's structure to how the database table is set up, I bet you could even spot the problem yourself.
I'm guessing it isn't inserting a variable correctly, or it is simply inserting a 'NULL' value, having dependency on the fact that the column may have an auto_increment property.
Just double check the SQL and the database structure and you should be able to either figure it out on your own, or at least give more information on your problem.
If you can track that down and match it's structure to how the database table is set up, I bet you could even spot the problem yourself.
I'm guessing it isn't inserting a variable correctly, or it is simply inserting a 'NULL' value, having dependency on the fact that the column may have an auto_increment property.
Just double check the SQL and the database structure and you should be able to either figure it out on your own, or at least give more information on your problem.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users
