1

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.

2

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" />';
    }
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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