Gigya_Socialize - Version 2.0.2

Version Notes

notify login fix

Download this release

Release Info

Developer Yaniv Aran-Shamir
Extension Gigya_Socialize
Version 2.0.2
Comparing to
See all releases


Code changes from version 2.0.1 to 2.0.2

app/code/community/Gigya/Social/Block/Html/Head.php CHANGED
@@ -2,11 +2,9 @@
2
  /**
3
  *
4
  */
5
- class Gigya_Social_Block_Html_Head extends Mage_Page_Block_Html_Head
6
- {
7
 
8
- protected function _construct()
9
- {
10
  if (Mage::helper('Gigya_Social')->isPluginEnabled('gigya_global/gigya_global_conf')) {
11
  $this->setTemplate('page/html/head.phtml');
12
  $uriPrefix = !empty($_SERVER['HTTPS']) ? 'https://cdns' : 'http://cdn';
@@ -15,7 +13,7 @@ class Gigya_Social_Block_Html_Head extends Mage_Page_Block_Html_Head
15
  $jsParams = array(
16
  'enabledProviders' => (Mage::getStoreConfig('gigya_global/gigya_global_conf/providers') !== '') ? Mage::getStoreConfig('gigya_global/gigya_global_conf/providers') : '*',
17
  'lang' => Mage::getStoreConfig('gigya_global/gigya_global_conf/laguages'),
18
- 'sessionExpiration' => (int)Mage::getStoreConfig('web/cookie/cookie_lifetime'),
19
  'connectWithoutLoginBehavior' => Mage::getStoreConfig('gigya_login/gigya_login_conf/loginBehavior'),
20
  );
21
  $this->_data['items']['js/gigya'] = array(
@@ -27,95 +25,104 @@ class Gigya_Social_Block_Html_Head extends Mage_Page_Block_Html_Head
27
  );
28
  if (Mage::getStoreConfig('gigya_global/gigya_global_conf/google_sa')) {
29
  $ga = $uriPrefix . '.gigya.com/js/gigyaGAIntegration.js';
30
- $this->_data['items']['js/gigyaGA'] = array(
31
- 'type' => 'external_js',
32
- 'name' => $ga,
 
 
 
 
 
 
 
 
 
33
  'if' => '',
34
- 'cond' => '',
35
  );
36
-
37
- }
38
  }
39
  }
40
- protected function _separateOtherHtmlHeadElements(&$lines, $itemIf, $itemType, $itemParams, $itemName, $itemThe)
41
- {
42
- $params = $itemParams ? ' ' . $itemParams : '';
43
- $href = $itemName;
44
- switch ($itemType) {
45
- case 'rss':
46
- $lines[$itemIf]['other'][] = sprintf('<link href="%s"%s rel="alternate" type="application/rss+xml" />',
47
- $href, $params
48
- );
49
- break;
50
- case 'link_rel':
51
- $lines[$itemIf]['other'][] = sprintf('<link%s href="%s" />', $params, $href);
52
- break;
53
 
54
- case 'external_js':
55
- $lines[$itemIf]['other'][] = sprintf('<script type="text/javascript" src="%s">%s</script>', $href, $params);
56
- break;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
57
 
58
- }
59
  }
 
60
 
61
- public function getCssJsHtml()
62
- {
63
- // separate items by types
64
- $lines = array();
65
- foreach ($this->_data['items'] as $item) {
66
- if (!is_null($item['cond']) && !$this->getData($item['cond']) || !isset($item['name'])) {
67
- continue;
68
- }
69
- $if = !empty($item['if']) ? $item['if'] : '';
70
- $params = !empty($item['params']) ? $item['params'] : '';
71
- switch ($item['type']) {
72
- case 'js': // js/*.js
73
- case 'skin_js': // skin/*/*.js
74
- case 'js_css': // js/*.css
75
- case 'skin_css': // skin/*/*.css
76
- $lines[$if][$item['type']][$params][$item['name']] = $item['name'];
77
- break;
78
- default:
79
- $this->_separateOtherHtmlHeadElements($lines, $if, $item['type'], $params, $item['name'], $item);
80
- break;
81
- }
82
- }
83
 
84
- // prepare HTML
85
- $shouldMergeJs = Mage::getStoreConfigFlag('dev/js/merge_files');
86
- $shouldMergeCss = Mage::getStoreConfigFlag('dev/css/merge_css_files');
87
- $html = '';
88
- foreach ($lines as $if => $items) {
89
- if (empty($items)) {
90
- continue;
91
- }
92
- if (!empty($if)) {
93
- $html .= '<!--[if '.$if.']>'."\n";
94
- }
95
 
96
- // static and skin css
97
- $html .= $this->_prepareStaticAndSkinElements('<link rel="stylesheet" type="text/css" href="%s"%s />' . "\n",
98
- empty($items['js_css']) ? array() : $items['js_css'],
99
- empty($items['skin_css']) ? array() : $items['skin_css'],
100
- $shouldMergeCss ? array(Mage::getDesign(), 'getMergedCssUrl') : null
101
- );
102
- // other stuff
103
- if (!empty($items['other'])) {
104
- $html .= $this->_prepareOtherHtmlHeadElements($items['other']) . "\n";
105
- }
106
 
107
- // static and skin javascripts
108
- $html .= $this->_prepareStaticAndSkinElements('<script type="text/javascript" src="%s"%s></script>' . "\n",
109
- empty($items['js']) ? array() : $items['js'],
110
- empty($items['skin_js']) ? array() : $items['skin_js'],
111
- $shouldMergeJs ? array(Mage::getDesign(), 'getMergedJsUrl') : null
112
- );
113
 
114
 
115
- if (!empty($if)) {
116
- $html .= '<![endif]-->'."\n";
117
- }
118
- }
119
- return $html;
120
  }
 
 
121
  }
2
  /**
3
  *
4
  */
