Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Admin Label as Column Heading #50

Open
YaegerDesign opened this issue Oct 11, 2016 · 5 comments
Open

Use Admin Label as Column Heading #50

YaegerDesign opened this issue Oct 11, 2016 · 5 comments

Comments

@YaegerDesign
Copy link

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.

@mobweb
Copy link

mobweb commented Oct 12, 2016

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.

@jayelkaake
Copy link
Owner

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

@kohjacky
Copy link
Contributor

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',
);

@jayelkaake
Copy link
Owner

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

@kkrieger85
Copy link

Can be closed. See 3e47dd2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants