0

I'm doing a custom JS code but i wanna know if user are logged in with Jquery.

  • can you please share your code. – Anas Mansuri Aug 10 at 5:26
0

Its available frontend via customerData (private data)

https://devdocs.magento.com/guides/v2.3/extension-dev-guide/cache/page-caching/private-content.html

You can combine this with jquery. Something like this.

https://magento.stackexchange.com/a/243312/70343

0

Please share your code if you are done...or please check with below url which have ajax login popup.

https://www.siphor.com/add-a-login-popup-in-magento-2/

0

The references up can't help me cause i'm touching JS at checkout process. I finally solved it doing a jQuery check: if add new address button are visible in the code, then, the user are registered and configured they address.

Thanks for the help!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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