5
+ class Gigya_Social_Block_Html_Head extends Mage_Page_Block_Html_Head {
 
6
 
7
+ protected function _construct() {
 
8
  if (Mage::helper('Gigya_Social')->isPluginEnabled('gigya_global/gigya_global_conf')) {
9
  $this->setTemplate('page/html/head.phtml');
10
  $uriPrefix = !empty($_SERVER['HTTPS']) ? 'https://cdns' : 'http://cdn';
13
  $jsParams = array(
14
  'enabledProviders' => (Mage::getStoreConfig('gigya_global/gigya_global_conf/providers') !== '') ? Mage::getStoreConfig('gigya_global/gigya_global_conf/providers') : '*',
15
  'lang' => Mage::getStoreConfig('gigya_global/gigya_global_conf/laguages'),
16
+ 'sessionExpiration' => (int) Mage::getStoreConfig('web/cookie/cookie_lifetime'),
17
  'connectWithoutLoginBehavior' => Mage::getStoreConfig('gigya_login/gigya_login_conf/loginBehavior'),
18
  );
19
  $this->_data['items']['js/gigya'] = array(
25
  );
26
  if (Mage::getStoreConfig('gigya_global/gigya_global_conf/google_sa')) {
27
  $ga = $uriPrefix . '.gigya.com/js/gigyaGAIntegration.js';
28
+ $this->_data['items']['js/gigyaGA'] = array(
29
+ 'type' => 'external_js',
30
+ 'name' => $ga,
31
+ 'if' => '',
32
+ 'cond' => '',
33
+ );
34
+ }
35
+ // Add base url to JS
36
+ $this->_data['items']['js/baseUrl'] = array(
37
+ 'type' => 'inline_js',
38
+ 'name' => 'baseUrl',
39
+ 'params' => 'var baseUrl = "' . Mage::getBaseUrl() . '";',
40
  'if' => '',
41
+ 'cond' => ''
42
  );
 
 
43
  }
44
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
45
 
46
+ protected function _separateOtherHtmlHeadElements(&$lines, $itemIf, $itemType, $itemParams, $itemName, $itemThe) {
47
+ $params = $itemParams ? ' ' . $itemParams : '';
48
+ $href = $itemName;
49
+ switch ($itemType) {
50
+ case 'rss':
51
+ $lines[$itemIf]['other'][] = sprintf('<link href="%s"%s rel="alternate" type="application/rss+xml" />',
52
+ $href, $params
53
+ );
54
+ break;
55
+ case 'link_rel':
56
+ $lines[$itemIf]['other'][] = sprintf('<link%s href="%s" />', $params, $href);
57
+ break;
58
+
59
+ case 'external_js':
60
+ $lines[$itemIf]['other'][] = sprintf('<script type="text/javascript" src="%s">%s</script>', $href, $params);
61
+ break;
62
+ case 'inline_js':
63
+ $lines[$itemIf]['other'][] = sprintf('<script type"text/javascript">%s</script>', $params);
64
+ break;
65
 
 
66
  }
67
+ }
68
 
69
+ public function getCssJsHtml() {
70
+ // separate items by types
71
+ $lines = array();
72
+ foreach ($this->_data['items'] as $item) {
73
+ if (!is_null($item['cond']) && !$this->getData($item['cond']) || !isset($item['name'])) {
74
+ continue;
75
+ }
76
+ $if = !empty($item['if']) ? $item['if'] : '';
77
+ $params = !empty($item['params']) ? $item['params'] : '';
78
+ switch ($item['type']) {
79
+ case 'js': // js/*.js
80
+ case 'skin_js': // skin/*/*.js
81
+ case 'js_css': // js/*.css
82
+ case 'skin_css': // skin/*/*.css
83
+ $lines[$if][$item['type']][$params][$item['name']] = $item['name'];
84
+ break;
85
+ default:
86
+ $this->_separateOtherHtmlHeadElements($lines, $if, $item['type'], $params, $item['name'], $item);
87
+ break;
88
+ }
89
+ }
 
90
 
91
+ // prepare HTML
92
+ $shouldMergeJs = Mage::getStoreConfigFlag('dev/js/merge_files');
93
+ $shouldMergeCss = Mage::getStoreConfigFlag('dev/css/merge_css_files');
94
+ $html = '';
95
+ foreach ($lines as $if => $items) {
96
+ if (empty($items)) {
97
+ continue;
98
+ }
99
+ if (!empty($if)) {
100
+ $html .= '<!--[if ' . $if . ']>' . "\n";
101
+ }
102
 
103
+ // static and skin css
104
+ $html .= $this->_prepareStaticAndSkinElements('<link rel="stylesheet" type="text/css" href="%s"%s />' . "\n",
105
+ empty($items['js_css']) ? array() : $items['js_css'],
106
+ empty($items['skin_css']) ? array() : $items['skin_css'],
107
+ $shouldMergeCss ? array(Mage::getDesign(), 'getMergedCssUrl') : NULL
108
+ );
109
+ // other stuff
110
+ if (!empty($items['other'])) {
111
+ $html .= $this->_prepareOtherHtmlHeadElements($items['other']) . "\n";
112
+ }
113
 
114
+ // static and skin javascripts
115
+ $html .= $this->_prepareStaticAndSkinElements('<script type="text/javascript" src="%s"%s></script>' . "\n",
116
+ empty($items['js']) ? array() : $items['js'],
117
+ empty($items['skin_js']) ? array() : $items['skin_js'],
118
+ $shouldMergeJs ? array(Mage::getDesign(), 'getMergedJsUrl') : NULL
119
+ );
120
 
121
 
122
+ if (!empty($if)) {
123
+ $html .= '<![endif]-->' . "\n";
124
+ }
 
 
125
  }
126
+ return $html;
127
+ }
128
  }
app/code/community/Gigya/Social/Helper/Data.php CHANGED
@@ -5,11 +5,11 @@ class Gigya_Social_Helper_Data extends Mage_Core_Helper_Abstract
5
  {
6
  public function _getPassword($length = 8)
7
  {
8
- $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
9
- $str = '';
10
- for ($p = 0; $p < $length; $p++) {
11
- $str .= $characters[mt_rand(0, strlen($characters))];
12
- }
13
  return 'Gigya_' . $str;
14
  }
15
 
@@ -20,7 +20,7 @@ class Gigya_Social_Helper_Data extends Mage_Core_Helper_Abstract
20
  'siteUID' => $siteUid,
21
  );
22
  try {
23
- $this->_gigya_api('notifyRegistration', $params);
24
  }
25
  catch (Exception $e) {
26
  $code = $e->getCode();
@@ -76,8 +76,6 @@ class Gigya_Social_Helper_Data extends Mage_Core_Helper_Abstract
76
  );
77
  try {
78
  $res = $this->_gigya_api('deleteAccount', $params);
79
- Mage::log($res);
80
-
81
  }
82
  catch (Exception $e) {
83
  $code = $e->getCode();
@@ -99,15 +97,35 @@ class Gigya_Social_Helper_Data extends Mage_Core_Helper_Abstract
99
  * The Gigya response.
100
  */
101
  public function _gigya_api($method, $params) {
 
 
102
  $apiKey = Mage::getStoreConfig('gigya_global/gigya_global_conf/apikey');
103
  $secretkey = Mage::getStoreConfig('gigya_global/gigya_global_conf/secretkey');
104
  $request = new GSRequest($apiKey, $secretkey, 'socialize.' . $method);
 
 
 
105
  $params['format'] = 'json';
106
  foreach ($params as $param => $val) {
107
  $request->setParam($param, $val);
108
  }
109
  try {
110
  $response = $request->send();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
111
  }
112
  catch (Exception $e) {
113
  $code = $e->getCode();
@@ -128,9 +146,13 @@ class Gigya_Social_Helper_Data extends Mage_Core_Helper_Abstract
128
  $config[$key] = ($value) ? true : false;
129
  }
130
  }
 
 
 
 
131
  if (!empty($config['advancedConfig'])) {
132
  $advConfig = $this->_confStringToArry($config['advancedConfig']);
133
- $config = $config + $advConfig;
134
  }
135
  unset($config['advancedConfig']);
136
  if ($feed === TRUE) {
5
  {
6
  public function _getPassword($length = 8)
7
  {
8
+ $chars = Mage_Core_Helper_Data::CHARS_PASSWORD_LOWERS
9
+ . Mage_Core_Helper_Data::CHARS_PASSWORD_UPPERS
10
+ . Mage_Core_Helper_Data::CHARS_PASSWORD_DIGITS
11
+ . Mage_Core_Helper_Data::CHARS_PASSWORD_SPECIALS;
12
+ $str = Mage::helper('core')->getRandomString($length, $chars);
13
  return 'Gigya_' . $str;
14
  }
15
 
20
  'siteUID' => $siteUid,
21
  );
22
  try {
23
+ $res = $this->_gigya_api('notifyRegistration', $params);
24
  }
25
  catch (Exception $e) {
26
  $code = $e->getCode();
76
  );
77
  try {
78
  $res = $this->_gigya_api('deleteAccount', $params);
 
 
79
  }
80
  catch (Exception $e) {
81
  $code = $e->getCode();
97
  * The Gigya response.
98
  */
99
  public function _gigya_api($method, $params) {
100
+ $data_center = Mage::getStoreConfig('gigya_global/gigya_global_conf/dataCenter');
101
+ $data_center = !empty($data_center) ? $data_center : NULL;
102
  $apiKey = Mage::getStoreConfig('gigya_global/gigya_global_conf/apikey');
103
  $secretkey = Mage::getStoreConfig('gigya_global/gigya_global_conf/secretkey');
104
  $request = new GSRequest($apiKey, $secretkey, 'socialize.' . $method);
105
+ if ($data_center !== NULL){
106
+ $request->setAPIDomain($data_center);
107
+ }
108
  $params['format'] = 'json';
109
  foreach ($params as $param => $val) {
110
  $request->setParam($param, $val);
111
  }
112
  try {
113
  $response = $request->send();
114
+ // If wrong data center resend to right one
115
+ if ($response->getErrorCode() == 301001){
116
+ $data = $response->getData();
117
+ $domain = $data->getString('apiDomain', NULL);
118
+ if ($domain !== NULL){
119
+ Mage::getModel('core/config')->saveConfig('gigya_global/gigya_global_conf/dataCenter', $domain);
120
+ $this->_gigya_api($method, $params);
121
+ } else {
122
+ $ex = new Exception("Bad apiDomain return");
123
+ throw $ex;
124
+ }
125
+ } elseif ($response->getErrorCode() !== 0){
126
+ $exp = new Exception($response->getErrorMessage(), $response->getErrorCode());
127
+ throw $exp;
128
+ }
129
  }
130
  catch (Exception $e) {
131
  $code = $e->getCode();
146
  $config[$key] = ($value) ? true : false;
147
  }
148
  }
149
+ // New comments can be override in advanced config
150
+ if ($pluginName == 'gigya_comments/gigya_comments_conf') {
151
+ $config['version'] = 2;
152
+ }
153
  if (!empty($config['advancedConfig'])) {
154
  $advConfig = $this->_confStringToArry($config['advancedConfig']);
155
+ $config = $advConfig + $config;
156
  }
157
  unset($config['advancedConfig']);
158
  if ($feed === TRUE) {
app/code/community/Gigya/Social/Model/Config/Source/Datacenter.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Created by JetBrains PhpStorm.
4
+ * User: Yaniv Aran-Shamir
5
+ * Date: 7/31/13
6
+ * Time: 3:32 PM
7
+ */
8
+
9
+ class Gigya_Social_Model_Config_Source_Datacenter {
10
+ public function toOptionArray(){
11
+ return array(
12
+ array('value' => 'us1.gigya.com', 'label' => 'US Data Center'),
13
+ array('value' => 'eu1.gigya.com', 'label' => 'EU Data Center'),
14
+ );
15
+ }
16
+ }
app/code/community/Gigya/Social/Model/Customer/Observer.php CHANGED
@@ -8,11 +8,13 @@ class Gigya_Social_Model_Customer_Observer
8
  public function notify_registration($observer)
9
  {
10
  $customer_data = $observer['customer']->getData();
 
11
  if (!empty($customer_data['gigyaUser'])) {
12
- Mage::helper('Gigya_Social')->notifyRegistration($customer_data['gigyaUser']['UID'], $customer_data['entity_id']);
13
  }
14
  else {
15
  Mage::helper('Gigya_Social')->notifyLogin($id, 'true');
 
16
  }
17
  }
18
 
@@ -24,22 +26,28 @@ class Gigya_Social_Model_Customer_Observer
24
 
25
  public function notify_login($observer)
26
  {
27
- $action = Mage::getSingleton('customer/session')->getData('gigyaAction');
28
- $id = $observer->getEvent()->getCustomer()->getId();
29
- $gigya_uid = Mage::getSingleton('customer/session')->getData('gigyaUid');
30
- if (!empty($action)) {
31
- if ($action === 'linkAccount' && !empty($gigya_uid)) {
32
- Mage::helper('Gigya_Social')->notifyRegistration($gigya_uid, $id);
 
 
 
 
 
 
 
 
 
 
 
 
33
  }
34
  }
35
  else {
36
- $magInfo = $observer->getEvent()->getCustomer()->getData();
37
- $userInfo = array(
38
- 'firstName' => $magInfo['firstname'],
39
- 'lastName' => $magInfo['lastname'],
40
- 'email' => $magInfo['email'],
41
- );
42
- Mage::helper('Gigya_Social')->notifyLogin($id, 'false', $userInfo);
43
  }
44
  }
45
 
8
  public function notify_registration($observer)
9
  {
10
  $customer_data = $observer['customer']->getData();
11
+ $id = $customer_data['entity_id'];
12
  if (!empty($customer_data['gigyaUser'])) {
13
+ Mage::helper('Gigya_Social')->notifyRegistration($customer_data['gigyaUser']['UID'], $id);
14
  }
15
  else {
16
  Mage::helper('Gigya_Social')->notifyLogin($id, 'true');
17
+ Mage::getSingleton('customer/session')->setSuppressNoteLogin(TRUE);
18
  }
19
  }
20
 
26
 
27
  public function notify_login($observer)
28
  {
29
+ Mage::log(Mage::getSingleton('customer/session')->getSuppressNoteLogin());
30
+ if (!Mage::getSingleton('customer/session')->getSuppressNoteLogin()){
31
+ $action = Mage::getSingleton('customer/session')->getData('gigyaAction');
32
+ $id = $observer->getEvent()->getCustomer()->getId();
33
+ $gigya_uid = Mage::getSingleton('customer/session')->getData('gigyaUid');
34
+ if (!empty($action)) {
35
+ if ($action === 'linkAccount' && !empty($gigya_uid)) {
36
+ Mage::helper('Gigya_Social')->notifyRegistration($gigya_uid, $id);
37
+ }
38
+ }
39
+ else {
40
+ $magInfo = $observer->getEvent()->getCustomer()->getData();
41
+ $userInfo = array(
42
+ 'firstName' => $magInfo['firstname'],
43
+ 'lastName' => $magInfo['lastname'],
44
+ 'email' => $magInfo['email'],
45
+ );
46
+ Mage::helper('Gigya_Social')->notifyLogin($id, 'false', $userInfo);
47
  }
48
  }
49
  else {
50
+ Mage::getSingleton('customer/session')->unsSuppressNoteLogin();
 
 
 
 
 
 
51
  }
52
  }
53
 
app/code/community/Gigya/Social/controllers/LoginController.php CHANGED
@@ -32,6 +32,7 @@ class Gigya_Social_LoginController extends Mage_Customer_AccountController
32
  $openActions = array(
33
  'create',
34
  'login',
 
35
  'loginPost',
36
  'logoutsuccess',
37
  'forgotpassword',
@@ -102,7 +103,7 @@ class Gigya_Social_LoginController extends Mage_Customer_AccountController
102
  //check if we have the email on the system
103
  $customer = $this->_customerExists($post['user']['email']);
104
  if ($customer === FALSE) {
105
- $this->_createCustomer($post['user']['email'], $firstName, $lastName, $post['user']);
106
  $this->getResponse()->setHeader('Content-type', 'application/json');
107
  }
108
  else {
@@ -148,6 +149,16 @@ class Gigya_Social_LoginController extends Mage_Customer_AccountController
148
  $customer->setFirstname($firstName);
149
  $customer->setLastname($lastName);
150
  $customer->setEmail($email);
 
 
 
 
 
 
 
 
 
 
151
  $password = Mage::helper('Gigya_Social')->_getPassword();
152
  $_POST['password'] = $password;
153
  $_POST['confirmation'] = $password;
@@ -156,6 +167,11 @@ class Gigya_Social_LoginController extends Mage_Customer_AccountController
156
  $this->_forward('createPost');
157
  }
158
 
 
 
 
 
 
159
  protected function _customerExists($email, $websiteId = null)
160
  {
161
  $customer = Mage::getModel('customer/customer');
@@ -184,8 +200,6 @@ class Gigya_Social_LoginController extends Mage_Customer_AccountController
184
  $session = $this->_getSession();
185
  if ($session->isLoggedIn()) {
186
  Mage::log('loggedIn');
187
- echo '{bla: ok}';
188
- //$this->_redirect('*/*/');
189
  return;
190
  }
191
  $session->setEscapeMessages(true); // prevent XSS injection in user input
@@ -241,7 +255,38 @@ class Gigya_Social_LoginController extends Mage_Customer_AccountController
241
  try {
242
  $customerErrors = $customerForm->validateData($customerData);
243
  if ($customerErrors !== true) {
244
- $errors = array_merge($customerErrors, $errors);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
245
  } else {
246
  $customerForm->compactData($customerData);
247
  $customer->setPassword($this->getRequest()->getPost('password'));
@@ -283,9 +328,11 @@ class Gigya_Social_LoginController extends Mage_Customer_AccountController
283
  }
284
  } else {
285
  $session->setCustomerFormData($this->getRequest()->getPost());
 
286
  if (is_array($errors)) {
287
  foreach ($errors as $errorMessage) {
288
  $session->addError($errorMessage);
 
289
  }
290
  $res['result'] = 'error';
291
  $res['message'] = $error;
@@ -377,6 +424,17 @@ class Gigya_Social_LoginController extends Mage_Customer_AccountController
377
  $this->getResponse()->setHeader('Content-type', 'application/json');
378
  $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($res));
379
  }
 
 
 
 
 
 
 
 
 
 
 
380
 
381
  }
382
 
32
  $openActions = array(
33
  'create',
34
  'login',
35
+ 'logout',
36
  'loginPost',
37
  'logoutsuccess',
38
  'forgotpassword',
103
  //check if we have the email on the system
104
  $customer = $this->_customerExists($post['user']['email']);
105
  if ($customer === FALSE) {
106
+ $this->_createCustomer($email, $firstName, $lastName, $post['user']);
107
  $this->getResponse()->setHeader('Content-type', 'application/json');
108
  }
109
  else {
149
  $customer->setFirstname($firstName);
150
  $customer->setLastname($lastName);
151
  $customer->setEmail($email);
152
+ if (!empty($gigyaUser['missInfo'])) {
153
+ $missing_info = $gigyaUser['missInfo'];
154
+ if (array_key_exists('dob', $missing_info)) {
155
+ $this->buildDob($missing_info);
156
+ }
157
+ foreach ($missing_info as $key => $val) {
158
+ $k = 'set' . ucfirst($key);
159
+ $customer->{$k}($val);
160
+ }
161
+ }
162
  $password = Mage::helper('Gigya_Social')->_getPassword();
163
  $_POST['password'] = $password;
164
  $_POST['confirmation'] = $password;
167
  $this->_forward('createPost');
168
  }
169
 
170
+ private function buildDob(&$info){
171
+ $info['dob'] = $info['year'] . "-" . $info['month'] . "-" . $info['day'];
172
+ unset($info['year'], $info['month'], $info['day']);
173
+ }
174
+
175
  protected function _customerExists($email, $websiteId = null)
176
  {
177
  $customer = Mage::getModel('customer/customer');
200
  $session = $this->_getSession();
201
  if ($session->isLoggedIn()) {
202
  Mage::log('loggedIn');
 
 
203
  return;
204
  }
205
  $session->setEscapeMessages(true); // prevent XSS injection in user input
255
  try {
256
  $customerErrors = $customerForm->validateData($customerData);
257
  if ($customerErrors !== true) {
258
+ $fields = $customerForm->getAttributes();
259
+ foreach ($fields as $field) {
260
+ $requireds[$field->getAttributeCode()] = $field->getIsRequired();
261
+ }
262
+ //remove fields that we have data for
263
+ unset($requireds['firstname'], $requireds['lastname'], $requireds['email']);
264
+ $requireds = array_filter($requireds);
265
+ $html = '<div class="gigyaMoreInfo"><form action="' . Mage::getBaseUrl() . 'gigyalogin/login" name="moreInfo" id="gigyaMoreInfoForm">';
266
+ foreach ($requireds as $key => $r) {
267
+ $requireds[$key] = $fields[$key]->getStoreLabel();
268
+ if (!$fields[$key]->getIsUserDefined() && is_object($this->getLayout()->createBlock('customer/widget_' . $key))) {
269
+ $html .= $this->getLayout()->createBlock('customer/widget_' . $key)->toHtml();
270
+ } else {
271
+ $html .='<div class="field">
272
+ <label for="' . $key . '">' . $fields[$key]->getStoreLabel() . '</label>
273
+ <div class="input-box">
274
+ <input type="text" name="' . $key . '" id="' . $key . '" value="" class="input-text" />
275
+ </div>
276
+ </div>';
277
+ }
278
+ }
279
+ $html .= '<input class="button" id="gigyaMoreInfoSubmit" type="button" value="Send" onclick="gigyaFunctions.moreInfoSubmit()" "></form>';
280
+ $html .= '</div>';
281
+
282
+ $res = array(
283
+ 'result' => 'moreInfo',
284
+ 'fields' => $requireds,
285
+ 'html' => $html,
286
+ );
287
+ $this->getResponse()->setHeader('Content-type', 'application/json');
288
+ $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($res));
289
+ return;
290
  } else {
291
  $customerForm->compactData($customerData);
292
  $customer->setPassword($this->getRequest()->getPost('password'));
328
  }
329
  } else {
330
  $session->setCustomerFormData($this->getRequest()->getPost());
331
+ $error = '';
332
  if (is_array($errors)) {
333
  foreach ($errors as $errorMessage) {
334
  $session->addError($errorMessage);
335
+ $error .= $errorMessage . "\n";
336
  }
337
  $res['result'] = 'error';
338
  $res['message'] = $error;
424
  $this->getResponse()->setHeader('Content-type', 'application/json');
425
  $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($res));
426
  }
427
+ public function logoutAction(){
428
+ $cust = $this->_getSession()->logout()->setBeforeAuthUrl(null);
429
+ if ($cust->getId() === null){
430
+ $res['result'] = 'success';
431
+ } else {
432
+ $res['result'] = 'error';
433
+ }
434
+
435
+ $this->getResponse()->setHeader('Content-type', 'application/json');
436
+ $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($res));
437
+ }
438
 
439
  }
440
 
app/code/community/Gigya/Social/etc/config.xml CHANGED
@@ -160,6 +160,7 @@
160
  <gigya_global>
161
  <gigya_global_conf>
162
  <enable>1</enable>
 
163
  <providers>*</providers>
164
  <laguages>en</laguages>
165
  <google_sa>0</google_sa>
160
  <gigya_global>
161
  <gigya_global_conf>
162
  <enable>1</enable>
163
+ <dataCenter>us1.gigya.com</dataCenter>
164
  <providers>*</providers>
165
  <laguages>en</laguages>
166
  <google_sa>0</google_sa>
app/code/community/Gigya/Social/etc/system.xml CHANGED
@@ -33,6 +33,15 @@
33
  <show_in_website>1</show_in_website>
34
  <show_in_store>1</show_in_store>
35
  </enable>
 
 
 
 
 
 
 
 
 
36
  <apikey translate="label">
37
  <label>Gigya API key</label>
38
  <frontend_type>text</frontend_type>
33
  <show_in_website>1</show_in_website>
34
  <show_in_store>1</show_in_store>
35
  </enable>
36
+ <dataCenter translate="label">
37
+ <label>Data Center Region</label>
38
+ <frontend_type>select</frontend_type>
39
+ <source_model>Gigya_Social_Model_config_source_datacenter</source_model>
40
+ <sort_order>10</sort_order>
41
+ <show_in_default>1</show_in_default>
42
+ <show_in_website>1</show_in_website>
43
+ <show_in_store>1</show_in_store>
44
+ </dataCenter>
45
  <apikey translate="label">
46
  <label>Gigya API key</label>
47
  <frontend_type>text</frontend_type>
app/code/community/Gigya/Social/sdk/GSSDK.php CHANGED
@@ -1,8 +1,9 @@
1
  <?php
2
  /*
3
  * Copyright (C) 2011 Gigya, Inc.
4
- * Version 2.15.0
5
- *
 
6
  * Gigya PHP SDK
7
  * @author Shachar Bar-David
8
  */
@@ -43,17 +44,25 @@ class GSKeyNotFoundException extends GSException{
43
 
44
  class GSRequest {
45
  private static $cafile;
46
- const version = "2.15";
 
 
 
47
  private $domain;
48
  private $path;
49
  private $traceLog = array();
50
  protected $method;
51
  private $proxy;
52
-
 
 
 
53
  private $apiKey;
54
  private $secretKey;
55
  private $params; //GSObject
56
  private $useHTTPS;
 
 
57
 
58
  /**
59
  * Constructs a request using an apiKey and secretKey.
@@ -68,7 +77,7 @@ class GSRequest {
68
  */
69
  public function __construct($apiKey, $secretKey, $apiMethod, $params = null, $useHTTPS = false )
70
  {
71
- if (!isset($apiMethod) || $apiMethod == null || strlen($apiMethod)==0)
72
  return;
73
 
74
  if (substr($apiMethod,0,1) == "/")
@@ -76,12 +85,10 @@ class GSRequest {
76
 
77
  if (strrpos($apiMethod,".")==0)
78
  {
79
-
80
  $this->domain = "socialize.gigya.com";
81
  $this->path = "/socialize." . $apiMethod;
82
  } else
83
  {
84
-
85
  $tokens = explode(".",$apiMethod);
86
  $this->domain = $tokens[0].".gigya.com";
87
  $this->path = "/".$apiMethod;
@@ -117,16 +124,39 @@ class GSRequest {
117
  {
118
  return $this->params;
119
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
120
 
121
  public static function setCAFile($filename)
122
  {
123
  GSRequest::$cafile = $filename;
124
  }
125
 
126
- public function setProxy($proxy)
127
  {
128
  $this->proxy = $proxy;
 
 
129
  $this->traceField("proxy",$proxy);
 
 
 
 
 
 
 
 
130
  }
131
 
132
  /**
@@ -135,6 +165,16 @@ class GSRequest {
135
  public function send($timeout=null)
136
  {
137
  $format = $this->params->getString("format",null);
 
 
 
 
 
 
 
 
 
 
138
  //set json as default format.
139
  if (empty($format))
140
  {
@@ -156,9 +196,14 @@ class GSRequest {
156
  try
157
  {
158
  $this->setParam("httpStatusCodes", "false");
 
 
 
159
  $this->traceField("params",$this->params);
 
160
 
161
- $responseStr = $this->sendRequest("POST", $this->domain, $this->path, $this->params, $this->apiKey, $this->secretKey, $this->useHTTPS,$timeout);
 
162
  return new GSResponse($this->method,$responseStr,null,0,null,$this->traceLog);
163
  }
164
  catch (Exception $ex) {
@@ -186,7 +231,7 @@ class GSRequest {
186
  $timestamp = (string) time();
187
 
188
  //timestamp in milliseconds
189
- $nonce = (string)SigUtils::currentTimeMillis();
190
  $httpMethod = "POST";
191
 
192
 
@@ -218,7 +263,7 @@ class GSRequest {
218
  }
219
 
220
 
221
- private function curl($url, $params, $timeout=null, $options = array())
222
  {
223
  foreach($params->getKeys() as $key)
224
  {
@@ -229,34 +274,37 @@ class GSRequest {
229
  $qs = http_build_query($postData);
230
  $this->traceField("URL",$url);
231
  $this->traceField("postData",$qs);
232
-
233
  /* POST */
234
  $defaults = array(
235
  CURLOPT_URL => $url,
236
  CURLOPT_POST=>1,
237
  CURLOPT_HEADER => 1,
238
- CURLOPT_POSTFIELDS=>$postData,
239
  CURLOPT_HTTPHEADER => array( 'Expect:'),
240
- CURLOPT_RETURNTRANSFER => TRUE,
241
- //CURLOPT_TIMEOUT => 10,
242
  CURLOPT_SSL_VERIFYPEER => TRUE,
243
  CURLOPT_SSL_VERIFYHOST => 2,
244
  CURLOPT_CAINFO => GSRequest::$cafile ,
245
  CURLOPT_PROXY => $this->proxy,
 
 
246
  CURLOPT_TIMEOUT_MS => $timeout
247
  );
248
 
249
  $ch = curl_init();
250
- curl_setopt_array($ch, ($options + $defaults));
 
 
251
 
252
  if(!$result = curl_exec($ch))
253
  {
254
  $err = curl_error($ch) ;
255
  throw new Exception($err);
256
  }
 
257
  curl_close($ch);
258
 
259
-
260
  list($header, $body) = explode("\r\n\r\n", $result, 2);
261
  $headers = explode("\r\n", $header);
262
  foreach($headers as $value)
@@ -590,6 +638,8 @@ class GSObject {
590
  if(gettype($json) == 'string')
591
  {
592
  $obj = json_decode($json,false);
 
 
593
  if($obj == null){
594
  throw new GSException();
595
  }
1
  <?php
2
  /*
3
  * Copyright (C) 2011 Gigya, Inc.
4
+ * Version 2.15.3
5
+ *
6
+ *
7
  * Gigya PHP SDK
8
  * @author Shachar Bar-David
9
  */
44
 
45
  class GSRequest {
46
  private static $cafile;
47
+ const DEFAULT_API_DOMAIN = "gigya.com";
48
+ const version = "2.15.3";
49
+
50
+ private $host;
51
  private $domain;
52
  private $path;
53
  private $traceLog = array();
54
  protected $method;
55
  private $proxy;
56
+ private $proxyType = CURLPROXY_HTTP;
57
+ private $proxyUserPass = ":";
58
+ private $curlArray = array();
59
+
60
  private $apiKey;
61
  private $secretKey;
62
  private $params; //GSObject
63
  private $useHTTPS;
64
+ private $apiDomain = self::DEFAULT_API_DOMAIN;
65
+
66
 
67
  /**
68
  * Constructs a request using an apiKey and secretKey.
77
  */
78
  public function __construct($apiKey, $secretKey, $apiMethod, $params = null, $useHTTPS = false )
79
  {
80
+ if (!isset($apiMethod) || strlen($apiMethod)==0)
81
  return;
82
 
83
  if (substr($apiMethod,0,1) == "/")
85
 
86
  if (strrpos($apiMethod,".")==0)
87
  {
 
88
  $this->domain = "socialize.gigya.com";
89
  $this->path = "/socialize." . $apiMethod;
90
  } else
91
  {
 
92
  $tokens = explode(".",$apiMethod);
93
  $this->domain = $tokens[0].".gigya.com";
94
  $this->path = "/".$apiMethod;
124
  {
125
  return $this->params;
126
  }
127
+
128
+ /**
129
+ * Sets the domain used for making API calls. This method provides the option to override the default domain "gigya.com" and specify an alternative data center to be used.
130
+ * Parameters:
131
+ * $apiDomain - the domain of the data center to be used. For example: "eu1.gigya.com" for Europe data center.
132
+ */
133
+ public function setAPIDomain($apiDomain)
134
+ {
135
+ if(!isset($apiDomain) || strlen($apiDomain)==0)
136
+ $this->apiDomain = self::DEFAULT_API_DOMAIN;
137
+ else
138
+ $this->apiDomain = $apiDomain;
139
+ }
140
 
141
  public static function setCAFile($filename)
142
  {
143
  GSRequest::$cafile = $filename;
144
  }
145
 
146
+ public function setProxy($proxy, $proxyUserPass=":", $proxyType=CURLPROXY_HTTP)
147
  {
148
  $this->proxy = $proxy;
149
+ $this->proxyType = $proxyType;
150
+ $this->proxyUserPass = $proxyUserPass;
151
  $this->traceField("proxy",$proxy);
152
+ $this->traceField("proxyType",$proxyType);
153
+ $this->traceField("proxyUserPass",$proxyUserPass);
154
+ }
155
+
156
+ public function setCurlOptionsArray($curlArray)
157
+ {
158
+ $this->curlArray = $curlArray;
159
+ $this->traceField("curlArray", $curlArray);
160
  }
161
 
162
  /**
165
  public function send($timeout=null)
166
  {
167
  $format = $this->params->getString("format",null);
168
+
169
+ if (!strrpos($this->method, ".")) {
170
+ $this->host = "socialize.".$this->apiDomain;
171
+ $this->path = "/socialize.".$this->method;
172
+ } else {
173
+ $tokens = explode( ".", $this->method );
174
+ $this->host = $tokens[0].".".$this->apiDomain;
175
+ $this->path = "/".$this->method;
176
+ }
177
+
178
  //set json as default format.
179
  if (empty($format))
180
  {
196
  try
197
  {
198
  $this->setParam("httpStatusCodes", "false");
199
+
200
+ $this->traceField("apiKey", $this->apiKey);
201
+ $this->traceField("apiMethod", $this->method);
202
  $this->traceField("params",$this->params);
203
+ $this->traceField("useHTTPS", $this->useHTTPS);
204
 
205
+ $responseStr = $this->sendRequest("POST", $this->host, $this->path, $this->params, $this->apiKey, $this->secretKey, $this->useHTTPS,$timeout);
206
+
207
  return new GSResponse($this->method,$responseStr,null,0,null,$this->traceLog);
208
  }
209
  catch (Exception $ex) {
231
  $timestamp = (string) time();
232
 
233
  //timestamp in milliseconds
234
+ $nonce = ((string)SigUtils::currentTimeMillis()).rand();
235
  $httpMethod = "POST";
236
 
237
 
263
  }
264
 
265
 
266
+ private function curl($url, $params, $timeout=null)
267
  {
268
  foreach($params->getKeys() as $key)
269
  {
274
  $qs = http_build_query($postData);
275
  $this->traceField("URL",$url);
276
  $this->traceField("postData",$qs);
277
+
278
  /* POST */
279
  $defaults = array(
280
  CURLOPT_URL => $url,
281
  CURLOPT_POST=>1,
282
  CURLOPT_HEADER => 1,
283
+ CURLOPT_POSTFIELDS=>$qs,
284
  CURLOPT_HTTPHEADER => array( 'Expect:'),
285
+ CURLOPT_RETURNTRANSFER => TRUE,
 
286
  CURLOPT_SSL_VERIFYPEER => TRUE,
287
  CURLOPT_SSL_VERIFYHOST => 2,
288
  CURLOPT_CAINFO => GSRequest::$cafile ,
289
  CURLOPT_PROXY => $this->proxy,
290
+ CURLOPT_PROXYTYPE => $this->proxyType,
291
+ CURLOPT_PROXYUSERPWD => $this->proxyUserPass,
292
  CURLOPT_TIMEOUT_MS => $timeout
293
  );
294
 
295
  $ch = curl_init();
296
+ $mergedCurlArray = ($this->curlArray + $defaults);
297
+
298
+ curl_setopt_array($ch, $mergedCurlArray);
299
 
300
  if(!$result = curl_exec($ch))
301
  {
302
  $err = curl_error($ch) ;
303
  throw new Exception($err);
304
  }
305
+
306
  curl_close($ch);
307
 
 
308
  list($header, $body) = explode("\r\n\r\n", $result, 2);
309
  $headers = explode("\r\n", $header);
310
  foreach($headers as $value)
638
  if(gettype($json) == 'string')
639
  {
640
  $obj = json_decode($json,false);
641
+
642
+
643
  if($obj == null){
644
  throw new GSException();
645
  }
app/design/frontend/base/default/layout/gigya.xml CHANGED
@@ -8,6 +8,17 @@
8
  <action method="addCss">
9
  <stylesheet>css/gigya.css</stylesheet>
10
  </action>
 
 
 
 
 
 
 
 
 
 
 
11
  </reference>
12
  <reference name="before_body_end">
13
  <block type="Gigya_Social_Block_Gamification_notifications" name="gigya.gm.notifications"/>
8
  <action method="addCss">
9
  <stylesheet>css/gigya.css</stylesheet>
10
  </action>
11
+ <action method="addJs">
12
+ <script>prototype/window.js</script>
13
+ </action>
14
+ <action method="addItem">
15
+ <type>js_css</type>
16
+ <name>prototype/windows/themes/default.css</name>
17
+ </action>
18
+ <action method="addItem">
19
+ <type>js_css</type>
20
+ <name>prototype/windows/themes/lighting.css</name>
21
+ </action>
22
  </reference>
23
  <reference name="before_body_end">
24
  <block type="Gigya_Social_Block_Gamification_notifications" name="gigya.gm.notifications"/>
js/gigya/gigya.js CHANGED
@@ -5,12 +5,11 @@ var gigyaFunctions = gigyaFunctions || {};
5
  var gigyaCache = {};
6
  gigyaFunctions.login = function (response) {
7
  gigyaCache.uInfo = response;
8
- new Ajax.Request('/gigyalogin/login/login', {
9
- parameters: {json:JSON.stringify(response)},
10
- onSuccess: function (trans) {
11
- if (typeof trans.responseJSON.result !== 'undefined') {
12
- switch (trans.responseJSON.result)
13
- {
14
  case 'newUser':
15
  case 'login':
16
  window.location.reload();
@@ -28,17 +27,38 @@ gigyaFunctions.login = function (response) {
28
  $(trans.responseJSON.id).style.height = '';
29
  Form.Element.setValue('gigya-mini-login', gigyaCache.uInfo.user.email);
30
  break;
31
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
32
  }
33
  }
 
34
  });
 
35
  };
36
 
37
  gigyaFunctions.hideLogin = function (id) {
38
  var form = $(id).adjacent('li');
39
  if (form !== 'undefined') {
40
  form.each(function (e) {
41
- if ((e.firstDescendant().readAttribute('for') == 'email') || (e.firstDescendant().readAttribute('for') == 'pass')){
42
  e.hide();
43
  }
44
  });
@@ -56,17 +76,17 @@ gigyaFunctions.updateHeadline = function (id, text) {
56
 
57
  gigyaFunctions.linkAccounts = function () {
58
  var email = $$('#gigya-mini-login')[0].value,
59
- password = $$('#gigya-mini-password')[0].value;
60
- if (email.empty()){
61
  alert('Please enter a email');
62
  }
63
- else if (password.empty()){
64
  alert('Please enter your password');
65
  }
66
  else {
67
- var toPost = {username:email, password:password};
68
- new Ajax.Request('/gigyalogin/login/loginPost', {
69
- parameters: {login:JSON.stringify(toPost)},
70
  onSuccess: function (trans) {
71
  if (trans.responseJSON.result === 'success') {
72
  document.location.reload(true);
@@ -75,7 +95,7 @@ gigyaFunctions.linkAccounts = function () {
75
  alert(trans.responseJSON.message);
76
  }
77
  }
78
- });
79
  }
80
  };
81
 
@@ -86,47 +106,64 @@ gigyaFunctions.emailSubmit = function () {
86
  var toPost = gigyaCache.uInfo;
87
  toPost.user.email = email;
88
 
89
- new Ajax.Request('/gigyalogin/login/login', {
90
- parameters: {json:JSON.stringify(toPost)},
91
- onSuccess: function (trans) {
92
- if (typeof trans.responseJSON.redirect !== 'undefined') {
93
- document.location.reload(true);
94
- }
95
- if (trans.responseJSON.result === 'emailExsists') {
96
- gigyaFunctions.hideLogin(trans.responseJSON.id);
97
- gigyaFunctions.updateHeadline(trans.responseJSON.id, trans.responseJSON.headline)
98
- $(trans.responseJSON.id).update(trans.responseJSON.html);
99
- Form.Element.setValue('gigya-mini-login', gigyaCache.uInfo.user.email);
 
 
100
  }
101
  }
102
- }
103
  );
104
  }
105
  else {
106
- alert ('please enter a valid email');
107
  }
108
  };
109
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
110
  gigyaFunctions.createUserAction = function (settings) {
111
  var mediaObj = {type: 'image', href: settings.ua.linkBack};
112
- switch (settings.imageBehavior)
113
- {
114
- case 'default':
115
- if ($$('meta[property=og:image]').size() > 0) {
116
- mediaObj.src = $$('meta[property=og:image]').readAttribute('content');
117
- }
118
- else {
 
 
 
119
  mediaObj.src = settings.ua.imageUrl;
120
- }
121
- break;
122
- case 'product':
123
- mediaObj.src = settings.ua.imageUrl;
124
- break;
125
- case 'url':
126
- if (typeof settings.imageUrl !== 'undefined') {
127
- mediaObj.src = settings.imageUrl;
128
- }
129
- break;
130
  }
131
  var ua = new gigya.socialize.UserAction();
132
  ua.setLinkBack(settings.ua.linkBack);
@@ -176,30 +213,29 @@ gigyaFunctions.gm = function (settings) {
176
  gigya.gm.showNotifications();
177
  }
178
  if (typeof settings.plugins !== 'undefined') {
179
- $H(settings.plugins).each ( function (gmPlugin) {
180
  var parms = {containerID: gmPlugin.value};
181
- switch (gmPlugin.key)
182
- {
183
  case 'Achievements':
184
  gigya.gm.showAchievementsUI(parms);
185
- break;
186
  case 'ChallengeStatus':
187
  gigya.gm.showChallengeStatusUI(parms);
188
- break;
189
  case 'UserStatus':
190
  gigya.gm.showUserStatusUI(parms);
191
- break;
192
  case 'Leaderboard':
193
  gigya.gm.showLeaderboardUI(parms);
194
- break;
195
- }
196
  })
197
 
198
  }
199
  };
200
 
201
  gigyaFunctions.ratings = function (settings) {
202
- settings.each( function (ins) {
203
  ins.onAddReviewClicked = gigyaFunctions.goToReviews;
204
  ins.onReadReviewsClicked = gigyaFunctions.goToReviews;
205
  gigya.socialize.showRatingUI(ins);
@@ -214,21 +250,22 @@ gigyaFunctions.goToReviews = function (eventObj) {
214
 
215
  gigyaFunctions.postReview = function (eventObj) {
216
  var ratings = [],
217
- r = eventObj.ratings._overall;
218
  var i = 1;
219
  for (i; i <= 3; i++) {
220
  ratings[i] = r;
221
  r = r + 5;
222
- };
 
223
  var toPost = {
224
- nickname:eventObj.user.firstName,
225
- title:eventObj.commentTitle,
226
- detail:eventObj.commentText,
227
- ratings:ratings
228
  };
229
- var reviewsUrl = '/gigyareviews/reviews/post',
230
- id = '',
231
- category = '';
232
  if (id = gigyaFunctions.getUrlParam('id')) {
233
  reviewsUrl += '/id/' + id;
234
  }
@@ -236,11 +273,11 @@ gigyaFunctions.postReview = function (eventObj) {
236
  reviewsUrl += '/category/' + category;
237
  }
238
  new Ajax.Request(reviewsUrl, {
239
- parameters: {json:JSON.stringify(toPost)},
240
- onSuccess: function (trans) {
241
- //TODO: add success/error handeling
 
242
  }
243
- }
244
  );
245
 
246
 
@@ -248,7 +285,7 @@ gigyaFunctions.postReview = function (eventObj) {
248
  gigyaFunctions.RnR = function (settings) {
249
  if ($$('form table.ratings-table').length > 0) {
250
  var table = $('product_addtocart_form').select('table.ratings-table');
251
- table.each( function (itm) {
252
  itm.update().writeAttribute('id', settings.containerID);
253
  if (typeof itm.next('a') !== 'undefined') {
254
  itm.next('a').update();
@@ -263,11 +300,12 @@ gigyaFunctions.RnR = function (settings) {
263
  ua = gigyaFunctions.createUserAction(settings);
264
  delete settings.ua;
265
  var reviews = {
 
266
  containerID: 'customer-reviews',
267
  categoryID: settings.categoryID,
268
  streamID: settings.streamID,
269
  scope: settings.scope,
270
- privacy: settings.privacy,
271
  onCommentSubmitted: gigyaFunctions.postReview,
272
  userAction: ua
273
  };
@@ -275,9 +313,24 @@ gigyaFunctions.RnR = function (settings) {
275
  gigya.socialize.showCommentsUI(reviews);
276
  };
277
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
278
  gigyaFunctions.getUrlParam = function (param) {
279
  var urlArray = document.location.href.split('/'),
280
- idx = urlArray.indexOf(param);
281
  if (idx !== -1) {
282
  return urlArray[idx + 1];
283
  }
@@ -290,55 +343,56 @@ gigyaFunctions.getUrlParam = function (param) {
290
  function gigyaRegister() {
291
  if (typeof gigya !== 'undefined') {
292
  gigya.socialize.addEventHandlers({
293
- onLogin: gigyaFunctions.login
 
294
  });
295
  }
296
  }
297
 
298
  gigyaRegister();
299
 
300
- document.observe("dom:loaded", function() {
301
- if (typeof gigyaSettings !== 'undefined'){
302
- $H(gigyaSettings).each( function (plugin) {
303
  delete plugin.value.enable;
304
  //var a = JSON.parse(plugin.value);
305
- switch (plugin.key)
306
- {
307
- case 'login':
308
- delete plugin.value.loginBehavior;
309
- gigya.socialize.showLoginUI(plugin.value);
310
- break;
311
- case 'linkAccount':
312
- gigya.socialize.showAddConnectionsUI(plugin.value);
313
- break;
314
- case 'sharebar':
315
- gigyaFunctions.shareBar(plugin.value);
316
- break;
317
- case 'shareAction':
318
- gigyaFunctions.shareAction(plugin.value);
319
- break;
320
- case 'reactions':
321
- gigyaFunctions.reactions(plugin.value);
322
- break;
323
- case 'comments':
324
- gigya.socialize.showCommentsUI(plugin.value);
325
- break;
326
- case 'activityFeed':
327
- delete plugin.value.privacy;
328
- gigya.socialize.showFeedUI(plugin.value);
329
- break;
330
- case 'gm':
331
- gigyaFunctions.gm(plugin.value);
332
- break;
333
- case 'ratings':
334
- gigyaFunctions.ratings(plugin.value);
335
- break;
336
- case 'RnR':
337
- gigyaFunctions.RnR(plugin.value);
338
- break;
339
- case 'logout':
340
- gigya.socialize.logout();
341
- break;
342
  }
343
  });
344
  }
5
  var gigyaCache = {};
6
  gigyaFunctions.login = function (response) {
7
  gigyaCache.uInfo = response;
8
+ new Ajax.Request(baseUrl + 'gigyalogin/login/login', {
9
+ parameters: {json: JSON.stringify(response)},
10
+ onSuccess: function (trans) {
11
+ if (typeof trans.responseJSON.result !== 'undefined') {
12
+ switch (trans.responseJSON.result) {
 
13
  case 'newUser':
14
  case 'login':
15
  window.location.reload();
27
  $(trans.responseJSON.id).style.height = '';
28
  Form.Element.setValue('gigya-mini-login', gigyaCache.uInfo.user.email);
29
  break;
30
+ case 'moreInfo':
31
+ gigyaFunctions.showMoreInfoForm(trans.responseJSON.html);
32
+ //gigyaFunctions.moreInfoSubmit();
33
+ break;
34
+ }
35
+ }
36
+ }
37
+ });
38
+ };
39
+
40
+ gigyaFunctions.logout = function (evData) {
41
+ if (typeof evData.source !== 'undefined' && evData.source == "showCommentsUI"){
42
+ new Ajax.Request(baseUrl + 'gigyalogin/login/logout', {
43
+ method: 'get',
44
+ onSuccess: function (res) {
45
+ if (res.responseJSON.result == 'success') {
46
+ window.location.reload();
47
+ } else {
48
+ if (typeof console !== 'undefined') {
49
+ console.log('Error logging out');
50
  }
51
  }
52
+ }
53
  });
54
+ }
55
  };
56
 
57
  gigyaFunctions.hideLogin = function (id) {
58
  var form = $(id).adjacent('li');
59
  if (form !== 'undefined') {
60
  form.each(function (e) {
61
+ if ((e.firstDescendant().readAttribute('for') == 'email') || (e.firstDescendant().readAttribute('for') == 'pass')) {
62
  e.hide();
63
  }
64
  });
76
 
77
  gigyaFunctions.linkAccounts = function () {
78
  var email = $$('#gigya-mini-login')[0].value,
79
+ password = $$('#gigya-mini-password')[0].value;
80
+ if (email.empty()) {
81
  alert('Please enter a email');
82
  }
83
+ else if (password.empty()) {
84
  alert('Please enter your password');
85
  }
86
  else {
87
+ var toPost = {username: email, password: password};
88
+ new Ajax.Request(baseUrl + 'gigyalogin/login/loginPost', {
89
+ parameters: {login: JSON.stringify(toPost)},
90
  onSuccess: function (trans) {
91
  if (trans.responseJSON.result === 'success') {
92
  document.location.reload(true);
95
  alert(trans.responseJSON.message);
96
  }
97
  }
98
+ });
99
  }
100
  };
101
 
106
  var toPost = gigyaCache.uInfo;
107
  toPost.user.email = email;
108
 
109
+ new Ajax.Request(baseUrl + 'gigyalogin/login/login', {
110
+ parameters: {json: JSON.stringify(toPost)},
111
+ onSuccess: function (trans) {
112
+ if (typeof trans.responseJSON.redirect !== 'undefined') {
113
+ document.location.reload(true);
114
+ } else if (trans.responseJSON.result === 'emailExsists') {
115
+ gigyaFunctions.hideLogin(trans.responseJSON.id);
116
+ gigyaFunctions.updateHeadline(trans.responseJSON.id, trans.responseJSON.headline)
117
+ $(trans.responseJSON.id).update(trans.responseJSON.html);
118
+ Form.Element.setValue('gigya-mini-login', gigyaCache.uInfo.user.email);
119
+ } else if (trans.responseJSON.result === 'moreInfo') {
120
+ gigyaFunctions.showMoreInfoForm(trans.responseJSON.html);
121
+ }
122
  }
123
  }
 
124
  );
125
  }
126
  else {
127
+ alert('please enter a valid email');
128
  }
129
  };
130
 
131
+ gigyaFunctions.moreInfoSubmit = function () {
132
+ var toPost = gigyaCache.uInfo;
133
+ toPost.user.missInfo = $('gigyaMoreInfoForm').serialize(true);
134
+ new Ajax.Request(baseUrl + 'gigyalogin/login/login', {
135
+ parameters: {json: JSON.stringify(toPost)},
136
+ onSuccess: function (trans) {
137
+ if (trans.responseJSON.result === 'newUser') {
138
+ gigyaModal.close();
139
+ if (typeof trans.responseJSON.redirect !== 'undefined') {
140
+ document.location.reload(true);
141
+ }
142
+ }
143
+ }
144
+ });
145
+ $('gigyaMoreInfoForm').replace('<div class="trob"></div>');
146
+ };
147
+
148
  gigyaFunctions.createUserAction = function (settings) {
149
  var mediaObj = {type: 'image', href: settings.ua.linkBack};
150
+ switch (settings.imageBehavior) {
151
+ case 'default':
152
+ if ($$('meta[property=og:image]').size() > 0) {
153
+ mediaObj.src = $$('meta[property=og:image]')[0].readAttribute('content');
154
+ }
155
+ else {
156
+ mediaObj.src = settings.ua.imageUrl;
157
+ }
158
+ break;
159
+ case 'product':
160
  mediaObj.src = settings.ua.imageUrl;
161
+ break;
162
+ case 'url':
163
+ if (typeof settings.imageUrl !== 'undefined') {
164
+ mediaObj.src = settings.imageUrl;
165
+ }
166
+ break;
 
 
 
 
167
  }
168
  var ua = new gigya.socialize.UserAction();
169
  ua.setLinkBack(settings.ua.linkBack);
213
  gigya.gm.showNotifications();
214
  }
215
  if (typeof settings.plugins !== 'undefined') {
216
+ $H(settings.plugins).each(function (gmPlugin) {
217
  var parms = {containerID: gmPlugin.value};
218
+ switch (gmPlugin.key) {
 
219
  case 'Achievements':
220
  gigya.gm.showAchievementsUI(parms);
221
+ break;
222
  case 'ChallengeStatus':
223
  gigya.gm.showChallengeStatusUI(parms);
224
+ break;
225
  case 'UserStatus':
226
  gigya.gm.showUserStatusUI(parms);
227
+ break;
228
  case 'Leaderboard':
229
  gigya.gm.showLeaderboardUI(parms);
230
+ break;
231
+ }
232
  })
233
 
234
  }
235
  };
236
 
237
  gigyaFunctions.ratings = function (settings) {
238
+ settings.each(function (ins) {
239
  ins.onAddReviewClicked = gigyaFunctions.goToReviews;
240
  ins.onReadReviewsClicked = gigyaFunctions.goToReviews;
241
  gigya.socialize.showRatingUI(ins);
250
 
251
  gigyaFunctions.postReview = function (eventObj) {
252
  var ratings = [],
253
+ r = eventObj.ratings._overall;
254
  var i = 1;
255
  for (i; i <= 3; i++) {
256
  ratings[i] = r;
257
  r = r + 5;
258
+ }
259
+ ;
260
  var toPost = {
261
+ nickname: eventObj.user.firstName,
262
+ title: eventObj.commentTitle,
263
+ detail: eventObj.commentText,
264
+ ratings: ratings
265
  };
266
+ var reviewsUrl = baseUrl + 'gigyareviews/reviews/post',
267
+ id = '',
268
+ category = '';
269
  if (id = gigyaFunctions.getUrlParam('id')) {
270
  reviewsUrl += '/id/' + id;
271
  }
273
  reviewsUrl += '/category/' + category;
274
  }
275
  new Ajax.Request(reviewsUrl, {
276
+ parameters: {json: JSON.stringify(toPost)},
277
+ onSuccess: function (trans) {
278
+ //TODO: add success/error handeling
279
+ }
280
  }
 
281
  );
282
 
283
 
285
  gigyaFunctions.RnR = function (settings) {
286
  if ($$('form table.ratings-table').length > 0) {
287
  var table = $('product_addtocart_form').select('table.ratings-table');
288
+ table.each(function (itm) {
289
  itm.update().writeAttribute('id', settings.containerID);
290
  if (typeof itm.next('a') !== 'undefined') {
291
  itm.next('a').update();
300
  ua = gigyaFunctions.createUserAction(settings);
301
  delete settings.ua;
302
  var reviews = {
303
+ context: {id: 'comments'},
304
  containerID: 'customer-reviews',
305
  categoryID: settings.categoryID,
306
  streamID: settings.streamID,
307
  scope: settings.scope,
308
+ privacy: settings.privacy,
309
  onCommentSubmitted: gigyaFunctions.postReview,
310
  userAction: ua
311
  };
313
  gigya.socialize.showCommentsUI(reviews);
314
  };
315
 
316
+ gigyaFunctions.showMoreInfoForm = function (html) {
317
+ gigyaModal = new Window({title: 'Please fill in the missing information', height: 300, width: 300, minimizable: false, maximizable: false });
318
+ gigyaModal.setHTMLContent(html);
319
+ gigyaModal.setZIndex(1000);
320
+ gigyaModal.showCenter(true);
321
+ };
322
+
323
+ gigyaFunctions.modalObserver = {
324
+ onShow: function (eventName, win) {
325
+ if (win == gigyaModal) {
326
+ gigyaFunctions.moreInfoSubmit();
327
+ }
328
+ }
329
+ };
330
+
331
  gigyaFunctions.getUrlParam = function (param) {
332
  var urlArray = document.location.href.split('/'),
333
+ idx = urlArray.indexOf(param);
334
  if (idx !== -1) {
335
  return urlArray[idx + 1];
336
  }
343
  function gigyaRegister() {
344
  if (typeof gigya !== 'undefined') {
345
  gigya.socialize.addEventHandlers({
346
+ onLogin: gigyaFunctions.login,
347
+ onLogout: gigyaFunctions.logout
348
  });
349
  }
350
  }
351
 
352
  gigyaRegister();
353
 
354
+ document.observe("dom:loaded", function () {
355
+ if (typeof gigyaSettings !== 'undefined') {
356
+ $H(gigyaSettings).each(function (plugin) {
357
  delete plugin.value.enable;
358
  //var a = JSON.parse(plugin.value);
359
+ switch (plugin.key) {
360
+ case 'login':
361
+ delete plugin.value.loginBehavior;
362
+ gigya.socialize.showLoginUI(plugin.value);
363
+ break;
364
+ case 'linkAccount':
365
+ gigya.socialize.showAddConnectionsUI(plugin.value);
366
+ break;
367
+ case 'sharebar':
368
+ gigyaFunctions.shareBar(plugin.value);
369
+ break;
370
+ case 'shareAction':
371
+ gigyaFunctions.shareAction(plugin.value);
372
+ break;
373
+ case 'reactions':
374
+ gigyaFunctions.reactions(plugin.value);
375
+ break;
376
+ case 'comments':
377
+ plugin.context = {id: "comments"};
378
+ gigya.comments.showCommentsUI(plugin.value);
379
+ break;
380
+ case 'activityFeed':
381
+ delete plugin.value.privacy;
382
+ gigya.socialize.showFeedUI(plugin.value);
383
+ break;
384
+ case 'gm':
385
+ gigyaFunctions.gm(plugin.value);
386
+ break;
387
+ case 'ratings':
388
+ gigyaFunctions.ratings(plugin.value);
389
+ break;
390
+ case 'RnR':
391
+ gigyaFunctions.RnR(plugin.value);
392
+ break;
393
+ case 'logout':
394
+ gigya.socialize.logout();
395
+ break;
396
  }
397
  });
398
  }
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Gigya_Socialize</name>
4
- <version>2.0.1</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.gigya.com/member-agreement/">Gigya License</license>
7
  <channel>community</channel>
@@ -10,13 +10,13 @@
10
  <description>Create an immersive and completely social shopping experience with Gigya&#x2019;s Magento Integration Cartridge. Gigya&#x2019;s social technology combines the core elements that power ecommerce - product awareness and discovery coupled with customer acquisition and loyalty - into a comprehensive set of features and services that are designed to keep customers engaged as well as increase shopping cart conversions while on Magento websites.&#xD;
11
  Gigya works with more than 600 enterprises, including 44% of the Comscore top 100 U.S. web properties, and reaches more than 1.5 billion users per month. Our platform extracts the real value from social networks, empowering online businesses to attract, engage, and understand users like never before.&#xD;
12
  </description>
13
- <notes>Gigya Share bug fix&#xD;
14
  &#xD;
15
  </notes>
16
  <authors><author><name>Yaniv Aran-Shamir</name><user>Gigya</user><email>info@gigya-inc.com</email></author></authors>
17
- <date>2013-06-12</date>
18
- <time>06:05:34</time>
19
- <contents><target name="magecommunity"><dir name="Gigya"><dir><dir name="Social"><dir name="Block"><file name="Emailform.php" hash="adff430d92d0262a93bdfd06e43eba77"/><dir name="Gamification"><file name="Notifications.php" hash="e6a1ef320771d4a975e66be95607f1e7"/><file name="Plugins.php" hash="ac54c592405dd3b53f884824c1ef9f2a"/><file name="php_errors.log" hash="a8fa98083623de1de642364a1a2daebe"/></dir><dir name="Html"><file name="Head.php" hash="6a74ed57ebbb5988653bc8b32ca63b52"/></dir><file name="Login.php" hash="ffc188c10ca7d867bd15f20c59d71995"/><file name="Logout.php" hash="b5c868bbf1f932f5107e85e64a4d7636"/><file name="Ordersharebar.php" hash="77f3eb55f012ade38c5ac03c6b432ab6"/><file name="Ratings.php" hash="b193ef2a6742020d4eb759c4eb54172c"/><file name="Reviews.php" hash="f3063c8639e22302437aacef860a5519"/><file name="Share.php" hash="f6bd21914d7e0eebba1b9157398c3b43"/><file name="php_errors.log" hash="a451b1d0cad6f0c7262fc962f8d0be87"/></dir><dir name="Helper"><file name="Data.php" hash="68882b829de8e96a9b73d25ccef981e0"/><file name="php_errors.log" hash="582c77e8e76b03ac427cea4858a93de2"/></dir><dir name="Model"><dir name="Cart"><file name="Observer.php" hash="7218629f83846328de2157db6388bd4b"/><file name="php_errors.log" hash="44309322d8ea556cef91e8844eee0862"/></dir><dir name="Config"><dir name="Source"><file name="AllwaysShare.php" hash="a49379230b6b4478725c06d2d0421a5c"/><file name="Buttons.php" hash="1fcdc7bd6c48d5cf51839f90e7c1b350"/><file name="CountType.php" hash="6f32a7ddbdeef69c26f25a8fbe8dffd8"/><file name="Counts.php" hash="fbf37735c569c7615abc8e8db073bfea"/><file name="Imageb.php" hash="e148c69185fbb8869c1acabcd8e9379e"/><file name="Languages.php" hash="4b258de03b6a56bb6f352d6d60a728a8"/><file name="Layout.php" hash="4b342404359e3e2a02d11f0d0dabb13c"/><file name="Leaderboard.php" hash="b2f631e4d79fe70fe9f2d0c5f02247fe"/><file name="Loginb.php" hash="9edf0f63a54fd1c5828efcd4ca0550cf"/><file name="Privacy.php" hash="74252005f3bd4d8189b4d6b029a2f21e"/><file name="Scope.php" hash="b0e7836ce30e46147c62de136f79660f"/></dir></dir><dir name="Customer"><file name="Observer.php" hash="00028f927caa46960d52a8bd1b2500f1"/></dir></dir><dir name="controllers"><file name="AdminController.php" hash="740511268dd5a6bb032ef68450b5b8dd"/><file name="LoginController.php" hash="f6d940fc5994fe8323a47b33de030e4b"/><file name="ReviewsController.php" hash="467b93e6b5f418b24d20d81f026b33d9"/><file name="php_errors.log" hash="f4eb53900788dd43382bf542579d3b09"/></dir><dir name="etc"><file name="config.xml" hash="ad1c83565c8a02041bba5a7d30d09679"/><file name="system.xml" hash="82bafb842dd60a01b80045eb516ca2ae"/></dir><file name="php_errors.log" hash="5d491f35f69ea7ed2ae5c3fd15bfbeaf"/><dir name="sdk"><file name="GSSDK.php" hash="90e0c9c854d13195d9bc202faeb628ba"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="gigya.xml" hash="09011767408025e7415377134becc7e6"/></dir><dir name="template"><dir name="gigya"><file name="activityfeed.phtml" hash="da223a978be158c432c00534d9a2124d"/><file name="comments.phtml" hash="6f58951124d375cd2fddf5517c2501f5"/><dir><dir name="form"><file name="emailForm.phtml" hash="c96d44c1435d40a5fe199facd1e06452"/><file name="login.phtml" hash="4caa3aa9df51a326707b801a5f75107e"/><file name="mini.login.phtml" hash="a4612e9f7105e835fe3932a196da69ea"/></dir><dir name="login"><file name="link_accounts.phtml" hash="63bf154045a80c3f5c581047ee406d46"/><file name="social_login.phtml" hash="da1353338c4b2934702f4d7b7bf34068"/><file name="social_login_login_page.phtml" hash="cf9ccff24cb66aa70b6ebfeb8e43882a"/></dir><dir name="ratings"><file name="summary.phtml" hash="f8434e8acb4b45e8ab8f8d926c64cb9b"/><file name="summary_short.phtml" hash="d9dec30e88871dbf24027670f7c05b0e"/></dir><dir name="share"><file name="ordersharebar.phtml" hash="a98bc14f1cc62f0b7029e72c1c2b3668"/><file name="reactions.phtml" hash="e49a5b139f3e8d4232251ddadb24a20a"/><file name="sharebar.phtml" hash="3b9603cb5af4475bf27bd4439830905f"/></dir></dir><file name="gamification.phtml" hash="67159b9bb0cae9e3734580aee8859b52"/><file name="php_errors.log" hash="6d04310c2c9d2cf49f4a63f0d0b3fc3b"/><file name="ratings.phtml" hash="b07b97f389349529c885f484f5a24c81"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Gigya_Social.xml" hash="e5f95ec2941faac5d4ed834f8c1c8b15"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><file name="gigya.css" hash="0cd83b39b375a889a951a4c52526dca6"/></dir><dir name="images"><dir name="gigya"><file name="RateIcon_13.png" hash="fac2db4eab60d7639704868f5a62fdda"/><file name="RateIcon_13_pressed.png" hash="3115cb2ab0b1b3ae0929b4756f67dc38"/><file name="RateIcon_21.png" hash="4b7bfd13d66e8565f04aa045aa766b7a"/><file name="RateIcon_21_pressed.png" hash="6d779713ad683a9b24a4353875cfcaca"/></dir></dir></dir></dir></dir></target><target name="mage"><dir name="js"><dir name="gigya"><file name="gigya.js" hash="927d7c3266f520c7e4abcec441e00bda"/></dir></dir></target></contents>
20
  <compatible/>
21
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
22
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Gigya_Socialize</name>
4
+ <version>2.0.2</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.gigya.com/member-agreement/">Gigya License</license>
7
  <channel>community</channel>
10
  <description>Create an immersive and completely social shopping experience with Gigya&#x2019;s Magento Integration Cartridge. Gigya&#x2019;s social technology combines the core elements that power ecommerce - product awareness and discovery coupled with customer acquisition and loyalty - into a comprehensive set of features and services that are designed to keep customers engaged as well as increase shopping cart conversions while on Magento websites.&#xD;
11
  Gigya works with more than 600 enterprises, including 44% of the Comscore top 100 U.S. web properties, and reaches more than 1.5 billion users per month. Our platform extracts the real value from social networks, empowering online businesses to attract, engage, and understand users like never before.&#xD;
12
  </description>
13
+ <notes>notify login fix&#xD;
14
  &#xD;
15
  </notes>
16
  <authors><author><name>Yaniv Aran-Shamir</name><user>Gigya</user><email>info@gigya-inc.com</email></author></authors>
17
+ <date>2013-08-29</date>
18
+ <time>09:23:28</time>
19
+ <contents><target name="magecommunity"><dir name="Gigya"><dir><dir name="Social"><dir name="Block"><file name="Emailform.php" hash="adff430d92d0262a93bdfd06e43eba77"/><dir name="Gamification"><file name="Notifications.php" hash="e6a1ef320771d4a975e66be95607f1e7"/><file name="Plugins.php" hash="ac54c592405dd3b53f884824c1ef9f2a"/><file name="php_errors.log" hash="a8fa98083623de1de642364a1a2daebe"/></dir><dir name="Html"><file name="Head.php" hash="a70ba6e081bb14cb99bde75e602b746b"/></dir><file name="Login.php" hash="ffc188c10ca7d867bd15f20c59d71995"/><file name="Logout.php" hash="b5c868bbf1f932f5107e85e64a4d7636"/><file name="Ordersharebar.php" hash="77f3eb55f012ade38c5ac03c6b432ab6"/><file name="Ratings.php" hash="b193ef2a6742020d4eb759c4eb54172c"/><file name="Reviews.php" hash="f3063c8639e22302437aacef860a5519"/><file name="Share.php" hash="f6bd21914d7e0eebba1b9157398c3b43"/><file name="php_errors.log" hash="a451b1d0cad6f0c7262fc962f8d0be87"/></dir><dir name="Helper"><file name="Data.php" hash="493ea57dedc1699ecd0a9547a951e5ca"/><file name="php_errors.log" hash="582c77e8e76b03ac427cea4858a93de2"/></dir><dir name="Model"><dir name="Cart"><file name="Observer.php" hash="7218629f83846328de2157db6388bd4b"/><file name="php_errors.log" hash="44309322d8ea556cef91e8844eee0862"/></dir><dir name="Config"><dir name="Source"><file name="AllwaysShare.php" hash="a49379230b6b4478725c06d2d0421a5c"/><file name="Buttons.php" hash="1fcdc7bd6c48d5cf51839f90e7c1b350"/><file name="CountType.php" hash="6f32a7ddbdeef69c26f25a8fbe8dffd8"/><file name="Counts.php" hash="fbf37735c569c7615abc8e8db073bfea"/><file name="Datacenter.php" hash="60710277b75126abccf9d1eb96f3a05d"/><file name="Imageb.php" hash="e148c69185fbb8869c1acabcd8e9379e"/><file name="Languages.php" hash="4b258de03b6a56bb6f352d6d60a728a8"/><file name="Layout.php" hash="4b342404359e3e2a02d11f0d0dabb13c"/><file name="Leaderboard.php" hash="b2f631e4d79fe70fe9f2d0c5f02247fe"/><file name="Loginb.php" hash="9edf0f63a54fd1c5828efcd4ca0550cf"/><file name="Privacy.php" hash="74252005f3bd4d8189b4d6b029a2f21e"/><file name="Scope.php" hash="b0e7836ce30e46147c62de136f79660f"/></dir></dir><dir name="Customer"><file name="Observer.php" hash="dcc80f6617f5f634f90184737bd77884"/></dir></dir><dir name="controllers"><file name="AdminController.php" hash="740511268dd5a6bb032ef68450b5b8dd"/><file name="LoginController.php" hash="ccb1635263f82892006e8c1c42f15588"/><file name="ReviewsController.php" hash="467b93e6b5f418b24d20d81f026b33d9"/><file name="php_errors.log" hash="f4eb53900788dd43382bf542579d3b09"/></dir><dir name="etc"><file name="config.xml" hash="3000e9c0252aa2922329c834794da8ce"/><file name="system.xml" hash="eacabcef603e4b6faaac87627bc1dee0"/></dir><file name="php_errors.log" hash="5d491f35f69ea7ed2ae5c3fd15bfbeaf"/><dir name="sdk"><file name="GSSDK.php" hash="d668d50779eef908828fbda398a50871"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="gigya.xml" hash="2e074fc1ef10e0f6c3d4a622b8ffc5a0"/></dir><dir name="template"><dir name="gigya"><file name="activityfeed.phtml" hash="da223a978be158c432c00534d9a2124d"/><file name="comments.phtml" hash="6f58951124d375cd2fddf5517c2501f5"/><dir><dir name="form"><file name="emailForm.phtml" hash="c96d44c1435d40a5fe199facd1e06452"/><file name="login.phtml" hash="4caa3aa9df51a326707b801a5f75107e"/><file name="mini.login.phtml" hash="a4612e9f7105e835fe3932a196da69ea"/></dir><dir name="login"><file name="link_accounts.phtml" hash="63bf154045a80c3f5c581047ee406d46"/><file name="social_login.phtml" hash="da1353338c4b2934702f4d7b7bf34068"/><file name="social_login_login_page.phtml" hash="cf9ccff24cb66aa70b6ebfeb8e43882a"/></dir><dir name="ratings"><file name="summary.phtml" hash="f8434e8acb4b45e8ab8f8d926c64cb9b"/><file name="summary_short.phtml" hash="d9dec30e88871dbf24027670f7c05b0e"/></dir><dir name="share"><file name="ordersharebar.phtml" hash="a98bc14f1cc62f0b7029e72c1c2b3668"/><file name="reactions.phtml" hash="e49a5b139f3e8d4232251ddadb24a20a"/><file name="sharebar.phtml" hash="3b9603cb5af4475bf27bd4439830905f"/></dir></dir><file name="gamification.phtml" hash="67159b9bb0cae9e3734580aee8859b52"/><file name="php_errors.log" hash="6d04310c2c9d2cf49f4a63f0d0b3fc3b"/><file name="ratings.phtml" hash="b07b97f389349529c885f484f5a24c81"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Gigya_Social.xml" hash="e5f95ec2941faac5d4ed834f8c1c8b15"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><file name="gigya.css" hash="984c09b26a5adff6f0b902b8be2bb190"/></dir><dir name="images"><dir name="gigya"><file name="RateIcon_13.png" hash="fac2db4eab60d7639704868f5a62fdda"/><file name="RateIcon_13_pressed.png" hash="3115cb2ab0b1b3ae0929b4756f67dc38"/><file name="RateIcon_21.png" hash="4b7bfd13d66e8565f04aa045aa766b7a"/><file name="RateIcon_21_pressed.png" hash="6d779713ad683a9b24a4353875cfcaca"/></dir></dir></dir></dir></dir></target><target name="mage"><dir name="js"><dir name="gigya"><file name="gigya.js" hash="bb279c77c60203a9a208ef14d00c2d06"/></dir></dir></target></contents>
20
  <compatible/>
21
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
22
  </package>
skin/frontend/base/default/css/gigya.css CHANGED
@@ -31,3 +31,21 @@ div.ratings-short .gig-rating div.gig-rating-star-empty {
31
  float: right;
32
  margin-top: 15px;
33
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
31
  float: right;
32
  margin-top: 15px;
33
  }
34
+
35
+ .gigyaMoreInfo {
36
+ margin: 15px;
37
+ }
38
+ #gigyaMoreInfoSubmit {
39
+ margin-top: 5px;
40
+ }
41
+
42
+ .trob {
43
+ position: fixed;
44
+ top: 50%;
45
+ right: 50%;
46
+ margin-top: -11px;
47
+ margin-right: -11px;
48
+ width: 32px;
49
+ height: 32px;
50
+ background: transparent url("http://cdn.gigya.com/gs/i/progress_ani.gif") no-repeat;
51
+ }