Skip to content

Instantly share code, notes, and snippets.

@arush
Created August 2, 2011 09:43
Show Gist options
  • Save arush/1119908 to your computer and use it in GitHub Desktop.
Save arush/1119908 to your computer and use it in GitHub Desktop.
Wordpress Magento Gigya reg page
<!-- head -->
<!-- BEGIN Gigya Socialize -->
<!-- socialize.js script should only be included once -->
<script type="text/javascript" src="http://cdn.gigya.com/js/socialize.js?apiKey=2_T-yAvt8V45JKSmDuCaS6tYQFMpkNeIpI-AeEa8T0zC2uuPRvTANZXks5Zu0UCHXo"></script>
<script type="text/javascript">
var conf=
{
APIKey: "2_T-yAvt8V45JKSmDuCaS6tYQFMpkNeIpI-AeEa8T0zC2uuPRvTANZXks5Zu0UCHXo" ,enabledProviders: "facebook,twitter,yahoo,messenger,google,linkedin" ,connectWithoutLoginBehavior: 'alwaysLogin'
,onError:function(e) {
}
};
// onLogin Event handler
function onGigyaLoginHandler(eventObj) {
switch(eventObj.context) {
case 'loginPlugin':
break;
default:
var redirectURL='http://staging.evogue.co.uk/index.php/customer/account/loginPost/';
if (!(eventObj.user.hasOwnProperty('signature'))) {
eventObj.user['signature']=eventObj.user['UIDSig'];
}
gigya.services.socialize._redirectTo(redirectURL, [eventObj, eventObj.user]);
break;
}
}
function onGigyaLogoutHandler(eventObj) {
document.location.replace('http://staging.evogue.co.uk/index.php/customer/account/logout/');
}
gigya.services.socialize.addEventHandlers(conf, {
onLogin: onGigyaLoginHandler
,onLogout: onGigyaLogoutHandler
} );
</script>
<!-- END Gigya Socialize -->
<!-- body -->
<!-- BEGIN Gigya Socialize plugin Login -->
<script type="text/javascript">
var login_params=
{
useHTML: 'true'
,showTermsLink: 'false'
,width: "330" ,height: "100" ,UIConfig: '<config><body><controls><snbuttons buttonsize="35"></snbuttons></controls></body></config>'
,buttonsStyle: "fullLogo" ,containerID: 'gigyaLoginPluginDiv'
,redirectURL: 'http://staging.evogue.co.uk/index.php/customer/account/loginPost/'
,hideGigyaLink:'true'
,pendingRegistration:'true'
}
login_params.context='loginPlugin';
</script>
<div id="gigyaLoginPluginDiv"></div>
<script type="text/javascript">
gigya.services.socialize.showLoginUI(conf,login_params);
</script>
<!-- END Gigya Socialize plugin Login -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment