首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >为Magento\Framework\Interception\PluginList\PluginList的$reader参数提供的参数配置无效

为Magento\Framework\Interception\PluginList\PluginList的$reader参数提供的参数配置无效
EN

Stack Overflow用户
提问于 2019-03-13 23:32:55
回答 1查看 1K关注 0票数 1

在Magento 2中进行ajax调用时出现以下错误:为Magento\Framework\Interception\PluginList\PluginList的$reader参数提供的参数配置无效

我的控制器

代码语言:javascript
运行
复制
public function execute()
{
    $objectManager = ObjectManager::getInstance();
    $data = $this->request->getParams();
    $currentdate = $this->date->gmtDate();
    $model = $this->aboncartFactory->create();
    $model->setData($data);
}

我的Ajax调用

代码语言:javascript
运行
复制
function pushData() {
    var url = "<?php echo $block->getUrl('aboncart/index/insertorder'); ?>";
    var firstname = document.getElementsByName("firstname").value; //$("#billing_firstname").val();
    var lastname = document.getElementsByName("lastname").value; //$("#billing_lastname").val();
    var telephone = document.getElementsByName("telephone").value; //$("#billing_telephone").val();
    var email = document.getElementsByName("username").value; //$("#billing_email").val();
    var quote = "<?php echo $quoteId; ?>";
    var store = "<?php echo $storeId; ?>";
    var parameters = { 
        email: email,
        firstname: firstname,
        lastname: lastname,
        telephone: telephone,
        quote_id: quote,
        store_id: store
    };

    $.ajax({
        url: url,
        type: "POST",
        data: parameters,
        success: function(result)  {
          console.log(result);
        },
        error: function(error){
            console.log(error);
        }
    });
}
EN

回答 1

Stack Overflow用户

发布于 2019-03-14 16:41:14

我从控制器上取下了ObjectManager,它又能工作了!

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/55145670

复制
相关文章

相似问题

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