File tree Expand file tree Collapse file tree 2 files changed +34
-1
lines changed
Expand file tree Collapse file tree 2 files changed +34
-1
lines changed Original file line number Diff line number Diff line change @@ -52,6 +52,15 @@ XML Syntax
5252 </add >
5353 </column >
5454
55+ <manufacturer >
56+ <add >
57+ <header >Manufacturer</header >
58+ <type >options</type >
59+ <index >manufacturer</index >
60+ <options >firegento_gridcontrol/utility::getDropdownAttributeLabelOptionArray(manufacturer)</options >
61+ </add >
62+ </manufacturer >
63+
5564 <selecttest >
5665 <add >
5766 <header >Status Column</header >
@@ -74,4 +83,4 @@ XML Syntax
7483 </gridname >
7584 </grids >
7685</gridcontrol >
77- ``````
86+ ``````
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ class FireGento_GridControl_Model_Utility
4+ {
5+ public function getDropdownAttributeLabelOptionArray ($ attribute )
6+ {
7+ $ map = array ();
8+
9+ if (is_array ($ attribute )) {
10+ $ attribute = reset ($ attribute );
11+ }
12+
13+ if ($ attribute ) {
14+ $ attribute = Mage::getModel ('eav/config ' )->getAttribute ('catalog_product ' , $ attribute );
15+ $ options = $ attribute ->getSource ()->getAllOptions (false );
16+
17+ foreach ($ options as $ option ) {
18+ $ map [$ option ['value ' ]] = $ option ['label ' ];
19+ }
20+ }
21+
22+ return $ map ;
23+ }
24+ }
You can’t perform that action at this time.
0 commit comments