28, May 2012

Possible bug? getting 2 orders (1 more then normal) - webmaster forum

 
Webdigity webmaster forums
[ Home | Help | Search | Forum's Shop | Archive | Login | Register | Webmaster Directory ]
Webdigity Webmaster Forums  >  Web Development  >  PhP  >  PHP classes @finalwebsites.com  >  DB_cart Class (Moderator: Olaf)
Topic: Possible bug? getting 2 orders (1 more then normal)
« previous next »
Pages: [1] Print
Instabuck - The easy way to sell digital products online

Author 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: Male
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: Male
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
Tags : php databases Bookmark this thread : Digg Del.icio.us Dzone more....

Pages: [1] Print 
Webdigity Webmaster Forums  >  Web Development  >  PhP  >  PHP classes @finalwebsites.com  >  DB_cart Class (Moderator: Olaf)
Topic: Possible bug? getting 2 orders (1 more then normal)
« previous next »
Jump to:
User Area
Welcome, Guest. Please login or register.
Did you miss your activation email?
May 28, 2012, 03:06:13 pm





Login with username, password and session length

Donate to our community, and get a permanent link back to your site!

Donate to our community, and get a permanent link back to your site!






Web Design Gallery · Whois Lookup · Pagerank · Tag Browsing · Lo-fi version · Syndication · Webmaster forum history · Advertise
Developed by HumanWorks © 2005 - 2012 Webdigity webmaster community · sublime directory
Webdigity Webmaster Forums | Powered by SMF 1.0.12. © 2001-2005, Lewis Media. All Rights Reserved.