Is there a way to tell if an order was placed through the frontend of the web site or entered through the administrative panel?
Overview. The Magento frontend is designed to optimize storefront customization, with highly extensible themes being the central customization mechanism. Merchants are encouraged to use Magento components and themes to extend and transform the appearance of their storefronts.
Backend Model performs the loading, saving, deleting, validation of the attribute value. Source Model provides a list of attribute values, which is used for the dropdown/multiselect attributes. Frontend Model performs attribute mapping on the frontend.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With