Я получаю эту ошибку, когда выполняю ajax-вызов в Magento 2: неверная конфигурация параметров для аргумента $ reader из Magento \ Framework \ Interception \ PluginList \ PluginList
Мой контроллер
public function execute()
{
$objectManager = ObjectManager::getInstance();
$data = $this->request->getParams();
$currentdate = $this->date->gmtDate();
$model = $this->aboncartFactory->create();
$model->setData($data);
}
Мой Ajax-вызов
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);
}
});
}