在管理中更改订单网格行颜色的方法
我需要根据订单状态更改 magento 订单网格中的行颜色。 首先,我不需要具有可配置界面的复杂解决方案。 我只是想知道从哪里开始。
最好的方法是什么?
I need to change row color in magento orders grid based on order status.
For start I don't want a complex solution with configurable interface.
I just want to know where to start.
What is the best approach ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
完整、可行的解决方案:
将
js/mage/adminhtml/grid.js
复制到js/colors/adminhtml/grid.js
制作文件666和文件夹 (js/colors & js/colors/adminhtml) 777。
编辑它并在第 208 行之后(在包含
}.bind(this)
的行之前)添加:在文件末尾添加:
现在在
app/design/adminhtml/default/default/layout/local.xml
中创建或编辑 admin local.xml 文件编辑它以包括:
订单网格现在将颜色鲜艳,您应该能够清楚地看到哪些订单需要注意。
可以编辑
colorize()
函数以适合您的订单状态和首选配色方案。Full, working solution:
Copy
js/mage/adminhtml/grid.js
tojs/colors/adminhtml/grid.js
Make the file 666 and the folders (js/colors & js/colors/adminhtml) 777.
Edit it and after line 208 (before the line containing
}.bind(this)
) add:At the end of the file add:
Now create or edit the admin local.xml file in
app/design/adminhtml/default/default/layout/local.xml
Edit it to include:
The orders grid will now be in vibrant colours and you should be able to clearly see what orders need attention.
The
colorize()
function can be edited to suit your order states and preferred colour scheme.