title: Access custom order attributes
body: <p>I have created three custom order attributes sales_person_name, sales_type, referral</p>
  
  <p>I am trying to access them in a different module.</p>
  
  <p>Can anyone tell me how do I access those order attributes in a different module</p>
  
  <p>Do I have to call some model</p>
  
  <p>I tried</p>
  
  <pre><code>$order = Mage::getModel('sales/order')-&gt;load($order);
  </code></pre>
  
  <p>and i got below output but cant get an data in it.</p>
  
  <pre><code>Mage_Sales_Model_Order Object
  (
      [_eventPrefix:protected] =&gt; sales_order
      [_eventObject:protected] =&gt; order
      [_addresses:protected] =&gt; 
      [_items:protected] =&gt; 
      [_payments:protected] =&gt; 
      [_statusHistory:protected] =&gt; 
      [_invoices:protected] =&gt; 
      [_tracks:protected] =&gt; 
      [_shipments:protected] =&gt; 
      [_creditmemos:protected] =&gt; 
      [_relatedObjects:protected] =&gt; Array
          (
          )
  
      [_orderCurrency:protected] =&gt; 
      [_baseCurrency:protected] =&gt; 
      [_actionFlag:protected] =&gt; Array
          (
          )
  
      [_canSendNewEmailFlag:protected] =&gt; 1
      [_historyEntityName:protected] =&gt; order
      [_resourceName:protected] =&gt; sales/order
      [_resource:protected] =&gt; 
      [_resourceCollectionName:protected] =&gt; sales/order_collection
      [_cacheTag:protected] =&gt; 
      [_dataSaveAllowed:protected] =&gt; 1
      [_isObjectNew:protected] =&gt; 
      [_data:protected] =&gt; Array
          (
          )
  
      [_hasDataChanges:protected] =&gt; 
      [_origData:protected] =&gt; Array
          (
          )
  
      [_idFieldName:protected] =&gt; 
      [_isDeleted:protected] =&gt; 
      [_oldFieldsMap:protected] =&gt; Array
          (
              [payment_authorization_expiration] =&gt; payment_auth_expiration
              [forced_do_shipment_with_invoice] =&gt; forced_shipment_with_invoice
              [base_shipping_hidden_tax_amount] =&gt; base_shipping_hidden_tax_amnt
          )
  
      [_syncFieldsMap:protected] =&gt; Array
          (
              [payment_authorization_expiration] =&gt; payment_auth_expiration
              [forced_do_shipment_with_invoice] =&gt; forced_shipment_with_invoice
              [base_shipping_hidden_tax_amount] =&gt; base_shipping_hidden_tax_amnt
              [payment_auth_expiration] =&gt; payment_authorization_expiration
              [forced_shipment_with_invoice] =&gt; forced_do_shipment_with_invoice
              [base_shipping_hidden_tax_amnt] =&gt; base_shipping_hidden_tax_amount
          )
  
  )
  </code></pre>
  
  <p>I created order attributes as follows</p>
  
  <pre><code>&lt;?php
  $installer = $this;
  $installer-&gt;startSetup();
  
  $installer-&gt;addAttribute("order", "sales_person_name", array("type"=&gt;"varchar"));
  $installer-&gt;addAttribute("order", "sales_type", array("type"=&gt;"varchar"));
  $installer-&gt;addAttribute("order", "referral", array("type"=&gt;"varchar"));
  $installer-&gt;addAttribute("quote", "sales_person_name", array("type"=&gt;"varchar"));
  $installer-&gt;addAttribute("quote", "sales_type", array("type"=&gt;"varchar"));
  $installer-&gt;addAttribute("quote", "referral", array("type"=&gt;"varchar"));
  $installer-&gt;endSetup();
  </code></pre>
  
  <p>I am trying to access the order attributes in the below file</p>
  
  <blockquote>
    <p>C:\xampp\htdocs\practice1\app\code\core\Mage\Adminhtml\Block\Widget\Grid.php </p>
  </blockquote>