Topic: Possible bug? getting 2 orders (1 more then normal) (Read 1328 times)
Bill Cosby is my Father
Posts: 4
32 credits Members referred : 0
« on: Aug 15, 2006, 04:42:10 pm »
I did a test run of your code and adding me as a customer (id =1). There maybe a bug.
Any table with example as part of it's name i removed example from the name when I created the tables and edited the php accordingly but when I ordered some products (from the new 6 added) the code produced 2 records in db_cart_orders instead of one and the second new record had a default value for the processed_on column (the first record was OK).
Thanks for your time.
« Last Edit: Aug 15, 2006, 05:37:01 pm by olaf »
Moderator Community Supporter?
Jedai Sword Master
Gender:
Posts: 6691
34714 credits Members referred : 374
It's time to use PHP5!
Re: Possible bug
« Reply #1 on: Aug 15, 2006, 05:24:14 pm »
If you use the cart without a customer database you need to replace the variables between the brackets:
new db_cart(123)
with some number, use the same number on all example pages (think that these are different somewhere)
Bill Cosby is my Father
Posts: 4
32 credits Members referred : 0
« Reply #2 on: Aug 15, 2006, 05:30:42 pm »
Olaf,
I created the customer as per your example (just dropped the word example from the table names) and edited the word example out of the php files. Your code referred to cust_no of 1 (which I am in the customer table) so do we still have a bug?
Thanks
Moderator Community Supporter?
Jedai Sword Master
Gender:
Posts: 6691
34714 credits Members referred : 374
It's time to use PHP5!
« Reply #3 on: Aug 15, 2006, 05:34:59 pm »
don't use a customer table is you don't use a customer id.
I modified my application: db_cart_example.php $myCart = new db_cart(8000);
db_cart_continue.php $myCart = new db_cart(8000);
and db_cart_checkout_example.php $myCheckout = new db_cart(8000);
then I ordered two times some example products and processed them, then I checked the database and in the order table are two records (both for customer 8000)
Trackback URI for this entry : http://www.webdigity.com/trackback.php?topic=3687