我或多或少继承了一个Magento网站,这似乎是be using the Mageworx Extended Orders extension for the order grid in the admin area。
客户希望重新排列列,例如,移动电子邮件旁边的凭证。在系统配置中,您可以选择列,但似乎没有任何方法对它们进行排序。我已经搜索了整个代码,并尝试编辑code\local\MageWorx\Adminhtml\Block\Orderspro\Sales\Order\Grid.php,但都无济于事。
我也查了数据库但couldn't find a table which might have the columns selected so that I could order them.
谢谢。
发布于 2015-04-23 02:05:21
碰巧我需要编辑的就是那个文件,MageWorx\Adminhtml\Block\Orderspro\Sales\Order\Grid.php,。我去掉了循环,只注释掉了我不想显示的字段,并将其余字段按要求的顺序放入
发布于 2015-07-01 17:47:53
您可以在文件中更改它:_prepareColumns()方法中的app/code/local/MageWorx/OrdersPro/Block/Adminhtml/Sales/Order/Grid.php。
目前,更改列的顺序是一个相当大的挑战,只能通过以下方式完成:
$listColumns = $helper->getGridColumns();
$listColumnsChanged = $listColumns; // create a copy of $listColumns
$listColumnsChanged[0] = $listColumns[3];
$listColumnsChanged[3] = $listColumns[0]; // interchange the columns that have id 3 and 0
var_dump($listColumns); // var_dump will let you learn ID of the column you need
foreach ($listColumnsChanged as $column) { // change foreach for getting to $listColumnsChangedhttps://stackoverflow.com/questions/29784686
复制相似问题