How to get current quote in Magento 2
While working many times we face the requirement to load the current quote of the customer to achieve needed functionality. We can get the current quote of the customer easily by loading the checkout session class \Magento\Checkout\Model\Session. Further we need to call getQuote() method of…
How to get current logged in customer data in Magento 2
While working on Magento several times we need to get the details of current logged in customer. It can easily be checked whether the customer is logged in or not. If the customer is logged in then we can retrieve its data and use it…
How to get customer by ID in Magento 2
In Magento 2 there are multiple ways to load customer data by ID. The code snippets below will help you to achieve it. Load Customer using Model Customer can be loaded using the Magento\Customer\Model\Customer model. We will use the factory of this model to get…
How To Get Customer Id From Bearer Token In Magento2 Rest API?
In REST API integration, we can retrieve customer token from calling /V1/integration/customer/token API. Later this token is passed as a bearer token in Postman or we can pass in the api_key text field on the top of the page in the user interface for swagger….