Start a new topic

Social Login Magento 2 Popup doesn't work

Hey there,

I just installed your Social Login extension on magento 2 but for some reason i can’t get the popup to work. Am i missing something? Any help would be appreciated.

Thanks


1 person has this question

Hi,


It is because of your custom design.

There are 2 solutions:

1. Custom your current top menu that similar to Luma theme.

2. Custom Social Login javascript. that triggers click event on Login / Sign up link.


Regards,

Sam

Don't forget to run deploy static content.


php bin/magento setup:static-content:deploy

 and flush cache


if you get error, try to read this topic

I have the same issue. What do you mean "Change value of delegate to your current class, ID."? I do not understand this. What should I put in there?

 Hi Sam,


What does "Change value of delegate to your current class, ID." mean. Sorry I didn't got that.


Thank You,

A

Regarding Poup login.


We have made it compatible with Porto theme. you can download the latest version https://github.com/mageplaza/Magento-2-Social-Login-Extension


=> Fix patch



How to fix:


Solution #1: 


Open file: app/design/frontend/Smartwave/porto/Smartwave_Porto/layout/default.xml


Remove:

<block class="Magento\Customer\Block\Form\Login" name="header_customer_form_login" template="Smartwave_Porto::html/login.phtml"/>


qmE21yOXXXwZUNEq_tKr--jFKpU-cRxnGA.png



Solution 2:


Open file: /view/frontend/layout/default.xml


Add the following block XML in body tag

 

       <!-- Fix Porto Popup login -->
        <referenceBlock name="header_customer_form_login" remove="true"/>

 See this file

Ideally, there is another module, js script catch event Click on Login button.


So, we should disable them like above comment

Solution #1: Updated!


Open file: app/code/Mageplaza/SocialLogin/view/frontend/templates/popup.phtml:64

Edit css selector which matched with your custom design:

  

//This value: .header.links .authorization-link

var headerLink = $('.header.links .authorization-link');
 

 

image

 

Hello,

Even I am using the same porto theme.
Have done everything as said above but still the popup window doesn't work.

Onclick login button the URL changes to
http://localhost/domain-name/#social-login-popup

Kindly Suggest

 

You should follow this guide:


Open file: app/code/Mageplaza/SocialLogin/view/frontend/templates/popup.phtml:64


//This value: .header.links .authorization-linkvar

headerLink = $('.header.links .authorization-link');


1 person likes this
Thankyou Sam

This worked for me.

 

Hi, in Solution #1 Update my popup.phtml not like of you

It here

 

<?php
/**
 * Mageplaza
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Mageplaza.com license that is
 * available through the world-wide-web at this URL:
 * https://www.mageplaza.com/LICENSE.txt
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade this extension to newer
 * version in the future.
 *
 * @category    Mageplaza
 * @package     Mageplaza_SocialLogin
 * @copyright   Copyright (c) 2016 Mageplaza (http://www.mageplaza.com/)
 * @license     https://www.mageplaza.com/LICENSE.txt
 */
?>
<?php if ($block->isEnabled()): ?>
    <div id="social-login-popup" class="white-popup mfp-with-anim mfp-hide" data-mage-init='{"socialPopupForm": <?php echo $block->getFormParams() ?>}'>
        <?php echo $block->getChildHtml('popup.authentication') ?>
        <?php echo $block->getChildHtml('popup.create') ?>
        <?php echo $block->getChildHtml('popup.forgot') ?>
    </div>
    <div style="clear: both"></div>
<?php endif; ?>

 I can not edit css selector which matched with my custom design

My theme is porto, i try solusion 2 but not working

Help me!

Thank!

You should follow solution #1


Solution #1: 


Open file: app/design/frontend/Smartwave/porto/Smartwave_Porto/layout/default.xml


Remove:

<block class="Magento\Customer\Block\Form\Login" name="header_customer_form_login" template="Smartwave_Porto::html/login.phtml"/>


qmE21yOXXXwZUNEq_tKr--jFKpU-cRxnGA.png


Hi!


I have the same problem as Đức Minh Phạm. Either Solution #1 or solution #2 does not work. 


Hope there is another solution!

Thanks!

I also get the following error message in chrome:


Uncaught TypeError: Cannot read property 'search' of undefined     popup.js:97

at HTMLAnchorElement.<anonymous> (Mageplaza_SocialLogin/js/popup.js:97:29)

at Function.each (_cache/merged/d284efc3b2cf1267b89568bad4b55eec.js:3457:23)

at jQuery.fn.init.each (_cache/merged/d284efc3b2cf1267b89568bad4b55eec.js:3210:17)

at $.(anonymous function).(anonymous function).initLink (/Mageplaza_SocialLogin/js/popup.js:93:38)

at $.(anonymous function).(anonymous function).initLink (/jquery/jquery-ui.js:402:25)

at $.(anonymous function).(anonymous function)._create (/Mageplaza_SocialLogin/js/popup.js:66:18)

at $.(anonymous function).(anonymous function)._create (/jquery/jquery-ui.js:402:25)

at $.(anonymous function).(anonymous function)._createWidget (/jquery/jquery-ui.js:561:8)

at new $.(anonymous function).(anonymous function) (/jquery/jquery-ui.js:363:9)

at $.(anonymous function).(anonymous function) (/jquery/jquery-ui.js:357:11)


I'm running magento 2.1.5 with porto.


/Thanks

Login or Signup to post a comment