Question

Nope, Mage_Sales_Model_Order $order->getRemoteIp() doesn't work. It always gives me null.

By when I check sales_flat_order table I can see remote_ip field. I just only need to check if the order was placed manually by admin or by the customer since I need to mark 'admin-placed' orders on the order grid in Backend.

I saw that someone suggests to check store_id field. But it never is 0. It's always equal to my real store ID.

Any more suggestions? Thanks.

Was it helpful?

Solution

Okay I resolved the problem by:

protected function _getValue(Varien_Object $row)
{
    $order = Mage::getModel('sales/order')->load($row->getId());
    if(strlen($order->getRemoteIp()) > 0) {
        return $row->getRealOrderId();
    } else {
        return $row->getRealOrderId() . ' <img style="vertical-align:bottom;" src="'.$this->getSkinUrl('images/fam_user_edit.gif').'" alt="Order by Phone" />';
    }
}
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top