enhancedgrid icon indicating copy to clipboard operation
enhancedgrid copied to clipboard

Use Admin Label as Column Heading

Open YaegerDesign opened this issue 9 years ago • 5 comments

If you choose a custom attribute as a filter/column, the admin shows the header as the attribute ID/alias instead of the label like the default columns. However, in the system configuration for the extension, the labels are used correctly when choosing what columns to display.

YaegerDesign avatar Oct 11 '16 01:10 YaegerDesign

Would also like this. What you can do though is add a translation for the attribute ID to a translation file, then it will use the translation as the column header.

mobweb avatar Oct 12 '16 11:10 mobweb

Sorry, haven't been able to add this in yet... PRs are very welcome!

jayelkaake avatar Oct 27 '16 17:10 jayelkaake

What i did as follow, works for me: Replace the following on line 527 of app/code/community/TBT/Enhancedgrid/Block/Catalog/Product/Grid.php

$innerSettings = array( 'header' => Mage::helper('catalog')->__($col), 'width' => '100px', 'type' => 'text', );

with

$attribute = Mage::getModel('catalog/resource_eav_attribute')->loadByCode(Mage_Catalog_Model_Product::ENTITY, $col); $label = $attribute->getFrontendLabel(); $innerSettings = array( 'header' => Mage::helper('catalog')->__($label), 'width' => '100px', 'type' => 'text', );

kohjacky avatar Mar 17 '17 06:03 kohjacky

Can you submit a PR for that @kohjacky so we can get it merged? Thanks so much!

jayelkaake avatar Mar 17 '17 13:03 jayelkaake

Can be closed. See https://github.com/jayelkaake/enhancedgrid/commit/3e47dd29a892555476a4e8fb963d38a025e3dd1b

kkrieger85 avatar Dec 10 '18 10:12 kkrieger85