0

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

Teja Bhagavan Kollepara
  • 3,816
  • 5
  • 32
  • 69
Alexis
  • 21
  • 3

3 Answers3

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

Dominic Pixie
  • 7,520
  • 4
  • 17
  • 56
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/

Anas Mansuri
  • 2,627
  • 1
  • 11
  • 28
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!

Alexis
  • 21
  • 3