cancel
Showing results for 
Search instead for 
Did you mean: 

Magento 2 authentication login popup auto open

Magento 2 authentication login popup auto open

I am using Magento 2.2.4. If user opens the product page, I just want to open authentication popup automatically. I am adding script on addtocart.phtml file

 

require([
    'jquery',
    'Magento_Customer/js/model/authentication-popup'
], function ($,auth) {
    if($.isEmptyObject(window.info)){
            //code here
    }
    return false;
});

I just need to know what i should do in isEmptyObject condition so that popup opens automatically.