tags:

views:

49

answers:

3

In the admin interface of Magento I need to modify the tables in the Sales / Order / View order so that it shows, besides the products name, their manufacturer as well.

I'm trying to look for the file to modify to make that happen. I thought I would find a section with all the columns that are displayed in app/code/core/Mage/Sales/Block/Order/Item/Renderer/Default.php but by inspecting it there seem to be no reference to the columns/product attributes.

I also tried to modify app/design/adminhtml/default/default/template/sales/order/view/items/renderer/default.phtml by changing

<?php echo $this->getColumnHtml($_item, 'name') ?>

into

<?php echo $this->getColumnHtml($_item, 'manufacturer') ?>

but it changed nothing, so I suppose that file is not involved...

Can anybody please point me to the right file to modify?

Thank you!

A: 

I've no magento installation available, but I have some ideas. Maybe the column is not defined inside a template file (phtml), but inside a xml layout file. Just search in the layout/sales.xml file.

And maybe you have not disabled the magento cache, that's why you don't see any changes.

cytrinox
Thank you for the suggestion of looking for the xml, I would have never thought about that! Unfortunately this is not the case, though, since that xml describes the grouping of "blocks" to compose the page. What I need to change is the content of one of those blocks, instead.
fdierre
A: 

http://magentocoder.jigneshpatel.co.in/create-custom-reports-in-magento-admin/

Should get you most of the way.

kevinpaulconnor
Thank you, this is rather exhaustive.
fdierre
A: 

After quite a lot of browsing through the code and with some help from a collegue, we found out the two file to change for adding a column to such view:

  • app/design/adminhtml/default/default/template/sales/order/view/items.phtml for adding the table header

  • app/design/adminhtml/default/default/template/sales/order/view/items/renderer/default.phtml for filling the column with data.

I'm not really experienced with Magento but I guess that, in order to do a "clean job", one should not directly modify those files but override them instead.

fdierre