LoyaltyLion - Version 1.1.3

Version Notes

This version fixes a bug with oauth credential submission.

Download this release

Release Info

Developer Dave Clark
Extension LoyaltyLion
Version 1.1.3
Comparing to
See all releases


Code changes from version 1.1.2 to 1.1.3

app/code/local/LoyaltyLion/Core/etc/system.xml CHANGED
@@ -31,6 +31,7 @@
31
  <show_in_default>1</show_in_default>
32
  <show_in_website>1</show_in_website>
33
  <show_in_store>1</show_in_store>
 
34
  </loyaltylion_token>
35
  <loyaltylion_secret translate='label'>
36
  <label>Secret</label>
31
  <show_in_default>1</show_in_default>
32
  <show_in_website>1</show_in_website>
33
  <show_in_store>1</show_in_store>
34
+ <comment><![CDATA["Don't have a LoyaltyLion accont? <a href="https://loyaltylion.com/signup" target="_blank">Sign up here.</a>]]></comment>
35
  </loyaltylion_token>
36
  <loyaltylion_secret translate='label'>
37
  <label>Secret</label>
app/code/local/LoyaltyLion/CouponImport/controllers/Adminhtml/QuickSetupController.php CHANGED
@@ -134,18 +134,15 @@ class LoyaltyLion_CouponImport_Adminhtml_QuickSetupController extends Mage_Admin
134
  return array_merge(array('consumer_key' => $oauth['key'], 'consumer_secret' => $oauth['secret']), $accessToken);
135
  }
136
 
137
- public function submitOAuthCredentials($credentials) {
138
  if (isset($_SERVER['LOYALTYLION_WEBSITE_BASE'])) {
139
  $loyaltyLionURL = $_SERVER['LOYALTYLION_WEBSITE_BASE'];
140
  }
141
  Mage::log("[LoyaltyLion] Submitting OAuth credentials to LoyaltyLion site");
142
 
143
- $token = Mage::getStoreConfig('loyaltylion/configuration/loyaltylion_token');
144
- $secret = Mage::getStoreConfig('loyaltylion/configuration/loyaltylion_secret');
145
-
146
- $connection = new LoyaltyLion_Connection($token, $secret, $loyaltyLionURL);
147
  $setup_uri = '/magento/oauth_credentials';
148
- $base_url = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB);
149
  $credentials['base_url'] = $base_url;
150
  $credentials['extension_version'] = (string) Mage::getConfig()->getModuleConfig("LoyaltyLion_Core")->version;
151
  $resp = $connection->post($setup_uri, $credentials);
@@ -209,7 +206,7 @@ class LoyaltyLion_CouponImport_Adminhtml_QuickSetupController extends Mage_Admin
209
  $credentials = $this->getOAuthCredentials($OAuthConsumerID, $currentUser);
210
  }
211
 
212
- $result = $this->submitOAuthCredentials($credentials);
213
  if ($result == "ok") {
214
  Mage::getModel('core/config')->saveConfig('loyaltylion/internals/has_submitted_oauth', 1);
215
  }
134
  return array_merge(array('consumer_key' => $oauth['key'], 'consumer_secret' => $oauth['secret']), $accessToken);
135
  }
136
 
137
+ public function submitOAuthCredentials($credentials, $token, $secret) {
138
  if (isset($_SERVER['LOYALTYLION_WEBSITE_BASE'])) {
139
  $loyaltyLionURL = $_SERVER['LOYALTYLION_WEBSITE_BASE'];
140
  }
141
  Mage::log("[LoyaltyLion] Submitting OAuth credentials to LoyaltyLion site");
142
 
143
+ $connection = new LoyaltyLion_Connection($token, $secret, $loyaltyLionURL);
 
 
 
144
  $setup_uri = '/magento/oauth_credentials';
145
+ $base_url = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB);
146
  $credentials['base_url'] = $base_url;
147
  $credentials['extension_version'] = (string) Mage::getConfig()->getModuleConfig("LoyaltyLion_Core")->version;
148
  $resp = $connection->post($setup_uri, $credentials);
