且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Magento后端-将价格字段设为只读

更新时间:2023-11-30 11:19:58

由于这会使属性变得非常愚蠢,因此我不认为有任何简单的机制可以执行此操作.一个简单的技巧是将JS文件添加到该页面,从而专门禁用price字段.将XML布局文件用于默认的adminhtml程序包,以添加该JS文件.

Since this would make attributes very silly, I don't believe that there is any simple mechanism by which to do this. One easy hack that you could use for this would be to add a JS file to that page which disables the price field specifically. Use the XML layout files for the default adminhtml package to add that JS file.

希望有帮助!

谢谢, 乔