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

问题描述:

我想使magento后端的价格文本字段为只读,因为我使用了另一个自定义属性来确定价格.

I want to make the price text field in magento backend readonly because I use another custom attributes to fix prices.

我该怎么做?

非常感谢.

由于这会使属性变得非常愚蠢,因此我不认为有任何简单的机制可以执行此操作.一个简单的技巧是将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.

希望有帮助!

谢谢, 乔