206
  $credentials = $this->getOAuthCredentials($OAuthConsumerID, $currentUser);
207
  }
208
 
209
+ $result = $this->submitOAuthCredentials($credentials, $token, $secret);
210
  if ($result == "ok") {
211
  Mage::getModel('core/config')->saveConfig('loyaltylion/internals/has_submitted_oauth', 1);
212
  }
app/code/local/LoyaltyLion/CouponImport/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <LoyaltyLion_CouponImport>
5
- <version>0.1.1</version>
6
  </LoyaltyLion_CouponImport>
7
  </modules>
8
  <global>
2
  <config>
3
  <modules>
4
  <LoyaltyLion_CouponImport>
5
+ <version>0.1.2</version>
6
  </LoyaltyLion_CouponImport>
7
  </modules>
8
  <global>
package.xml CHANGED
@@ -1,18 +1,18 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>LoyaltyLion</name>
4
- <version>1.1.2</version>
5
  <stability>stable</stability>
6
- <license>MIT</license>
7
  <channel>community</channel>
8
  <extends/>
9
- <summary>Use LoyaltyLion to add your own loyalty program in minutes and gain valuable customer insights. </summary>
10
  <description>Increase activity and customer happiness by offering points for signups, purchases, visits and referrals. Your customers will collect points and redeem them for rewards to use at your store, which encourages repeat visits and long term loyalty.</description>
11
- <notes>This release improves the configuration process.</notes>
12
  <authors><author><name>Dave Clark</name><user>clarkdave_ll</user><email>dave@loyaltylion.com</email></author><author><name>Patrick Molgaard</name><user>draaglom</user><email>patrick@loyaltylion.com</email></author></authors>
13
- <date>2015-12-29</date>
14
- <time>16:55:53</time>
15
- <contents><target name="magelocal"><dir name="LoyaltyLion"><dir name="Core"><dir name="Block"><file name="Sdk.php" hash="0f1269720db26f76acf791b3e944567b"/></dir><dir name="Helper"><file name="Data.php" hash="3ac59332d4eb3469869d84a07f949d17"/></dir><dir name="Model"><file name="Observer.php" hash="339cc2da60b70b8a81823a76709b1343"/></dir><dir name="etc"><file name="config.xml" hash="13edb1a712803c4bce2a63124f7bb76e"/><file name="system.xml" hash="d9f693debd08ea703404cb3e0d4dec1d"/></dir><dir name="lib"><dir name="loyaltylion-client"><dir name="lib"><file name="connection.php" hash="56f73205995ca0925a1b4cb6b2deb56c"/></dir><file name="main.php" hash="e8646ebd8aabb904b5163fc2a04f7e30"/></dir></dir></dir><dir name="CouponImport"><dir name="Block"><dir name="Adminhtml"><file name="Button.php" hash="3fe32ef718f21cdbed71bd023158960a"/></dir></dir><dir name="Model"><dir name="Api2"><dir name="Coupon"><dir name="Rest"><dir name="Admin"><file name="V1.php" hash="ed9a42c0d8945b69c7dc3436609911d1"/></dir></dir></dir><file name="Coupon.php" hash="bbaf6c59b4b132eb54a72e0688f3fab1"/><dir name="PriceRule"><dir name="Rest"><dir name="Admin"><file name="V1.php" hash="72c2f66b0de2996a612c7509cbbd82f2"/></dir></dir></dir><file name="PriceRule.php" hash="4b8d85f224fd5f121727977066c50cd1"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="QuickSetupController.php" hash="b27c4245cc9ad906b42befeb96f58814"/></dir></dir><dir name="etc"><file name="api2.xml" hash="e8ec47daccbb43584239fe3aeac9c122"/><file name="config.xml" hash="1e88c72e11bee8311e26c581ea858da5"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="loyaltylion"><dir name="core"><file name="sdk.phtml" hash="5e159702c28c50236887eb31b488539a"/></dir></dir></dir><dir name="layout"><file name="loyaltylion.xml" hash="f2c14ac8327d4eea6d8da6dfd61ede4c"/></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="loyaltylion"><dir><dir name="system"><dir name="config"><file name="button.phtml" hash="1a41889f5d0159be59eedb32fb8beb77"/></dir></dir></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="LoyaltyLion_Core.xml" hash="33446455fb634c28776a0fe45095a459"/><file name="LoyaltyLion_CouponImport.xml" hash="ff6ba2c149886ab7ee7de418619bb734"/></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.3.0</min><max>7.0.0</max></php></required></dependencies>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>LoyaltyLion</name>
4
+ <version>1.1.3</version>
5
  <stability>stable</stability>
