Version Notes
Stable Version 1.1.0 - UX and UI Improvement
Download this release
Release Info
Developer | Soclever Social |
Extension | soclever_login |
Version | 1.1.0 |
Comparing to | |
See all releases |
Code changes from version 1.0.5 to 1.1.0
- app/code/local/Soclever/Sociallogin/Block/Adminhtml/Help.php +0 -17
- app/code/local/Soclever/Sociallogin/Block/Adminhtml/Positions.php +0 -115
- app/code/local/Soclever/Sociallogin/Block/Help.php +23 -0
- app/code/local/Soclever/Sociallogin/Model/Info.php +109 -0
- app/code/local/Soclever/Sociallogin/Model/Observer.php +33 -0
- app/code/local/Soclever/Sociallogin/Model/Providers.php +21 -0
- app/code/local/Soclever/Sociallogin/controllers/IndexController.php +10 -1
- app/code/local/Soclever/Sociallogin/etc/config.xml +13 -1
- app/code/local/Soclever/Sociallogin/etc/system.xml +38 -21
- app/design/frontend/base/default/template/sociallogin/scsl_buttons.phtml +14 -3
- app/design/frontend/base/default/template/sociallogin/sociallogin_head.phtml +5 -1
- app/design/frontend/base/default/template/sociallogin/sociallogin_trackpixel.phtml +12 -14
- package.xml +5 -5
app/code/local/Soclever/Sociallogin/Block/Adminhtml/Help.php
DELETED
@@ -1,17 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
class Soclever_Sociallogin_Block_Adminhtml_Help extends Mage_Adminhtml_Block_System_Config_Form_Field
|
3 |
-
{
|
4 |
-
|
5 |
-
protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
|
6 |
-
{
|
7 |
-
|
8 |
-
$fileContent="<h1>Help is coming...Keep Visiting...Thanks....<a href='https://www.socleversocial.com' target='_blank'>Socleversocial.com</a></h1>";
|
9 |
-
return $fileContent;
|
10 |
-
|
11 |
-
|
12 |
-
}
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
}
|
17 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Soclever/Sociallogin/Block/Adminhtml/Positions.php
DELETED
@@ -1,115 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
class Soclever_Sociallogin_Block_Adminhtml_Positions extends Mage_Adminhtml_Block_System_Config_Form_Field
|
3 |
-
{
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
|
8 |
-
{
|
9 |
-
|
10 |
-
$site_id=Mage::getStoreConfig('sociallogin_options/apisettings/scsl_siteid');
|
11 |
-
$api_secret=Mage::getStoreConfig('sociallogin_options/apisettings/scsl_appsecret');
|
12 |
-
$api_key=Mage::getStoreConfig('sociallogin_options/apisettings/scsl_appid');
|
13 |
-
|
14 |
-
$valid_data=file_get_contents("https://www.socleversocial.com/dashboard/mage_activate.php?site_id=".$site_id."&api_key=".$api_key."&api_secret=".$api_secret."&csplatform=magentologin&type=preview");
|
15 |
-
if($valid_data && $valid_data[0]!='0')
|
16 |
-
{
|
17 |
-
$selectedButtons=Mage::getStoreConfig('sociallogin_options/displaysettings/buttonstyle');
|
18 |
-
$selectedProviders="https://www.socleversocial.com/dashboard/img/social_icon/social_login_fc_30.png";
|
19 |
-
$btn_style=Mage::getStoreConfig('sociallogin_options/displaysettings/buttonstyle');
|
20 |
-
$button_size=Mage::getStoreConfig('sociallogin_options/displaysettings/buttonsize');
|
21 |
-
$SITE_URL="https://www.socleversocial.com/dashboard/";
|
22 |
-
if($btn_style=="ic") {
|
23 |
-
$btn_width=$button_size;
|
24 |
-
}
|
25 |
-
else if($btn_style=="fc" || $btn_style=="fg")
|
26 |
-
{
|
27 |
-
if($button_size=="30") {$btn_width="78"; }
|
28 |
-
if($button_size=="40") {$btn_width="104"; }
|
29 |
-
if($button_size=="50") {$btn_width="130"; }
|
30 |
-
if($button_size=="60") {$btn_width="156"; }
|
31 |
-
if($button_size=="65") {$btn_width="169"; }
|
32 |
-
}
|
33 |
-
|
34 |
-
$network=explode(",",$valid_data);
|
35 |
-
$imgdiv="";
|
36 |
-
$img='social_login_'.$btn_style.'_'.$button_size.'.png';
|
37 |
-
if(in_array('2',$network))
|
38 |
-
{
|
39 |
-
$bg_position=$btn_width;
|
40 |
-
$imgdiv .='<div style="float: left; margin-right: 10px;margin-top: 10px; width: '.$btn_width.'px; height: '.$button_size.'px; background-image: url('.$SITE_URL.'img/social_icon/'.$img.'); background-position: -'.$bg_position.'px 0px;"></div>';
|
41 |
-
|
42 |
-
|
43 |
-
}
|
44 |
-
|
45 |
-
if(in_array('4',$network))
|
46 |
-
{
|
47 |
-
$bg_position=((3)*$btn_width);
|
48 |
-
|
49 |
-
$imgdiv .='<div style="float: left; margin-right: 10px;margin-top: 10px; width: '.$btn_width.'px; height: '.$button_size.'px; background-image: url('.$SITE_URL.'img/social_icon/'.$img.'); background-position: -'.$bg_position.'px 0px;"></div>';
|
50 |
-
|
51 |
-
|
52 |
-
}
|
53 |
-
|
54 |
-
if(in_array('7',$network))
|
55 |
-
{
|
56 |
-
$bg_position=((6)*$btn_width);
|
57 |
-
|
58 |
-
$imgdiv .='<div style="float: left; margin-right: 10px;margin-top: 10px; width: '.$btn_width.'px; height: '.$button_size.'px; background-image: url('.$SITE_URL.'img/social_icon/'.$img.'); background-position: -'.$bg_position.'px 0px;"></div>';
|
59 |
-
|
60 |
-
|
61 |
-
}
|
62 |
-
|
63 |
-
if(in_array('13',$network))
|
64 |
-
{
|
65 |
-
$bg_position=((12)*$btn_width);
|
66 |
-
|
67 |
-
$imgdiv .='<div style="float: left; margin-right: 10px;margin-top: 10px; width: '.$btn_width.'px; height: '.$button_size.'px; background-image: url('.$SITE_URL.'img/social_icon/'.$img.'); background-position: -'.$bg_position.'px 0px;"></div>';
|
68 |
-
|
69 |
-
|
70 |
-
}
|
71 |
-
|
72 |
-
if(in_array('15',$network))
|
73 |
-
{
|
74 |
-
$bg_position=((14)*$btn_width);
|
75 |
-
|
76 |
-
$imgdiv .='<div style="float: left; margin-right: 10px;margin-top: 10px; width: '.$btn_width.'px; height: '.$button_size.'px; background-image: url('.$SITE_URL.'img/social_icon/'.$img.'); background-position: -'.$bg_position.'px 0px;"></div>';
|
77 |
-
|
78 |
-
}
|
79 |
-
|
80 |
-
if(in_array('16',$network))
|
81 |
-
{
|
82 |
-
$bg_position=((15)*$btn_width); //change when image is added
|
83 |
-
|
84 |
-
$imgdiv .='<div style="float: left; margin-right: 10px;margin-top: 10px; width: '.$btn_width.'px; height: '.$button_size.'px; background-image: url('.$SITE_URL.'img/social_icon/'.$img.'); background-position: -'.$bg_position.'px 0px;"></div>';
|
85 |
-
|
86 |
-
}
|
87 |
-
|
88 |
-
if(in_array('5',$network))
|
89 |
-
{
|
90 |
-
$bg_position=((4)*$btn_width);
|
91 |
-
|
92 |
-
$imgdiv .='<div style="float: left; margin-right: 10px;margin-top: 10px; width: '.$btn_width.'px; height: '.$button_size.'px; background-image: url('.$SITE_URL.'img/social_icon/'.$img.'); background-position: -'.$bg_position.'px 0px;"></div>';
|
93 |
-
|
94 |
-
|
95 |
-
}
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
return '<div style="margin-bottom:20px;width:360px;margin-bottom:10px;float:left;">'.$imgdiv.'</div>';
|
100 |
-
|
101 |
-
}
|
102 |
-
else
|
103 |
-
{
|
104 |
-
return "<h1>Please provide valid API setting</h1>";
|
105 |
-
}
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
}
|
113 |
-
|
114 |
-
}
|
115 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Soclever/Sociallogin/Block/Help.php
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Soclever_Sociallogin_Block_Help extends Mage_Adminhtml_Block_System_Config_Form_Fieldset {
|
3 |
+
public function render(Varien_Data_Form_Element_Abstract $element) {
|
4 |
+
$html = $this->_getHeaderHtml($element);
|
5 |
+
$html.= $this->_getFieldHtml($element);
|
6 |
+
$html .= $this->_getFooterHtml($element);
|
7 |
+
return $html;
|
8 |
+
}
|
9 |
+
protected function _getFieldHtml($fieldset) {
|
10 |
+
$content = '<ul style="float:left; margin-right:43px">
|
11 |
+
<li>1. <a target="_blank" href="https://www.socleversocial.com/dashboard/login.php">Login</a> to your SoClever account. Or <a target="_blank" href="https://www.socleversocial.com/pricing/">Register</a> for free account to generate API Keys. </li>
|
12 |
+
<li>2. Go to <a target="_blank" href="https://www.socleversocial.com/dashboard/billing_profile_setting.php">Site Settings</a> . Your API key, API secret and site ID will be displayed on this page.</li>
|
13 |
+
<li>3. Configure your API details on API settings tab on your magento Admin Panel.</li>
|
14 |
+
<li>4. To be able to enable Social Login for your site, please create Social Apps on social networks. For more information on how to create Apps for your website please visit our help section on <a target="_blank" href="http://developers.socleversocial.com/category/social-network-set-up/">Social Network Set Up</a>.</li>
|
15 |
+
<li>5. Please configure your Social Apps API details on SoClever <a target="_blank" href="https://www.socleversocial.com/dashboard/authorization_setting.php">Authorization page</a>.</li>
|
16 |
+
<li>6. Once you configure Authorization Page, social network buttons will be unlocked to use at <a target="_blank" href="https://www.socleversocial.com/dashboard/social_login_setting.php">Login Settings Page</a>. Please select social networks you want to use for social login and save settings.</li>
|
17 |
+
<li>7. Refresh your admin panel to configure button size, padding gap and buttons style.</li>
|
18 |
+
<li>Feel free to <a target="_blank" href="https://www.socleversocial.com/contact-us/">contact us</a> for any assistance you may require.</li>
|
19 |
+
</ul>
|
20 |
+
';
|
21 |
+
return $content;
|
22 |
+
}
|
23 |
+
}
|
app/code/local/Soclever/Sociallogin/Model/Info.php
ADDED
@@ -0,0 +1,109 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Soclever_Sociallogin_Model_Info extends Mage_Adminhtml_Block_Abstract implements Varien_Data_Form_Element_Renderer_Interface
|
3 |
+
{
|
4 |
+
|
5 |
+
|
6 |
+
public function render(Varien_Data_Form_Element_Abstract $element)
|
7 |
+
{
|
8 |
+
|
9 |
+
|
10 |
+
$this->render_module_thanks_message_container();
|
11 |
+
|
12 |
+
|
13 |
+
$this->render_module_info_container();
|
14 |
+
|
15 |
+
|
16 |
+
$this->render_module_help_and_documentations_container();
|
17 |
+
|
18 |
+
|
19 |
+
$this->render_module_support_us_container();
|
20 |
+
|
21 |
+
|
22 |
+
}
|
23 |
+
|
24 |
+
public function render_module_thanks_message_container()
|
25 |
+
{
|
26 |
+
?>
|
27 |
+
<fieldset>
|
28 |
+
<h4><strong><?php echo $this->__('Thank you for installing SoClever Extension!') ?></strong></h4>
|
29 |
+
|
30 |
+
<p>
|
31 |
+
<?php echo $this->__('To activate the extension, you will need to first configure it (manage your desired social networks apps, etc.) from your SoCLever account. If you do not have an account, click') ?>
|
32 |
+
<a target="_blank" href="https://www.socleversocial.com/"><?php echo $this->__('here') ?></a> <?php echo $this->__('and create one for FREE!') ?>
|
33 |
+
</p>
|
34 |
+
</br>
|
35 |
+
<div style="margin-top:10px">
|
36 |
+
<a style="text-decoration:none;margin-right:10px;" href="https://www.socleversocial.com/" target="_blank">
|
37 |
+
<input class="form-button" type="button" value="<?php echo $this->__('Set up my FREE account!') ?>">
|
38 |
+
</a>
|
39 |
+
</div>
|
40 |
+
</fieldset>
|
41 |
+
<?php
|
42 |
+
}
|
43 |
+
|
44 |
+
public function render_module_info_container()
|
45 |
+
{
|
46 |
+
?>
|
47 |
+
<fieldset class="ss_admin_configuration_info_fieldsets ss_configuration_info_fieldsets_right" id="ss_extension_info_container">
|
48 |
+
<h4 class="ss_admin_fieldset_title"><strong><?php echo $this->__('Extension Information!') ?></strong></h4>
|
49 |
+
|
50 |
+
<div style="margin:5px 0">
|
51 |
+
<strong>Version: </strong>1.1.0 <br/>
|
52 |
+
<strong>Author:</strong>Soclever Social<br/>
|
53 |
+
<strong>Website:</strong> <a href="https://www.socleversocial.com" target="_blank">www.socleversocial.com</a>
|
54 |
+
<br/>
|
55 |
+
|
56 |
+
<div id="sociallogin_get_update" style="float:left;">To receive updates on new features and releases, Please follow us on one of our social media pages
|
57 |
+
</div>
|
58 |
+
<div id="ss_media_pages_container">
|
59 |
+
<a target="_blank" href="https://www.facebook.com/socleversocial"><img
|
60 |
+
src="https://www.socleversocial.com/dashboard/img/social_icon/30x30/30x30_facebook.png"></a>
|
61 |
+
<a target="_blank" href="http://twitter.com/socleversocial"><img
|
62 |
+
src="https://www.socleversocial.com/dashboard/img/social_icon/30x30/30x30_twitter.png"></a>
|
63 |
+
<a target="_blank" href="https://plus.google.com/u/4/b/100077356381531929431"> <img
|
64 |
+
src="https://www.socleversocial.com/dashboard/img/social_icon/30x30/30x30_google_plus.png"></a>
|
65 |
+
<a target="_blank" href="http://www.linkedin.com/company/soclever"> <img
|
66 |
+
src="https://www.socleversocial.com/dashboard/img/social_icon/30x30/30x30_linkedin.png"></a>
|
67 |
+
</div>
|
68 |
+
</div>
|
69 |
+
</fieldset>
|
70 |
+
<?php
|
71 |
+
}
|
72 |
+
|
73 |
+
public function render_module_help_and_documentations_container()
|
74 |
+
{
|
75 |
+
?>
|
76 |
+
<fieldset class="ss_admin_configuration_info_fieldsets ss_configuration_info_fieldsets_left" id="ss_extension_help_container">
|
77 |
+
<h4 class="ss_admin_fieldset_title"><strong><?php echo $this->__('Help & Documentations') ?></strong></h4>
|
78 |
+
<ul style="float:left; margin-right:43px">
|
79 |
+
<li><a target="_blank" href="http://developers.socleversocial.com/magento-social-login-extension/">Extension Installation and Configuration</a></li>
|
80 |
+
<li><a target="_blank" href="http://developers.socleversocial.com/how-to-get-api-key-and-secret/">How to get SoClever API Key & Secret</a></li>
|
81 |
+
<li><a target="_blank" href="http://developers.socleversocial.com/category/social-network-set-up/">How to create Social Network Apps</a></li>
|
82 |
+
<li><a target="_blank" href="https://www.socleversocial.com/">SoClever Products</a></li>
|
83 |
+
</ul>
|
84 |
+
<ul style="float:left; margin-right:43px">
|
85 |
+
<li><a target="_blank" href="http://developers.socleversocial.com/">Developer Forum</a></li>
|
86 |
+
<li><a target="_blank" href="https://www.socleversocial.com/about-us/">About SoCleverSocial</a></li>
|
87 |
+
<li><a target="_blank" href="http://developers.socleversocial.com/category/cms-plugins/">Social Plugins</a></li>
|
88 |
+
</ul>
|
89 |
+
</fieldset>
|
90 |
+
<?php
|
91 |
+
}
|
92 |
+
|
93 |
+
public function render_module_support_us_container()
|
94 |
+
{
|
95 |
+
?>
|
96 |
+
<fieldset class="ss_admin_configuration_info_fieldsets ss_configuration_info_fieldsets_right" id="ss_extension_support_container">
|
97 |
+
<h4 class="ss_admin_fieldset_title"><strong><?php echo $this->__('Support') ?></strong></h4>
|
98 |
+
|
99 |
+
<p>
|
100 |
+
<?php echo $this->__('<a target="_blank" href="https://www.socleversocial.com/contact-us/">Click Here</a>') ?> to contact us. You can also email our support team at
|
101 |
+
<a href="mailto:info@socleversocial.com">info@socleversocial.com</a> </p>
|
102 |
+
</fieldset>
|
103 |
+
<div style='clear:both'></div>
|
104 |
+
|
105 |
+
|
106 |
+
<?php
|
107 |
+
}
|
108 |
+
}
|
109 |
+
?>
|
app/code/local/Soclever/Sociallogin/Model/Observer.php
ADDED
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Soclever_Sociallogin_Model_Observer
|
3 |
+
{
|
4 |
+
|
5 |
+
|
6 |
+
public function writejs(Varien_Event_Observer $observer)
|
7 |
+
{
|
8 |
+
|
9 |
+
$site_id=Mage::getStoreConfig('sociallogin_options/apisettings/scsl_siteid');
|
10 |
+
$api_secret=Mage::getStoreConfig('sociallogin_options/apisettings/scsl_appsecret');
|
11 |
+
$api_key=Mage::getStoreConfig('sociallogin_options/apisettings/scsl_appid');
|
12 |
+
|
13 |
+
|
14 |
+
|
15 |
+
$valid_data=file_get_contents("https://www.socleversocial.com/dashboard/mage_login_activate.php?site_id=".$site_id."&api_key=".$api_key."&api_secret=".$api_secret."&csplatform=magentologin&type=preview");
|
16 |
+
if($valid_data!='0')
|
17 |
+
{
|
18 |
+
Mage::getModel('core/config')->saveConfig('sociallogin_options/apisettings/scsl_validated',"1");
|
19 |
+
Mage::getModel('core/config')->saveConfig('sociallogin_options/apisettings/valid_networks',$valid_data);
|
20 |
+
|
21 |
+
}
|
22 |
+
else
|
23 |
+
{
|
24 |
+
Mage::getModel('core/config')->saveConfig('sociallogin_options/apisettings/scsl_validated',"0");
|
25 |
+
}
|
26 |
+
|
27 |
+
|
28 |
+
}
|
29 |
+
|
30 |
+
}
|
31 |
+
|
32 |
+
|
33 |
+
?>
|
app/code/local/Soclever/Sociallogin/Model/Providers.php
CHANGED
@@ -14,6 +14,27 @@ class Soclever_Sociallogin_Model_Providers
|
|
14 |
$buttonsizearray=array("30"=>"30px","40"=>"40px","50"=>"50px","60"=>"60px","65"=>"65px");
|
15 |
return $buttonsizearray;
|
16 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
|
18 |
|
19 |
}
|
14 |
$buttonsizearray=array("30"=>"30px","40"=>"40px","50"=>"50px","60"=>"60px","65"=>"65px");
|
15 |
return $buttonsizearray;
|
16 |
}
|
17 |
+
public function getloginproviders()
|
18 |
+
{
|
19 |
+
return array(
|
20 |
+
array('value'=>0, 'label'=>'None'),
|
21 |
+
array('value'=>2, 'label'=>'Facebook'),
|
22 |
+
array('value'=>4, 'label'=>'Google+'),
|
23 |
+
array('value'=>7, 'label'=>'LinkedIN'),
|
24 |
+
array('value'=>15, 'label'=>'Yahoo!'),
|
25 |
+
array('value'=>16, 'label'=>'Paypal'),
|
26 |
+
|
27 |
+
);
|
28 |
+
/*$providers=array("2"=>"Facebook","4"=>"Google+","7"=>"LinkedIN","13"=>"Twitter","17"=>"Pinterest");
|
29 |
+
return $providers;*/
|
30 |
+
}
|
31 |
+
public function showpoweredby()
|
32 |
+
{
|
33 |
+
$showpoweredby=array();
|
34 |
+
$showpoweredby=array("1"=>"Yes","0"=>"No");
|
35 |
+
return $showpoweredby;
|
36 |
+
|
37 |
+
}
|
38 |
|
39 |
|
40 |
}
|
app/code/local/Soclever/Sociallogin/controllers/IndexController.php
CHANGED
@@ -125,6 +125,9 @@ $customer = Mage::getModel("customer/customer");
|
|
125 |
Mage::getModel('core/session', array('name' => 'frontend'));
|
126 |
$customer->setWebsiteId(Mage::app()->getWebsite()->getId());
|
127 |
$customer->loadByEmail($username);
|
|
|
|
|
|
|
128 |
|
129 |
$redirect_location=($_COOKIE['lc']=='c')?Mage::getBaseUrl()."checkout/onepage/":Mage::getBaseUrl()."customer/account/";
|
130 |
if(isset($_COOKIE['lch']) && $_COOKIE['lch']!='')
|
@@ -231,6 +234,9 @@ $customer = Mage::getModel("customer/customer");
|
|
231 |
Mage::getModel('core/session', array('name' => 'frontend'));
|
232 |
$customer->setWebsiteId(Mage::app()->getWebsite()->getId());
|
233 |
$customer->loadByEmail($username);
|
|
|
|
|
|
|
234 |
$redirect_location=($_GET['lc']=='c')?Mage::getBaseUrl()."checkout/onepage/":Mage::getBaseUrl()."customer/account/";
|
235 |
$is_from='7';
|
236 |
Mage::getSingleton('core/session')->setSessionVariable($is_from);
|
@@ -419,7 +425,10 @@ $customer = Mage::getModel("customer/customer");
|
|
419 |
|
420 |
Mage::getModel('core/session', array('name' => 'frontend'));
|
421 |
$customer->setWebsiteId(Mage::app()->getWebsite()->getId());
|
422 |
-
$customer->loadByEmail($username);
|
|
|
|
|
|
|
423 |
$this->getSession()->loginById($customer->getId());
|
424 |
|
425 |
if(Mage::getSingleton('customer/session')->isLoggedIn())
|
125 |
Mage::getModel('core/session', array('name' => 'frontend'));
|
126 |
$customer->setWebsiteId(Mage::app()->getWebsite()->getId());
|
127 |
$customer->loadByEmail($username);
|
128 |
+
$customer->setCustomerActivated(true);
|
129 |
+
$customer->save();
|
130 |
+
|
131 |
|
132 |
$redirect_location=($_COOKIE['lc']=='c')?Mage::getBaseUrl()."checkout/onepage/":Mage::getBaseUrl()."customer/account/";
|
133 |
if(isset($_COOKIE['lch']) && $_COOKIE['lch']!='')
|
234 |
Mage::getModel('core/session', array('name' => 'frontend'));
|
235 |
$customer->setWebsiteId(Mage::app()->getWebsite()->getId());
|
236 |
$customer->loadByEmail($username);
|
237 |
+
$customer->setCustomerActivated(true);
|
238 |
+
$customer->save();
|
239 |
+
|
240 |
$redirect_location=($_GET['lc']=='c')?Mage::getBaseUrl()."checkout/onepage/":Mage::getBaseUrl()."customer/account/";
|
241 |
$is_from='7';
|
242 |
Mage::getSingleton('core/session')->setSessionVariable($is_from);
|
425 |
|
426 |
Mage::getModel('core/session', array('name' => 'frontend'));
|
427 |
$customer->setWebsiteId(Mage::app()->getWebsite()->getId());
|
428 |
+
$customer->loadByEmail($username);
|
429 |
+
$customer->setCustomerActivated(true);
|
430 |
+
$customer->save();
|
431 |
+
|
432 |
$this->getSession()->loginById($customer->getId());
|
433 |
|
434 |
if(Mage::getSingleton('customer/session')->isLoggedIn())
|
app/code/local/Soclever/Sociallogin/etc/config.xml
CHANGED
@@ -22,7 +22,8 @@
|
|
22 |
<default>
|
23 |
<sociallogin_options>
|
24 |
<displaysettings>
|
25 |
-
<buttonstyle>ic</buttonstyle>
|
|
|
26 |
</displaysettings>
|
27 |
</sociallogin_options>
|
28 |
</default>
|
@@ -114,5 +115,16 @@
|
|
114 |
<class>Soclever_Sociallogin_Helper</class>
|
115 |
</sociallogin>
|
116 |
</helpers>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
117 |
</global>
|
118 |
</config>
|
22 |
<default>
|
23 |
<sociallogin_options>
|
24 |
<displaysettings>
|
25 |
+
<buttonstyle>ic</buttonstyle>
|
26 |
+
<socialloginboxcaption>Login With:</socialloginboxcaption>
|
27 |
</displaysettings>
|
28 |
</sociallogin_options>
|
29 |
</default>
|
115 |
<class>Soclever_Sociallogin_Helper</class>
|
116 |
</sociallogin>
|
117 |
</helpers>
|
118 |
+
<events>
|
119 |
+
<admin_system_config_changed_section_sociallogin_options>
|
120 |
+
<observers>
|
121 |
+
<myobserver>
|
122 |
+
<type>singleton</type>
|
123 |
+
<class>sociallogin/observer</class>
|
124 |
+
<method>writejs</method>
|
125 |
+
</myobserver>
|
126 |
+
</observers>
|
127 |
+
</admin_system_config_changed_section_sociallogin_options>
|
128 |
+
</events>
|
129 |
</global>
|
130 |
</config>
|
app/code/local/Soclever/Sociallogin/etc/system.xml
CHANGED
@@ -8,7 +8,7 @@
|
|
8 |
</tabs>
|
9 |
<sections>
|
10 |
<sociallogin_options translate="label" module="sociallogin">
|
11 |
-
<label>
|
12 |
<tab>socialloginsetting</tab>
|
13 |
<frontend_type>text</frontend_type>
|
14 |
<sort_order>1020</sort_order>
|
@@ -16,6 +16,14 @@
|
|
16 |
<show_in_website>1</show_in_website>
|
17 |
<show_in_store>1</show_in_store>
|
18 |
<groups>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
<apisettings translate="label">
|
20 |
<label>SocleverSocial Login API Settings</label>
|
21 |
<frontend_type>text</frontend_type>
|
@@ -63,7 +71,7 @@
|
|
63 |
</fields>
|
64 |
</apisettings>
|
65 |
<displaysettings translate="label">
|
66 |
-
<label>
|
67 |
<frontend_type>text</frontend_type>
|
68 |
<sort_order>2</sort_order>
|
69 |
<show_in_default>1</show_in_default>
|
@@ -72,7 +80,7 @@
|
|
72 |
<fields>
|
73 |
<buttonstyle translate="label">
|
74 |
<label>Select Button Style</label>
|
75 |
-
<frontend_type>
|
76 |
<source_model>sociallogin/providers::getbuttonstyles</source_model>
|
77 |
<sort_order>200</sort_order>
|
78 |
<show_in_default>1</show_in_default>
|
@@ -88,28 +96,37 @@
|
|
88 |
<show_in_website>1</show_in_website>
|
89 |
<show_in_store>1</show_in_store>
|
90 |
</buttonsize>
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
<frontend_type>text</frontend_type>
|
96 |
-
<sort_order>3</sort_order>
|
97 |
-
<show_in_default>1</show_in_default>
|
98 |
-
<show_in_website>1</show_in_website>
|
99 |
-
<show_in_store>1</show_in_store>
|
100 |
-
<fields>
|
101 |
-
<previewshow translate="label">
|
102 |
-
<label>Chosen Providers and Current Preview</label>
|
103 |
-
<frontend_model>sociallogin/adminhtml_positions</frontend_model>
|
104 |
-
<comment><![CDATA[Your chosen networks on socleversocial.com dashboard and current preview ]]></comment>
|
105 |
<sort_order>201</sort_order>
|
106 |
<show_in_default>1</show_in_default>
|
107 |
<show_in_website>1</show_in_website>
|
108 |
<show_in_store>1</show_in_store>
|
109 |
-
</
|
110 |
-
|
111 |
-
|
112 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
113 |
</sociallogin_options>
|
114 |
</sections>
|
115 |
</config>
|
8 |
</tabs>
|
9 |
<sections>
|
10 |
<sociallogin_options translate="label" module="sociallogin">
|
11 |
+
<label>SoClever Social Login</label>
|
12 |
<tab>socialloginsetting</tab>
|
13 |
<frontend_type>text</frontend_type>
|
14 |
<sort_order>1020</sort_order>
|
16 |
<show_in_website>1</show_in_website>
|
17 |
<show_in_store>1</show_in_store>
|
18 |
<groups>
|
19 |
+
<info translate="label">
|
20 |
+
<frontend_model>Soclever_Sociallogin_Model_Info</frontend_model>
|
21 |
+
<comment><![CDATA[]]></comment>
|
22 |
+
<sort_order>1</sort_order>
|
23 |
+
<show_in_default>1</show_in_default>
|
24 |
+
<show_in_website>1</show_in_website>
|
25 |
+
<show_in_store>1</show_in_store>
|
26 |
+
</info>
|
27 |
<apisettings translate="label">
|
28 |
<label>SocleverSocial Login API Settings</label>
|
29 |
<frontend_type>text</frontend_type>
|
71 |
</fields>
|
72 |
</apisettings>
|
73 |
<displaysettings translate="label">
|
74 |
+
<label>Social Login Settings</label>
|
75 |
<frontend_type>text</frontend_type>
|
76 |
<sort_order>2</sort_order>
|
77 |
<show_in_default>1</show_in_default>
|
80 |
<fields>
|
81 |
<buttonstyle translate="label">
|
82 |
<label>Select Button Style</label>
|
83 |
+
<frontend_type>select</frontend_type>
|
84 |
<source_model>sociallogin/providers::getbuttonstyles</source_model>
|
85 |
<sort_order>200</sort_order>
|
86 |
<show_in_default>1</show_in_default>
|
96 |
<show_in_website>1</show_in_website>
|
97 |
<show_in_store>1</show_in_store>
|
98 |
</buttonsize>
|
99 |
+
<socialloginproviders translate="label">
|
100 |
+
<label>Select Providers</label>
|
101 |
+
<frontend_type>multiselect</frontend_type>
|
102 |
+
<source_model>sociallogin/providers::getloginproviders</source_model>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
103 |
<sort_order>201</sort_order>
|
104 |
<show_in_default>1</show_in_default>
|
105 |
<show_in_website>1</show_in_website>
|
106 |
<show_in_store>1</show_in_store>
|
107 |
+
</socialloginproviders>
|
108 |
+
<socialloginboxcaption translate="label">
|
109 |
+
<label>Login Box Caption</label>
|
110 |
+
<frontend_type>text</frontend_type>
|
111 |
+
<comment><![CDATA[Text to display on social login box i.e Social Login By]]></comment>
|
112 |
+
<sort_order>202</sort_order>
|
113 |
+
<show_in_default>1</show_in_default>
|
114 |
+
<show_in_website>1</show_in_website>
|
115 |
+
<show_in_store>1</show_in_store>
|
116 |
+
</socialloginboxcaption>
|
117 |
+
<socialloginpowerby translate="label">
|
118 |
+
<label>Show Powered by SoClever</label>
|
119 |
+
<frontend_type>select</frontend_type>
|
120 |
+
<source_model>sociallogin/providers::showpoweredby</source_model>
|
121 |
+
<comment><![CDATA[At the bottom of login box will show "Powered By Socleversocial.com"]]></comment>
|
122 |
+
<sort_order>202</sort_order>
|
123 |
+
<show_in_default>1</show_in_default>
|
124 |
+
<show_in_website>1</show_in_website>
|
125 |
+
<show_in_store>1</show_in_store>
|
126 |
+
</socialloginpowerby>
|
127 |
+
</fields>
|
128 |
+
</displaysettings>
|
129 |
+
</groups>
|
130 |
</sociallogin_options>
|
131 |
</sections>
|
132 |
</config>
|
app/design/frontend/base/default/template/sociallogin/scsl_buttons.phtml
CHANGED
@@ -4,8 +4,17 @@ $api_secret=Mage::getStoreConfig('sociallogin_options/apisettings/scsl_appsecret
|
|
4 |
$api_key=Mage::getStoreConfig('sociallogin_options/apisettings/scsl_appid');
|
5 |
$btn_style=Mage::getStoreConfig('sociallogin_options/displaysettings/buttonstyle');
|
6 |
$button_size=Mage::getStoreConfig('sociallogin_options/displaysettings/buttonsize');
|
7 |
-
|
8 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
|
10 |
if($valid_data && $valid_data!='0~~0')
|
11 |
{
|
@@ -13,8 +22,10 @@ $button_size=Mage::getStoreConfig('sociallogin_options/displaysettings/buttonsiz
|
|
13 |
}
|
14 |
else
|
15 |
{
|
16 |
-
echo"
|
|
|
17 |
}
|
|
|
18 |
|
19 |
|
20 |
|
4 |
$api_key=Mage::getStoreConfig('sociallogin_options/apisettings/scsl_appid');
|
5 |
$btn_style=Mage::getStoreConfig('sociallogin_options/displaysettings/buttonstyle');
|
6 |
$button_size=Mage::getStoreConfig('sociallogin_options/displaysettings/buttonsize');
|
7 |
+
$loginboxcaption=Mage::getStoreConfig('sociallogin_options/displaysettings/socialloginboxcaption');
|
8 |
+
$showpoweredby=Mage::getStoreConfig('sociallogin_options/displaysettings/socialloginpowerby');
|
9 |
+
|
10 |
+
$is_validated=Mage::getStoreConfig('sociallogin_options/apisettings/scsl_validated');
|
11 |
+
|
12 |
+
$selected_providers=Mage::getStoreConfig('sociallogin_options/displaysettings/socialloginproviders');
|
13 |
+
|
14 |
+
if($is_validated=='1' && $selected_providers!='' && $selected_providers!='0')
|
15 |
+
{
|
16 |
+
|
17 |
+
$valid_data=file_get_contents("https://www.socleversocial.com/dashboard/mage_login_buttons.php?login_only=1&site_id=".$site_id."&api_key=".$api_key."&api_secret=".$api_secret."&csplatform=magentologin&rt=gp&bcaption=".base64_encode($loginboxcaption)."&bshow=".$showpoweredby."&bstyle=".$btn_style."&bsize=".$button_size."&providers=".$selected_providers);
|
18 |
|
19 |
if($valid_data && $valid_data!='0~~0')
|
20 |
{
|
22 |
}
|
23 |
else
|
24 |
{
|
25 |
+
echo"";
|
26 |
+
}
|
27 |
}
|
28 |
+
echo"";
|
29 |
|
30 |
|
31 |
|
app/design/frontend/base/default/template/sociallogin/sociallogin_head.phtml
CHANGED
@@ -1,11 +1,15 @@
|
|
1 |
<?php
|
|
|
|
|
|
|
2 |
if(!Mage::getSingleton('customer/session')->isLoggedIn())
|
3 |
{
|
4 |
-
echo'<script type="text/javascript" src="https://www.socleversocial.com/dashboard/client_share_js/client_'.Mage::getStoreConfig('sociallogin_options/apisettings/scsl_siteid').'
|
5 |
'<script type="text/javascript">'.PHP_EOL.
|
6 |
'csloginjs.init([\''.Mage::getStoreConfig('sociallogin_options/apisettings/scsl_appid').'\', \''.Mage::getStoreConfig('sociallogin_options/apisettings/scsl_siteid').'\',\''.Mage::getStoreConfig('sociallogin_options/apisettings/scsl_appsecret').'\',\''.Mage::getStoreConfig('sociallogin_options/apisettings/scsl_validdomain').'\']);'.PHP_EOL.
|
7 |
'csloginjs.validateCsApi();'.PHP_EOL.
|
8 |
'</script>'.PHP_EOL;
|
9 |
|
|
|
10 |
}
|
11 |
?>
|
1 |
<?php
|
2 |
+
$is_validated=Mage::getStoreConfig('sociallogin_options/apisettings/scsl_validated');
|
3 |
+
if($is_validated=='1')
|
4 |
+
{
|
5 |
if(!Mage::getSingleton('customer/session')->isLoggedIn())
|
6 |
{
|
7 |
+
echo'<script type="text/javascript" src="https://www.socleversocial.com/dashboard/client_share_js/client_'.Mage::getStoreConfig('sociallogin_options/apisettings/scsl_siteid').'_onlylogin.js"></script>'.PHP_EOL.
|
8 |
'<script type="text/javascript">'.PHP_EOL.
|
9 |
'csloginjs.init([\''.Mage::getStoreConfig('sociallogin_options/apisettings/scsl_appid').'\', \''.Mage::getStoreConfig('sociallogin_options/apisettings/scsl_siteid').'\',\''.Mage::getStoreConfig('sociallogin_options/apisettings/scsl_appsecret').'\',\''.Mage::getStoreConfig('sociallogin_options/apisettings/scsl_validdomain').'\']);'.PHP_EOL.
|
10 |
'csloginjs.validateCsApi();'.PHP_EOL.
|
11 |
'</script>'.PHP_EOL;
|
12 |
|
13 |
+
}
|
14 |
}
|
15 |
?>
|
app/design/frontend/base/default/template/sociallogin/sociallogin_trackpixel.phtml
CHANGED
@@ -1,15 +1,13 @@
|
|
1 |
-
<?php
|
2 |
-
$
|
3 |
-
$
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
//print_r($Csorder);
|
14 |
-
|
15 |
?>
|
1 |
+
<?php
|
2 |
+
$is_validated=Mage::getStoreConfig('sociallogin_options/apisettings/scsl_validated');
|
3 |
+
if($is_validated=='1')
|
4 |
+
{
|
5 |
+
$CsorderId = Mage::getSingleton('checkout/session')->getLastRealOrderId();
|
6 |
+
$Csorder = Mage::getModel('sales/order')->loadByIncrementId($CsorderId);
|
7 |
+
|
8 |
+
$sessionVariable = Mage::getSingleton('core/session')->getSessionVariable();
|
9 |
+
|
10 |
+
echo"<img src='https://www.socleversocial.com/dashboard/trackPixel.php?site_id=".Mage::getStoreConfig('sociallogin_options/apisettings/scsl_siteid')."&order_id=".$CsorderId."&ord_amt=".$Csorder->getGrandTotal()."&ord_cur=".$Csorder->base_currency_code."&siteUid=".$Csorder->customer_id."&is_from=".$sessionVariable."' />";
|
11 |
+
|
12 |
+
}
|
|
|
|
|
13 |
?>
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>soclever_login</name>
|
4 |
-
<version>1.0
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL</license>
|
7 |
<channel>community</channel>
|
@@ -28,11 +28,11 @@
|
|
28 |
Send personalised message to your visitors by using our birthday reports. </p>
|
29 |
<p><strong>Dynamic JavaScript</strong><br />
|
30 |
Our asynchronous javascript loads faster without interfearing with the display or behaviour of the page. Dynamic JavaScript makes it easy to choose/sort social netork buttons for display.</p></description>
|
31 |
-
<notes>Stable Version 1.0
|
32 |
<authors><author><name>Soclever Social</name><user>Socleversocial</user><email>hemang@socleversocial.com</email></author></authors>
|
33 |
-
<date>2015-
|
34 |
-
<time>06:
|
35 |
-
<contents><target name="magelocal"><dir name="Soclever"><dir name="Sociallogin"><dir name="Block"><dir name="Adminhtml"><file name="Help.php" hash="
|
36 |
<compatible/>
|
37 |
<dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
|
38 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>soclever_login</name>
|
4 |
+
<version>1.1.0</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL</license>
|
7 |
<channel>community</channel>
|
28 |
Send personalised message to your visitors by using our birthday reports. </p>
|
29 |
<p><strong>Dynamic JavaScript</strong><br />
|
30 |
Our asynchronous javascript loads faster without interfearing with the display or behaviour of the page. Dynamic JavaScript makes it easy to choose/sort social netork buttons for display.</p></description>
|
31 |
+
<notes>Stable Version 1.1.0 - UX and UI Improvement</notes>
|
32 |
<authors><author><name>Soclever Social</name><user>Socleversocial</user><email>hemang@socleversocial.com</email></author></authors>
|
33 |
+
<date>2015-02-27</date>
|
34 |
+
<time>06:40:14</time>
|
35 |
+
<contents><target name="magelocal"><dir name="Soclever"><dir name="Sociallogin"><dir name="Block"><dir name="Adminhtml"><file name="Help.php" hash=""/><file name="Positions.php" hash=""/></dir><file name="Scslhead.php" hash="19915d8ad186673c4e068abcd2f700d8"/><file name="Scslshow.php" hash="3e868132953b63c93af6cb7b396b095a"/><file name="Scsltrackpixel.php" hash="865c3da829f0dc1cd384fb113e771c34"/><file name="Scslheadfb.php" hash="01f8e5fca1e7a59dcc7009a9d79d31f5"/><file name="Help.php" hash="215af72ed8f481563444f00b30fd39ca"/></dir><dir name="controllers"><file name="IndexController.php" hash="da5bc5c2e4abb2f238d6e544a66dc75f"/><file name="openid.php" hash="421d5936957b8ddda543b679d1876f04"/></dir><dir name="etc"><file name="config.xml" hash="6df38e3cbf3f83160f9bc95c4aca7156"/><file name="system.xml" hash="05a790199e16e6be233805eafd62c116"/></dir><dir name="Helper"><file name="Data.php" hash="89f8191f1442a7e56f7a4d0b54049d3a"/></dir><dir name="Model"><file name="Providers.php" hash="0c0d062acfd7730f739856ae045db6ff"/><file name="Info.php" hash="d1d93f2bc9861955c1a3027f6b56addd"/><file name="Observer.php" hash="b55f31f318d8be06c9e27d5220483f13"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="sociallogin.xml" hash="444082a425071b527e955ecd0ebedce8"/></dir><dir name="template"><dir name="sociallogin"><file name="scsl_buttons.phtml" hash="f782950bdd5e10911aa3c4ca50502fa8"/><file name="sociallogin_head.phtml" hash="bea2af51090eb0c1a5d0f8d7921aa81f"/><file name="sociallogin_fb.phtml" hash="718d8596a14d123d83afb0d5d6d6fd96"/><file name="sociallogin_trackpixel.phtml" hash="40ff5c12d2c4b3ba41c86695bd4a04c3"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="soclever_sociallogin.xml" hash="8f1fa6f55fc92b4474f696f3678c0281"/></dir></target></contents>
|
36 |
<compatible/>
|
37 |
<dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
|
38 |
</package>
|