How To Add a Row Number to A Magento Dataflow Import Errors

I find it frustrating when importing data into Magento that it’ll successfully complain about a row with errors, but won’t tell you which row has the problem!

The code which generates the HTML for the error messages is at app/code/core/Mage/Adminhtml/Block/System/Convert/Profile/Run.php. Make a copy of this file at app/code/local/Mage/Adminhtml/Block/System/Convert/Profile/Run.php

Locate this part:

                $this->setBatchConfig(
                        ...
                        'template' => '<li style="#{style}" id="#{id}">'
                                    . '<img id="#{id}_img" src="#{image}" class="v-middle" style="margin-right:5px"/>'
                                    . '<span id="#{id}_status" class="text">#{text}</span>'
                                    . '</li>',
                         ...

And change:

'<span id="#{id}_status" class="text">#{text}</span>'

to:

'<span id="#{id}_status" class="text">Row #{id} - #{text}</span>'

Tags: magentoimport