These forums are your way of communicating with the community of people developing and using tools provided by the OneAll platform. The forums are run by the community and moderated by the OneAll team during office hours.
Please stick to technical issues - and remember, no confidential information - these are public forums!

Add social login to template/persistent/checkout/onepage/login.phtml

edited July 2016 in Magento

I want to add social login to ..../template/persistent/checkout/onepage/login.phtml

I install plugin for magento, and i add into ..../template/persistent/checkout/onepage/login.phtml
//The plugin will be embedded into this div <div id="oa_social_login"></div> <script type="text/javascript"> var _oneall = _oneall || []; _oneall.push(['social_login', 'set_callback_uri', window.location.href]); _oneall.push(['social_login', 'set_providers', ['facebook', 'google', 'yahoo']]); _oneall.push(['social_login', 'do_render_ui', 'oa_social_login']); </script>

P.S. i edit some < to show all cod.
(P.S. bis: added some formatting to your example.)

is not showing anything, whay ?



  • Hi,
    The short answer is that you are missing the oneall JS library.
    $oneall_sociallogin_subdomain = Mage::getStoreConfig ('oneall_sociallogin/general/subdomain'); if (! empty ($oneall_sociallogin_subdomain)) { ?> <!-- / Social Login for Magento --> <script type="text/javascript"> var oa = document.createElement('script'); oa.type = 'text/javascript'; oa.async = true; oa.src = '//<?php echo $oneall_sociallogin_subdomain; ?>' var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(oa, s); </script> <?php } ?>
    However, manually adding code like this (without using the configured settings) may not be ideal.
    (we'll comment on this some more)

  • Hi,
    As mentioned above, it is strange that you have to modify this persistent file.
    By default, the social login icons show on the checkout page, even with persistence on.

    What was the original problem you may have had?

  • This cod work,

    location ...template/page/html/em_header/em_header_style31.phtml

    for some small login dropdown, on home page

    <!-- The plugin will be embedded into this div //--> <div id="oa_social_login"></div> <script type="text/javascript"> var _oneall = _oneall || []; _oneall.push(['social_login', 'set_callback_uri', '']); _oneall.push(['social_login', 'set_providers', ['facebook', 'google', 'yahoo']]); _oneall.push(['social_login', 'do_render_ui', 'oa_social_login']); </script>
  • Hi,
    Ok, good.
    The Oneall plugin already comes with a layout and block which you can use in your layouts.
    See file app/design/frontend/base/default/layout/oneall-sociallogin.xml, for the referenced blocks.
    For example: it references checkout.onepage.login.before, which is present in app/design/frontend/rwd/default/layout/checkout.xml.
    So perhaps, you can identify in your theme, if any of the Oneall referenced blocks are mentioned?
    (Add one if not.)

    Not sure this is so clear...
Sign In or Register to comment.