I created an events.xml at /app/code/Test/Customer/etc
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
<event name="checkout_submit_before">
<observer name="Test_Customer_sales_order_place_before" instance="Test\Customer\Observer\OrderPlacebefore"/>
</event>
</config>
Created the OrderPlacebefore.php like /app/code/Test/Customer/Observer
<?php namespace Redington\CustomerAddress\Observer;
use Magento\Framework\Event\ObserverInterface;
class OrderPlacebefore implements ObserverInterface
{
/**
* @param Observer $observer
* @return void
*/
public function execute(\Magento\Framework\Event\Observer $observer)
{
echo "<pre>";
print_r($this->_request->getPost());
exit;
$quote = $observer->getQuote();
}
}
I didn't get anything here. But I need to get all data of order like product details, totals and customer details.
Anyone, please help me.