I want to Get bestseller report in Product first show all filter getting then rest of it in grid.
I want in magento2.3.x version in. Any one have idea? Thanks in advance!!
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.
Sign up to join this communityTest/Demo/etc/frontend/events.xml
<?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="customer_register_success">
<observer name="persistent" instance="Test\Demo\Observer\ChangeCustomerEmail" />
</event>
</config>
<?php
namespace Test\Demo\Observer;
use Magento\Framework\Event\ObserverInterface;
class ChangeCustomerEmail implements ObserverInterface
{
const CUSTOMER_GROUP_ID = 2;
protected $_customerRepositoryInterface;
public function __construct(
\Magento\Customer\Api\CustomerRepositoryInterface $customerRepositoryInterface
) {
$this->_customerRepositoryInterface = $customerRepositoryInterface;
}
public function execute(\Magento\Framework\Event\Observer $observer)
{
$customer = $observer->getEvent()->getCustomer();
$customer->setEmail('[email protected]');
$this->_customerRepositoryInterface->save($customer);
}
}