Skip to content

Instantly share code, notes, and snippets.

@tony-dtn
Created January 8, 2014 04:35
Show Gist options
  • Save tony-dtn/8311883 to your computer and use it in GitHub Desktop.
Save tony-dtn/8311883 to your computer and use it in GitHub Desktop.
Magento Customer
<?php
$customer_email = "customer@example.com";
$customer = Mage::getModel("customer/customer");
$customer->setWebsiteId(Mage::app()->getWebsite()->getId());
$customer->loadByEmail($customer_email); //load customer by email id
//use
echo $customer->getId();
echo $customer->getFirstName();
//print_r($customer->getData()); to find all the available elements.
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment