Version Notes
N/A
Download this release
Release Info
Developer | ID.me |
Extension | TroopID_Connect |
Version | 1.0.3 |
Comparing to | |
See all releases |
Code changes from version 1.0.2 to 1.0.3
app/code/community/TroopID/Connect/Helper/Data.php
CHANGED
@@ -46,15 +46,16 @@ class TroopID_Connect_Helper_Data extends Mage_Core_Helper_Abstract {
|
|
46 |
}
|
47 |
|
48 |
public function getAffiliations() {
|
49 |
-
$cache = Mage::
|
50 |
$oauth = Mage::helper("troopid_connect/oauth");
|
51 |
$values = $cache->load(self::CACHE_KEY);
|
|
|
52 |
|
53 |
if (is_array($values))
|
54 |
return $values;
|
55 |
|
56 |
$values = $oauth->getAffiliations();
|
57 |
-
$cache->save($values, self::CACHE_KEY, array(self::CACHE_TAG), 60*60);
|
58 |
|
59 |
return $values;
|
60 |
}
|
46 |
}
|
47 |
|
48 |
public function getAffiliations() {
|
49 |
+
$cache = Mage::app()->getCache();
|
50 |
$oauth = Mage::helper("troopid_connect/oauth");
|
51 |
$values = $cache->load(self::CACHE_KEY);
|
52 |
+
$values = unserialize($values);
|
53 |
|
54 |
if (is_array($values))
|
55 |
return $values;
|
56 |
|
57 |
$values = $oauth->getAffiliations();
|
58 |
+
$cache->save(serialize($values), self::CACHE_KEY, array(self::CACHE_TAG), 60*60);
|
59 |
|
60 |
return $values;
|
61 |
}
|
app/code/community/TroopID/Connect/Model/Rule/Condition.php
CHANGED
@@ -64,10 +64,10 @@ class TroopID_Connect_Model_Rule_Condition extends Mage_Rule_Model_Condition_Abs
|
|
64 |
$name = $helper->getAffiliationByScope($scope);
|
65 |
$value = $this->getValue();
|
66 |
|
67 |
-
if ($
|
68 |
return true;
|
69 |
|
70 |
-
if ($
|
71 |
return true;
|
72 |
|
73 |
return false;
|
64 |
$name = $helper->getAffiliationByScope($scope);
|
65 |
$value = $this->getValue();
|
66 |
|
67 |
+
if ($value === $name)
|
68 |
return true;
|
69 |
|
70 |
+
if ($value === ($name . " - " . $group))
|
71 |
return true;
|
72 |
|
73 |
return false;
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>TroopID_Connect</name>
|
4 |
-
<version>1.0.
|
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>ID.me</name><user>idme</user><email>support@id.me</email></author></authors>
|
13 |
-
<date>2013-08-
|
14 |
-
<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="9a86e3eb07bbb654d31166644748a4fb"/></dir></dir></dir><file name="Cart.php" hash="c521e18c2ffeaa45e8a90fe0de3875e5"/></dir><dir name="Helper"><file name="Data.php" hash="
|
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.0.3</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>ID.me</name><user>idme</user><email>support@id.me</email></author></authors>
|
13 |
+
<date>2013-08-26</date>
|
14 |
+
<time>10:07:10</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="9a86e3eb07bbb654d31166644748a4fb"/></dir></dir></dir><file name="Cart.php" hash="c521e18c2ffeaa45e8a90fe0de3875e5"/></dir><dir name="Helper"><file name="Data.php" hash="5b1fc382a97f1910e511427742eb0f38"/><file name="Oauth.php" hash="9089fd8f96397a3c0fa5231b5709b8dd"/></dir><dir name="Model"><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="bcd7c53ccd2637029d98c4e33ccf64f3"/></dir><dir name="etc"><file name="adminhtml.xml" hash="2bba51d29a0e9c444ff401a460a44142"/><file name="config.xml" hash="51917e16d2f556e7e020caf721a59f16"/><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="bed13a8be8e9dfa01cd3ae7db95537e0"/><file name="script.phtml" hash="09ce30b067bd81d04503a1b9a58e16e4"/></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>
|