How can I get all field names from an object like "order" without creating or loading this object?
Example:
Model: sales/order
With a loaded order and the getData() method I get an array of various field names like:
shipping_tax_amount
grand_total
base_tax_amount
How can I get these field names without an order? In my case it must be possible to access to this fields even if there is no order at the magento shop.
$resource = Mage::getSingleton('core/resource');
$readConnection = $resource->getConnection('core_read');
/**
* Get the table name
*/
$tableName = $resource->getTableName('sales/order');
$saleafield=$readConnection->describeTable($tableName);
var_dump($saleafield);
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