TroopID_Connect - Version 1.3.0

Version Notes

Add support for teacher verification

Download this release

Release Info

Developer ID.me
Extension TroopID_Connect
Version 1.3.0
Comparing to
See all releases


Code changes from version 1.2.1 to 1.3.0

app/code/community/TroopID/Connect/Helper/Data.php CHANGED
@@ -55,7 +55,9 @@ class TroopID_Connect_Helper_Data extends Mage_Core_Helper_Abstract {
55
  return $values;
56
 
57
  $values = $oauth->getAffiliations();
58
- $cache->save(serialize($values), self::CACHE_KEY, array(self::CACHE_TAG), 60*60*24*7);
 
 
59
 
60
  return $values;
61
  }
55
  return $values;
56
 
57
  $values = $oauth->getAffiliations();
58
+
59
+ if (is_array($values) && count($values) > 0)
60
+ $cache->save(serialize($values), self::CACHE_KEY, array(self::CACHE_TAG), 60*60*24*7);
61
 
62
  return $values;
63
  }
app/code/community/TroopID/Connect/Helper/Oauth.php CHANGED
@@ -76,7 +76,8 @@ class TroopID_Connect_Helper_Oauth extends Mage_Core_Helper_Abstract {
76
  $endpoints = array(
77
  "military" => "/v2/military.json",
78
  "student" => "/v2/student.json",
79
- "responder" => "/v2/responder.json"
 
80
  );
81
 
82
  $client = new Zend_Http_Client();
76
  $endpoints = array(
77
  "military" => "/v2/military.json",
78
  "student" => "/v2/student.json",
79
+ "responder" => "/v2/responder.json",
80
+ "teacher" => "/v2/teacher.json"
81
  );
82
 
83
  $client = new Zend_Http_Client();
app/code/community/TroopID/Connect/etc/config.xml CHANGED
@@ -124,6 +124,7 @@
124
  <enable_military>1</enable_military>
125
  <enable_student>1</enable_student>
126
  <enable_responder>1</enable_responder>
 
127
  <about><![CDATA[
128
  <p><strong>Who is eligible for ID.me membership?</strong><br/>
129
  Students, First Responders, Veterans, Service Members, Retirees, Military Spouses and their Immediate Family Members i.e. parents and children of Veterans, Service Members, Retirees and Military Spouses are eligible to sign up for ID.me</p>
124
  <enable_military>1</enable_military>
125
  <enable_student>1</enable_student>
126
  <enable_responder>1</enable_responder>
127
+ <enable_teachers>1</enable_teachers>
128
  <about><![CDATA[
129
  <p><strong>Who is eligible for ID.me membership?</strong><br/>
130
  Students, First Responders, Veterans, Service Members, Retirees, Military Spouses and their Immediate Family Members i.e. parents and children of Veterans, Service Members, Retirees and Military Spouses are eligible to sign up for ID.me</p>
app/code/community/TroopID/Connect/etc/system.xml CHANGED
@@ -117,10 +117,20 @@
117
  <show_in_store>1</show_in_store>
118
  <comment/>
119
  </enabled_responder>
 
 
 
 
 
 
 
 
 
 
120
  <about>
121
  <label>Instructions</label>
122
  <frontend_type>textarea</frontend_type>
123
- <sort_order>9</sort_order>
124
  <show_in_default>1</show_in_default>
125
  <show_in_website>1</show_in_website>
126
  <show_in_store>1</show_in_store>
117
  <show_in_store>1</show_in_store>
118
  <comment/>
119
  </enabled_responder>
120
+ <enabled_teacher>
121
+ <label>Teachers verification</label>
122
+ <frontend_type>select</frontend_type>
123
+ <source_model>troopid_connect/system_config_source_enabled</source_model>
124
+ <sort_order>9</sort_order>
125
+ <show_in_default>1</show_in_default>
126
+ <show_in_website>1</show_in_website>
127
+ <show_in_store>1</show_in_store>
128
+ <comment/>
129
+ </enabled_teacher>
130
  <about>
131
  <label>Instructions</label>
132
  <frontend_type>textarea</frontend_type>
133
+ <sort_order>10</sort_order>
134
  <show_in_default>1</show_in_default>
135
  <show_in_website>1</show_in_website>
136
  <show_in_store>1</show_in_store>
app/design/frontend/base/default/template/troopid/connect/cart.phtml CHANGED
@@ -38,6 +38,16 @@
38
 
39
  <?php endif ?>
40
 
 
 
 
 
 
 
 
 
 
 
41
  <?php endif ?>
42
  <div class="about">
43
  <a href="javascript:void(0);" class="troopid-modal-trigger"><?php echo $this->__("What is this?") ?></a>
38
 
39
  <?php endif ?>
40
 
41
+ <?php if ($this->isEnabled("teacher")) : ?>
42
+
43
+ <div class="button">
44
+ <a href="javascript:void(0);" class="troopid-connect-trigger" data-scope="teacher" title="<?php echo $this->__("Verify your teacher affiliation with ID.me") ?>">
45
+ <img alt="<?php echo $this->__("Verify your teacher affiliation with ID.me") ?>" src="https://s3.amazonaws.com/idme/buttons/teacher_gray1_rnd_32.png" />
46
+ </a>
47
+ </div>
48
+
49
+ <?php endif ?>
50
+
51
  <?php endif ?>
52
  <div class="about">
53
  <a href="javascript:void(0);" class="troopid-modal-trigger"><?php echo $this->__("What is this?") ?></a>
package.xml CHANGED
@@ -1,18 +1,18 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>TroopID_Connect</name>
4
- <version>1.2.1</version>
5
  <stability>stable</stability>
6
  <license>OSL v3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>TroopID Connect integration.</summary>
10
  <description>N/A</description>
11
- <notes>Fix how modal window observers are bound.</notes>
12
  <authors><author><name>ID.me</name><user>idme</user><email>support@id.me</email></author></authors>
13
- <date>2013-10-30</date>
14
- <time>14:29:42</time>
15
- <contents><target name="magecommunity"><dir name="TroopID"><dir name="Connect"><dir name="Block"><dir name="Adminhtml"><dir name="Sales"><dir name="Order"><dir name="View"><dir name="Tab"><file name="Affiliation.php" hash="d2f7b9f00585fc7d2b558096c31f5de1"/></dir></dir></dir></dir><dir name="System"><dir name="Config"><file name="Custom.php" hash="0f7f75b4b55edb638d241852a0220b3f"/><file name="Instructions.php" hash="8672b12ef38027e844bcccf5835d6a30"/></dir></dir></dir><file name="Cart.php" hash="749846d467e503c705818897f57ed7f9"/></dir><dir name="Helper"><file name="Data.php" hash="886ce8d80a634443a7935aac81e9dddb"/><file name="Oauth.php" hash="9089fd8f96397a3c0fa5231b5709b8dd"/></dir><dir name="Model"><dir name="Cart"><file name="Observer.php" hash="c837fb0c02ac02416200002d5e3b233c"/></dir><dir name="Rule"><file name="Condition.php" hash="345e7992da8bd7d543e9d25ed92e1d66"/><file name="Observer.php" hash="ff3a6cc43e4d46401a4bbb37262f4f56"/></dir><dir name="System"><dir name="Config"><dir name="Source"><file name="Enabled.php" hash="103e4776ee228d313fcb63c0eefcb0db"/></dir></dir></dir></dir><dir name="controllers"><file name="AuthorizeController.php" hash="1e27d7e0f7f6f10e0fc8ac69a5b35f3d"/></dir><dir name="etc"><file name="adminhtml.xml" hash="2bba51d29a0e9c444ff401a460a44142"/><file name="config.xml" hash="78c268c1d011e229e9e7fde686f584e7"/><file name="system.xml" hash="0699caf80b40f5f4d45f08c170582fa1"/></dir><dir name="sql"><dir name="troopid_connect_setup"><file name="mysql4-install-0.1.0.php" hash="2ed9e5f82407c756477d7fc2d3cd20ff"/><file name="mysql4-upgrade-0.2.0-0.3.0.php" hash="6160551e6951f91ab7ef18e887ea73a9"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="troopid_connect.xml" hash="b5c1ab02bb09e99d59465add1182e5e0"/></dir><dir name="template"><dir name="troopid"><dir name="connect"><file name="affiliation.phtml" hash="69c74c5b4d78f1f6822be88d1a3bd928"/></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="troopid_connect.xml" hash="2252d9dd57d061eeaca3577190fb67c2"/></dir><dir name="template"><dir name="troopid"><dir name="connect"><file name="callback.phtml" hash="71b10af7408d6f50999529c08aa75dfb"/><file name="cart.phtml" hash="fb91f3136eaeff2b86d06b275cdd00b7"/><file name="script.phtml" hash="3bf90c1e66e5382336ffe2fca136503d"/></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="TroopID_Connect.xml" hash="daae0990b13ba4071764efd4f9f674ec"/></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="troopid"><dir name="images"><file name="logo.png" hash="65421456771898d7cbced7b99d4b56ea"/></dir><file name="troopid.css" hash="57964a12675c76bca426475515160dcc"/></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="troopid"><file name="troopid.css" hash="05c691747e19934f56d4f9f9f777d440"/></dir></dir></dir><dir name="enterprise"><dir name="default"><dir name="troopid"><file name="troopid.css" hash="4bba21e6846610c2acc9f50207292a1c"/></dir></dir></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>TroopID_Connect</name>
4
+ <version>1.3.0</version>
5
  <stability>stable</stability>
6
  <license>OSL v3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>TroopID Connect integration.</summary>
10
  <description>N/A</description>
11
+ <notes>Add support for teacher verification</notes>
12
  <authors><author><name>ID.me</name><user>idme</user><email>support@id.me</email></author></authors>
13
+ <date>2014-07-02</date>
14
+ <time>15:14:50</time>
15
+ <contents><target name="magecommunity"><dir name="TroopID"><dir name="Connect"><dir name="Block"><dir name="Adminhtml"><dir name="Sales"><dir name="Order"><dir name="View"><dir name="Tab"><file name="Affiliation.php" hash="d2f7b9f00585fc7d2b558096c31f5de1"/></dir></dir></dir></dir><dir name="System"><dir name="Config"><file name="Custom.php" hash="0f7f75b4b55edb638d241852a0220b3f"/><file name="Instructions.php" hash="8672b12ef38027e844bcccf5835d6a30"/></dir></dir></dir><file name="Cart.php" hash="749846d467e503c705818897f57ed7f9"/></dir><dir name="Helper"><file name="Data.php" hash="437452520a2f77e9633873df5a0d1948"/><file name="Oauth.php" hash="0a9b3cb1a3935e3018e6ff11580c3412"/></dir><dir name="Model"><dir name="Cart"><file name="Observer.php" hash="c837fb0c02ac02416200002d5e3b233c"/></dir><dir name="Rule"><file name="Condition.php" hash="345e7992da8bd7d543e9d25ed92e1d66"/><file name="Observer.php" hash="ff3a6cc43e4d46401a4bbb37262f4f56"/></dir><dir name="System"><dir name="Config"><dir name="Source"><file name="Enabled.php" hash="103e4776ee228d313fcb63c0eefcb0db"/></dir></dir></dir></dir><dir name="controllers"><file name="AuthorizeController.php" hash="1e27d7e0f7f6f10e0fc8ac69a5b35f3d"/></dir><dir name="etc"><file name="adminhtml.xml" hash="2bba51d29a0e9c444ff401a460a44142"/><file name="config.xml" hash="9afbb55596777705acd7fde962e879e7"/><file name="system.xml" hash="ffe152cba7141c917b7beb8a97c5940d"/></dir><dir name="sql"><dir name="troopid_connect_setup"><file name="mysql4-install-0.1.0.php" hash="2ed9e5f82407c756477d7fc2d3cd20ff"/><file name="mysql4-upgrade-0.2.0-0.3.0.php" hash="6160551e6951f91ab7ef18e887ea73a9"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="troopid_connect.xml" hash="b5c1ab02bb09e99d59465add1182e5e0"/></dir><dir name="template"><dir name="troopid"><dir name="connect"><file name="affiliation.phtml" hash="69c74c5b4d78f1f6822be88d1a3bd928"/></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="troopid_connect.xml" hash="2252d9dd57d061eeaca3577190fb67c2"/></dir><dir name="template"><dir name="troopid"><dir name="connect"><file name="callback.phtml" hash="71b10af7408d6f50999529c08aa75dfb"/><file name="cart.phtml" hash="3f31cfde6b4bac8618677694b7f2b5c2"/><file name="script.phtml" hash="3bf90c1e66e5382336ffe2fca136503d"/></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="TroopID_Connect.xml" hash="daae0990b13ba4071764efd4f9f674ec"/></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="troopid"><dir name="images"><file name="logo.png" hash="65421456771898d7cbced7b99d4b56ea"/></dir><file name="troopid.css" hash="57964a12675c76bca426475515160dcc"/></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="troopid"><file name="troopid.css" hash="05c691747e19934f56d4f9f9f777d440"/></dir></dir></dir><dir name="enterprise"><dir name="default"><dir name="troopid"><file name="troopid.css" hash="4bba21e6846610c2acc9f50207292a1c"/></dir></dir></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
18
  </package>