Hi I have added a custom field on checkout page and it show in order also. But how can I actualy get it from the order in xml file. I already have taken in phtml with this part of code, <?php $order_ref = $this->htmlEscape($this->getOrder()->getssn());?>. The module I have used is on this page http://excellencemagentoblog.com/magento-add-custom-fields-checkout-page.

And also I already have tried with previous code to get in xml but it doesn't work any proposition or help please

1 Answer 1


The row information that is exported to xml via the admin's order section is built from the function _getExportHeaders in the file Mage_Adminhtml_Block_Widget_Grid.

protected function _getExportHeaders()
    $row = array();
    foreach ($this->_columns as $column) {
        if (!$column->getIsSystem()) {
            $row[] = $column->getExportHeader();
    return $row;

As you can see here is will add all items in $this->columns that are not system attributes. These columns are set-up as part of the grid itself, so simply speaking if the attribute is shown on the sales order grid and it is not a system attribute then it will be exported as part of the xml file.

These columns are added to the grid via Mage_Adminhtml_Block_Sales_Order_Grid->_prepareColumns.

Your Answer

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

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