Is there a way to tell if an order was placed through the frontend of the web site or entered through the administrative panel?
By default, Magento only stores the remote_ip
in table sales_flat_order
for an order that is place by customer (while admin order is set to null).
So try this:
if(!empty($order->getRemoteIp()){
//place online
}
else{
// place by admin
}
See Programmatically differentiate between admin & customer-placed orders
You can check the is_super_mode
value (I have only check on the quote : $quote->getIsSuperMode()
)
Every order has a store_id
, when entered through administraction it will either be 0 (for 'admin' store) or null.
if ($order->getStoreId()) {
// was placed via frontend
}
Don't use getStore()
as that won't always return the admin store object reliably.
Does not work with latest versions of Magento. (see comment)