Using models how would I get the last inserted customer, even if that customer was inserted 6 days ago?

Would the best bet to get customers and order by date created and limit it to 1 result?


1 Answer 1


You can get last inserted customer id by magento customer collection filter by entity_id desc

Step1: Load customer collection with sort by entity descending and by using setpagesize limt collection limit 1 Blockquote

Step2: get customer object getFirstItem(); which will provide fist item collection Blockquote

Step3: get customer data

If you need code sample then I can provide you...

For reference lets have a look at the link

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.