File tree Expand file tree Collapse file tree 2 files changed +34
-0
lines changed
Expand file tree Collapse file tree 2 files changed +34
-0
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ Features
1313- move columns
1414- add new attributes
1515- join new attributes
16+ - update columns
1617
1718Todo
1819-----
@@ -52,6 +53,17 @@ XML Syntax
5253 </add >
5354 </column >
5455
56+ <existingColumn >
57+ <updateColumn >
58+ <attributeToUpdate >newValue</attributeToUpdate >
59+ </updateColumn >
60+ </existingColumn >
61+ <real_order_id >
62+ <updateColumn >
63+ <filter_index >main_table.increment_id</filter_index >
64+ </updateColumn >
65+ </real_order_id >
66+
5567 <manufacturer >
5668 <add >
5769 <header >Manufacturer</header >
Original file line number Diff line number Diff line change @@ -230,4 +230,26 @@ protected function removeGridColumn(Mage_Adminhtml_Block_Widget_Grid $grid, $col
230230 $ this ->setGridProtectedPropertyValue ($ grid , $ columnsPropertyName , $ columns );
231231 $ this ->setGridProtectedPropertyValue ($ grid , $ lastColumnIdPropertyName , $ lastColumnId );
232232 }
233+
234+ /**
235+ * Updates an existing column
236+ * Example: <status><updateColumn><filter_index>main_table.status</filter_index></updateColumn></status>
237+ * @param array $params
238+ */
239+ protected function _updateColumnAction ($ params )
240+ {
241+ $ columnConfig = array ();
242+ $ blockId = $ params ->getBlock ()->getId ();
243+ /**
244+ * @var FireGento_GridControl_Model_Config $config
245+ */
246+ $ config = Mage::getSingleton ('firegento_gridcontrol/config ' );
247+
248+ foreach ($ params ->getAction ()->children () as $ attribute ) {
249+ // $params->getBlock()->getColumn('status')->setData('index', 'main_table.status')
250+ $ params ->getBlock ()->getColumn ($ params ->getColumn ()->getName ())->setData (
251+ $ attribute ->getName (), (string )$ attribute
252+ );
253+ }
254+ }
233255}
You can’t perform that action at this time.
0 commit comments