如何以编程方式开发Magento 2目录价格规则



我想开发自定义产品相关模块,为此我必须加载目录价格规则条件。我已经为我的模块添加了表格格式。有谁能帮我解决上面的问题吗?

临界:可恢复错误:参数1传递给abcProductFeedBlockAdminhtml ProductFeed EditTabConditions::setConditionFormName()必须是MagentoRuleModelConditionAbstractCondition的一个实例,null给定,在/var/www/html/mage2016/app/code/abc/ProductFeed/Block/Adminhtml/ProductFeed/Edit/Tab/Conditions.php中调用,并在/var/www/html/mage2016/app/code/abc/ProductFeed/Block/Adminhtml/ProductFeed/Edit/Tab/Conditions.php中定义

如果这是一个新模块,您可能必须运行依赖注入编译。

php bin/magento setup:di:compile

错误信息指的是"参数"。看看模块的构造函数。您将看到错误消息中的类与您正在注入的类之间的关系。

在di:compile之后,在页面刷新之后,错误应该被解决。

最新更新