TroopID_Connect - Version 0.4.0

Version Notes

N/A

Download this release

Release Info

Developer Troop ID
Extension TroopID_Connect
Version 0.4.0
Comparing to
See all releases


Code changes from version 0.3.0 to 0.4.0

app/code/community/TroopID/Connect/Block/Cart.php CHANGED
@@ -1,5 +1,4 @@
1
  <?php
2
-
3
  class TroopID_Connect_Block_Cart extends Mage_Checkout_Block_Cart_Abstract {
4
 
5
  public function isOperational() {
1
  <?php
 
2
  class TroopID_Connect_Block_Cart extends Mage_Checkout_Block_Cart_Abstract {
3
 
4
  public function isOperational() {
app/code/community/TroopID/Connect/Helper/Oauth.php CHANGED
@@ -64,14 +64,16 @@ class TroopID_Connect_Helper_Oauth extends Mage_Core_Helper_Abstract {
64
  if (empty($token))
65
  return null;
66
 
67
- $config = Mage::helper("troopid_connect");
68
-
69
  $client = new Zend_Http_Client();
70
  $client->setUri($this->getDomain() . self::PROFILE_PATH);
71
  $client->setParameterGet(array(
72
  "access_token" => $token
73
  ));
74
 
 
 
 
 
75
  try {
76
  $response = $client->request("GET");
77
  } catch (Zend_Http_Client_Exception $e) {
@@ -87,7 +89,16 @@ class TroopID_Connect_Helper_Oauth extends Mage_Core_Helper_Abstract {
87
  }
88
 
89
  public function getAffiliations() {
90
- $client = new Zend_Http_Client($this->getDomain() . self::AFFILIATIONS_PATH);
 
 
 
 
 
 
 
 
 
91
  $response = $client->request("GET");
92
  $values = array();
93
 
64
  if (empty($token))
65
  return null;
66
 
 
 
67
  $client = new Zend_Http_Client();
68
  $client->setUri($this->getDomain() . self::PROFILE_PATH);
69
  $client->setParameterGet(array(
70
  "access_token" => $token
71
  ));
72
 
73
+ $client->setHeaders(array(
74
+ "X-API-ORIGIN" => "MAGENTO-TID"
75
+ ));
76
+
77
  try {
78
  $response = $client->request("GET");
79
  } catch (Zend_Http_Client_Exception $e) {
89
  }
90
 
91
  public function getAffiliations() {
92
+ $config = $this->getConfig();
93
+ $client = new Zend_Http_Client($this->getDomain() . self::AFFILIATIONS_PATH);
94
+ $client->setParameterGet(array(
95
+ "client_id" => $config->getKey("client_id")
96
+ ));
97
+
98
+ $client->setHeaders(array(
99
+ "X-API-ORIGIN" => "MAGENTO-TID"
100
+ ));
101
+
102
  $response = $client->request("GET");
103
  $values = array();
104
 
app/design/frontend/default/default/layout/troopid_connect.xml CHANGED
@@ -1,5 +1,5 @@
1
  <?xml version="1.0"?>
2
- <layout version="0.2.0">
3
  <default>
4
  <reference name="head">
5
  <action method="addCss"><stylesheet>troopid_connect/troopid.css</stylesheet></action>
1
  <?xml version="1.0"?>
2
+ <layout version="0.1.0">
3
  <default>
4
  <reference name="head">
5
  <action method="addCss"><stylesheet>troopid_connect/troopid.css</stylesheet></action>
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>TroopID_Connect</name>
4
- <version>0.3.0</version>
5
  <stability>stable</stability>
6
  <license>OSL v3.0</license>
7
  <channel>community</channel>
@@ -10,9 +10,9 @@
10
  <description>N/A</description>
11
  <notes>N/A</notes>
12
  <authors><author><name>Troop ID</name><user>troopid</user><email>support@troopid.com</email></author></authors>
13
- <date>2013-02-11</date>
14
- <time>15:18:06</time>
15
- <contents><target name="magecommunity"><dir name="TroopID"><dir name="Connect"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="Help.php" hash="dbb0fb61c7d5a7dbe61620d26afaea3c"/><file name="Instructions.php" hash="73d8da665a30d9cb7d14b739bb373e95"/></dir></dir></dir><file name="Cart.php" hash="2f4aee3250d9e396f4db3cbfe0bb8c3d"/></dir><dir name="Helper"><file name="Data.php" hash="784a3105a77f3651fc26e70ad1a849b6"/><file name="Oauth.php" hash="bf60a13267c383026c3f2074378949e6"/></dir><dir name="Model"><dir name="Rule"><file name="Condition.php" hash="d11bda0d429870d3c33deffa89ad281b"/><file name="Observer.php" hash="ba4faa579190480aa5e497c5632e5649"/></dir></dir><dir name="controllers"><file name="AuthorizeController.php" hash="8b16894d853ea569bf18dbd1f0b8c287"/></dir><dir name="etc"><file name="adminhtml.xml" hash="e96ed1474688e377a910dbbc48317978"/><file name="config.xml" hash="49e0d9fc2ad551ad1d131f4984490918"/><file name="system.xml" hash="33a49f6320c0febe9ce136e82ac890c6"/></dir><dir name="sql"><dir name="troopid_connect_setup"><file name="mysql4-install-0.1.0.php" hash="2ed9e5f82407c756477d7fc2d3cd20ff"/></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="40661e46e044c7b154114bf7feea3a2e"/></dir><dir name="template"><dir name="troopid"><dir name="connect"><file name="order.phtml" hash="47d0a58564e02b5326a700da28496238"/></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="troopid_connect.xml" hash="188214a896b052e295dabbf4281a106d"/></dir><dir name="template"><dir name="troopid"><dir name="connect"><file name="callback.phtml" hash="71b10af7408d6f50999529c08aa75dfb"/><file name="cart.phtml" hash="1e1accd15ca8aadabd699ebb1d4cfaf9"/><file name="script.phtml" hash="d8d34c032c5a68000125008c26b84f57"/></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="TroopID_Connect.xml" hash="c599f9e8aa2c1296fbfb08db03b0d001"/></dir></target><target name="magelocale"><dir name="en_US"><file name="TroopID_Connect.csv" hash="fd903faf1751e6b9712b055bcf93af43"/></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="troopid_connect"><dir name="images"><file name="logo.png" hash="b4652dab2eddd53440f36c353524beaa"/></dir><file name="troopid.css" hash="1a66f25f2b81ff569fc592de18f5ffb3"/></dir></dir></dir></dir><dir name="frontend"><dir name="default"><dir name="default"><dir name="troopid_connect"><file name="troopid.css" hash="e5d27c03f451777841bcbe290cadb813"/></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>0.4.0</version>
5
  <stability>stable</stability>
6
  <license>OSL v3.0</license>
7
  <channel>community</channel>
10
  <description>N/A</description>
11
  <notes>N/A</notes>
12
  <authors><author><name>Troop ID</name><user>troopid</user><email>support@troopid.com</email></author></authors>
13
+ <date>2013-05-20</date>
14
+ <time>16:56:24</time>
15
+ <contents><target name="magecommunity"><dir name="TroopID"><dir name="Connect"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="Help.php" hash="dbb0fb61c7d5a7dbe61620d26afaea3c"/><file name="Instructions.php" hash="73d8da665a30d9cb7d14b739bb373e95"/></dir></dir></dir><file name="Cart.php" hash="66542531747ebc44b2760c54a5fae946"/></dir><dir name="Helper"><file name="Data.php" hash="784a3105a77f3651fc26e70ad1a849b6"/><file name="Oauth.php" hash="68757301568654113e0033bbff633f27"/></dir><dir name="Model"><dir name="Rule"><file name="Condition.php" hash="d11bda0d429870d3c33deffa89ad281b"/><file name="Observer.php" hash="ba4faa579190480aa5e497c5632e5649"/></dir></dir><dir name="controllers"><file name="AuthorizeController.php" hash="8b16894d853ea569bf18dbd1f0b8c287"/></dir><dir name="etc"><file name="adminhtml.xml" hash="e96ed1474688e377a910dbbc48317978"/><file name="config.xml" hash="49e0d9fc2ad551ad1d131f4984490918"/><file name="system.xml" hash="33a49f6320c0febe9ce136e82ac890c6"/></dir><dir name="sql"><dir name="troopid_connect_setup"><file name="mysql4-install-0.1.0.php" hash="2ed9e5f82407c756477d7fc2d3cd20ff"/></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="40661e46e044c7b154114bf7feea3a2e"/></dir><dir name="template"><dir name="troopid"><dir name="connect"><file name="order.phtml" hash="47d0a58564e02b5326a700da28496238"/></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="troopid_connect.xml" hash="5f42ace57d99608c8deb7e15b4ffc080"/></dir><dir name="template"><dir name="troopid"><dir name="connect"><file name="callback.phtml" hash="71b10af7408d6f50999529c08aa75dfb"/><file name="cart.phtml" hash="1e1accd15ca8aadabd699ebb1d4cfaf9"/><file name="script.phtml" hash="d8d34c032c5a68000125008c26b84f57"/></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="TroopID_Connect.xml" hash="c599f9e8aa2c1296fbfb08db03b0d001"/></dir></target><target name="magelocale"><dir name="en_US"><file name="TroopID_Connect.csv" hash="fd903faf1751e6b9712b055bcf93af43"/></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="troopid_connect"><dir name="images"><file name="logo.png" hash="b4652dab2eddd53440f36c353524beaa"/></dir><file name="troopid.css" hash="1a66f25f2b81ff569fc592de18f5ffb3"/></dir></dir></dir></dir><dir name="frontend"><dir name="default"><dir name="default"><dir name="troopid_connect"><file name="troopid.css" hash="e5d27c03f451777841bcbe290cadb813"/></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>