6
+ <license>MITL</license>
7
  <channel>community</channel>
8
  <extends/>
9
+ <summary>Use LoyaltyLion to add your own loyalty program in minutes and gain valuable customer insights.</summary>
10
  <description>Increase activity and customer happiness by offering points for signups, purchases, visits and referrals. Your customers will collect points and redeem them for rewards to use at your store, which encourages repeat visits and long term loyalty.</description>
11
+ <notes>This version fixes a bug with oauth credential submission.</notes>
12
  <authors><author><name>Dave Clark</name><user>clarkdave_ll</user><email>dave@loyaltylion.com</email></author><author><name>Patrick Molgaard</name><user>draaglom</user><email>patrick@loyaltylion.com</email></author></authors>
13
+ <date>2015-12-30</date>
14
+ <time>17:39:35</time>
15
+ <contents><target name="magelocal"><dir name="LoyaltyLion"><dir name="Core"><dir name="Block"><file name="Sdk.php" hash="0f1269720db26f76acf791b3e944567b"/></dir><dir name="Helper"><file name="Data.php" hash="3ac59332d4eb3469869d84a07f949d17"/></dir><dir name="Model"><file name="Observer.php" hash="339cc2da60b70b8a81823a76709b1343"/></dir><dir name="etc"><file name="config.xml" hash="13edb1a712803c4bce2a63124f7bb76e"/><file name="system.xml" hash="533010d78a8a4f830e30e151477eb0c9"/></dir><dir name="lib"><dir name="loyaltylion-client"><dir name="lib"><file name="connection.php" hash="56f73205995ca0925a1b4cb6b2deb56c"/></dir><file name="main.php" hash="e8646ebd8aabb904b5163fc2a04f7e30"/></dir></dir></dir><dir name="CouponImport"><dir name="Block"><dir name="Adminhtml"><file name="Button.php" hash="3fe32ef718f21cdbed71bd023158960a"/></dir></dir><dir name="Model"><dir name="Api2"><dir name="Coupon"><dir name="Rest"><dir name="Admin"><file name="V1.php" hash="ed9a42c0d8945b69c7dc3436609911d1"/></dir></dir></dir><file name="Coupon.php" hash="bbaf6c59b4b132eb54a72e0688f3fab1"/><dir name="PriceRule"><dir name="Rest"><dir name="Admin"><file name="V1.php" hash="72c2f66b0de2996a612c7509cbbd82f2"/></dir></dir></dir><file name="PriceRule.php" hash="4b8d85f224fd5f121727977066c50cd1"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="QuickSetupController.php" hash="9deb3fa53b25366df95239b35d1f8100"/></dir></dir><dir name="etc"><file name="api2.xml" hash="e8ec47daccbb43584239fe3aeac9c122"/><file name="config.xml" hash="a8dbe0d223d6413cc019f56e8095d393"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="loyaltylion"><dir><dir name="core"><file name="sdk.phtml" hash="5e159702c28c50236887eb31b488539a"/></dir></dir></dir></dir><dir name="layout"><file name="loyaltylion.xml" hash="f2c14ac8327d4eea6d8da6dfd61ede4c"/></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="loyaltylion"><dir><dir name="system"><dir name="config"><file name="button.phtml" hash="1a41889f5d0159be59eedb32fb8beb77"/></dir></dir></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="LoyaltyLion_Core.xml" hash="33446455fb634c28776a0fe45095a459"/><file name="LoyaltyLion_CouponImport.xml" hash="ff6ba2c149886ab7ee7de418619bb734"/></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.3.0</min><max>7.0.0</max></php></required></dependencies>
18
  </package>