Sridhar G
Sridhar G

Reputation: 13

How to get the data of guest from magento database?

I tried to download the customer data and was able to download only the data of logged in users. Wanted to know is there a way to download the data of all customers who has purchased from my website.

Upvotes: 0

Views: 1766

Answers (1)

adrien54
adrien54

Reputation: 1640

You have to browse the orders sales_flat_order where the attribute customer_is_guest = 1. In the order table you are already able to get fields like customer_email, customer_firstname, customer_lastname...

You will find the billing/shipping addresses in sales_flat_order_address.

Orders and addresses can be joined this way:

sales_flat_order.entity_id = sales_flat_order_address.parent_id

Upvotes: 1

Related Questions