Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace vendormoduleObserver;
- use MagentoFrameworkEventObserverInterface;
- class customeramount implements MagentoFrameworkEventObserverInterface
- {
- public function __construct(MagentoFrameworkAppConfigScopeConfigInterface $scopeConfig )
- {
- $this->_scopeConfig = $scopeConfig;
- }
- public function execute(MagentoFrameworkEventObserver $observer)
- {
- $objectManager = MagentoFrameworkAppObjectManager::getInstance();
- $customerSession = $objectManager->create('MagentoCustomerModelSession');
- if($customerSession->isLoggedIn())
- {
- $customer_id = $customerSession->getCustomer()->getId();
- $customerSession->setMemebrCustomAttr('abc');
- }
- }
- }
- ?>
Add Comment
Please, Sign In to add comment