Get customer data in magento

How to get customer by ID in magento, using this in a plugin I’m making for CodeCanyon.

The main customer record is stored in the customer_entity table. To get a customer by entity_id in magento you use this piece of code:

$customer_id = 1; // set this to the ID of the customer.
$customer_data = Mage::getModel('customer/customer')->load($customer_id);
print_r($customer_data);

Took me hours to figure this out!

Leave a Reply

Your email address will not be published. Required fields are marked *