Forums / General Questions / Data base entry to identify that an order was completed

Data base entry to identify that an order was completed

Locked

Views: 1,312

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
21 Jul 2006, 2:22 PM
#1
grossd avatar

grossd

Zen Follower

Join Date:
Sep 2005
Posts:
173
Plugin Contributions:
0

Data base entry to identify that an order was completed

Hello,

I am wondering what piece of data in the database would allow me to clearly know that an order was completed - i.e. confirmed.

Is it order status or perhaps date of purchase field in orders?

thanks,

Daniel

21 Jul 2006, 2:34 PM
#2
grossd avatar

grossd

Zen Follower

Join Date:
Sep 2005
Posts:
173
Plugin Contributions:
0

Re: Data base entry to identify that an order was completed

Hello,

OK, i think i found it ...

Basically it appears that an order record is only generated once a customer confirms the order. At that time a record is generated with an order status and a purchase date. The order status, so it appears, can changed, as the order tucks along ...

Basically, if i want to know whether a customer has placed an order for a specific item, i must look:

  1. the product id of the product in question
  2. the order id associated with the product exists

The result can be several order ids. The purchase date for an order could then help distinguish between them.

thank you,

Daniel

22 Jul 2006, 7:48 AM
#3
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Data base entry to identify that an order was completed

  1. the customer's ID will match the customer_id field in the orders table
  2. orders_status in the orders table will match whatever the payment module set the order to upon payment authorization. In many cases, this is "Processing"
  3. The most recent orders_status_history record for that order id will show the most recent status update, and in some cases, the payment module will also add some payment authorization details to the comments field.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.