customer\_entity
Shortly after the addition of the three new products, a new customer, Sammy Customer
, visits Clothes4U
’s website for the first time. Since Clothes4U
does not allow guest orders, Sammy Customer
must first create an account on the website. Customer enters required credentials and clicks submit, resulting in the following new entry on the customer\_entity table
:
entity id | entity type id | email | created at |
---|---|---|---|
214 | 1 | sammy.customer@gmail.com | 2016/09/23 15:27:12 |
entity_id
- Just like the prior table,entity_id
is the primary key of thecustomer_entity
table.- When
Sammy Customer
created an account and the row above was written to thecustomer_entity
table, customer was assignedentity_id
= 214. Throughout all tables, the customer identified asentity_id
= 214 always refers to the user Sammy Customer
- When
entity_type_id
– This column identifies which type of entity is being listed in this table, and functions the same way as it does in thecatalog_product_entity
table- Every row on the
customer_entity
table is a customer, and Commerce defines customers asentity_type_id
1 by default
- Every row on the
email
– this field is populated by the email that a new customer enters when making their accountcreated_at
– This column returns the timestamp for when each user joined
sales\_flat\_order (or Sales\_order
if you have Adobe Commerce 2.x
With the account creation finished, Sammy Customer
is ready to start making a purchase. On the website, the customer adds two pairs of the Throwback Bellbottoms
and one V-Neck T-Shirt
to the cart. Satisfied with the selections, the customer moves to checkout and submits the order, creating the following entry on the sales flat order table:
entity id | **customer id** | subtotal | created at |
---|---|---|---|
227 | 214 | 94.85 | 2016/09/23 15:41:39 |
entity_id
– this is the primary key of thesales_flat_order
table.- When Sammy Customer placed this order and the row above was written to the
sales_flat_order
table, the order was assignedentity_id
= 227.
- When Sammy Customer placed this order and the row above was written to the
customer_id
– This column is the unique identifier of the customer who placed this particular order- The
customer_id
associated with this order is 214, which is Sammy Customer’sentity_id
on thecustomer_entity
table.
- The
subtotal
– This column is the total amount charged to a customer for the order- The two pairs of “Throwback Bellbottoms” and the “V-Neck T-Shirt” cost $94.85 dollars in total
created_at
– This column returns the timestamp for when each order was created