Sunday, June 19, 2022

How to Get Customer ID Without Using Session in Magento 2

Customer ID in Magento 2 is used to implement features that are assigned for specific customer groups. 


Even the admin may require a customer ID to hide the signup button or display a discount offer that is only valid exclusively for logged in customers. 


However, a Magento developer is required to get customer ID. But, here I’m going to provide you with an alternate solution to get customer ID without using session in Magento 2. Using these method helps avoid issues which are: 


  • To return a null value for logged in customers.

  • Disable cache and thus reducing the page speed.


To get more information, you need to refer the article at: https://meetanshi.com/blog/get-customer-id-without-using-session-in-magento-2/


No comments:

Post a Comment