Check Customer is logged in using knockout js Magento 2
We can use Magento_Customer/js/model/customercomponent to check if the customer is logged in or not in knockout js. Check full component here customer.js We can use isLoggedIn() method. It will return true if customer is loggedIn and return false if customer is not loggedIn Check below code snippet of JS: define([ 'uiComponent', 'Magento_Customer/js/model/customer' ], function (Component,…
Continue Reading
Check Customer is logged in using knockout js Magento 2