Orders – How to Identify Guest vs Registered Customer Orders

customerorders

The problem is that I am sending the Magento order to an external ERP and they need the customer id from Magento.

the problem comes when the customer is guest because in theory this customer doesn't have an id but I am not sure. Is there a way to check if the customer is a guest?

I am using the Mage_Sales_Model_Order object in order to get the information I need from the customer.

Thanks!

Best Answer

if you just want to know if the customer is guest or not. trigger getCustomerIsGuest() in Mage_Sales_Model_Order I believe that can get customer instance of order.