0

I want to retrieve all the existing magento order attributes. For customer attributes i used Mage::getModel('customer/customer')->getAttributes(), for customer address attributes i used Mage::getModel('customer/address')->getAttributes(). Similarly how to get Order all attributes? I tried Mage::getModel('sales/order')->getAttributes(), but we don't have getAttributes() method for Mage_Sales_Model_Order .

Please help me on how to get order/quote getAttributes()?

Thanks.

1
  • Order model is not a EAV model. What kind of attributes you want to join?
    – Kirby
    Sep 4, 2015 at 12:48

1 Answer 1

1

Since 'sales/order' and 'sales/quote' uses flat table and not EAV, then EAV attributes would be the same as the table columns name.

Try

$resource = Mage::getSingleton('core/resource');
$readConnection = $resource->getConnection('core_read'); 
$tableName = $resource->getTableName('sales/order');
$saleField=$readConnection->describeTable($tableName);

print_r($saleField);
5

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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