首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >Magento - Mageworx扩展订单-重新排列列

Magento - Mageworx扩展订单-重新排列列
EN

Stack Overflow用户
提问于 2015-04-22 07:00:57
回答 2查看 262关注 0票数 0

我或多或少继承了一个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.

谢谢。

EN

回答 2

Stack Overflow用户

发布于 2015-04-23 02:05:21

碰巧我需要编辑的就是那个文件,MageWorx\Adminhtml\Block\Orderspro\Sales\Order\Grid.php,。我去掉了循环,只注释掉了我不想显示的字段,并将其余字段按要求的顺序放入

票数 0
EN

Stack Overflow用户

发布于 2015-07-01 17:47:53

您可以在文件中更改它:_prepareColumns()方法中的app/code/local/MageWorx/OrdersPro/Block/Adminhtml/Sales/Order/Grid.php。

目前,更改列的顺序是一个相当大的挑战,只能通过以下方式完成:

代码语言:javascript
运行
复制
$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 $listColumnsChanged
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/29784686

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档