0

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!!

1 Answer 1

0

Test/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);
    }
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.