+91-943-185-6038 me@shashidharkumar.com

magentoHere is the example code by which you can get last order details into mangento of using email id.

$_customer = Mage::getModel('customer/customer');
$_customer->loadByEmail('demo@demo.com');

$orders = Mage::getResourceModel('sales/order_collection')
->addFieldToSelect('*')
->addFieldToFilter('customer_id', $_customer->getId())
->addAttributeToSort('created_at', 'DESC')
->setPageSize(1);

ID
echo $orders->getFirstItem()->getId();
See also  Redirect from non-www to www in CakePHP