Version Notes
Clear ID.me affiliation related info when cart i cleared.
Download this release
Release Info
Developer | ID.me |
Extension | TroopID_Connect |
Version | 1.1.0 |
Comparing to | |
See all releases |
Code changes from version 1.0.4 to 1.1.0
app/code/community/TroopID/Connect/Helper/Data.php
CHANGED
@@ -55,7 +55,7 @@ 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);
|
59 |
|
60 |
return $values;
|
61 |
}
|
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 |
}
|
app/code/community/TroopID/Connect/Model/Cart/Observer.php
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class TroopID_Connect_Model_Cart_Observer {
|
3 |
+
|
4 |
+
public function clearAffiliation(Varien_Event_Observer $observer) {
|
5 |
+
|
6 |
+
if (!Mage::helper("troopid_connect")->isOperational())
|
7 |
+
return;
|
8 |
+
|
9 |
+
$cart = $observer->getEvent()->getCart();
|
10 |
+
$value = $cart->getQuote()->getTroopidUid();
|
11 |
+
|
12 |
+
if (isset($value) && $cart->getItemsCount() == 0) {
|
13 |
+
$cart->getQuote()->setTroopidUid(NULL);
|
14 |
+
$cart->getQuote()->setTroopidScope(NULL);
|
15 |
+
$cart->getQuote()->setTroopidAffiliation(NULL);
|
16 |
+
$cart->getQuote()->save();
|
17 |
+
}
|
18 |
+
}
|
19 |
+
|
20 |
+
}
|
app/code/community/TroopID/Connect/etc/config.xml
CHANGED
@@ -24,6 +24,17 @@
|
|
24 |
</troopid_connect>
|
25 |
</updates>
|
26 |
</layout>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
</frontend>
|
28 |
|
29 |
<adminhtml>
|
24 |
</troopid_connect>
|
25 |
</updates>
|
26 |
</layout>
|
27 |
+
|
28 |
+
<events>
|
29 |
+
<checkout_cart_save_before>
|
30 |
+
<observers>
|
31 |
+
<clear_troopid_affiliation>
|
32 |
+
<class>troopid_connect/cart_observer</class>
|
33 |
+
<method>clearAffiliation</method>
|
34 |
+
</clear_troopid_affiliation>
|
35 |
+
</observers>
|
36 |
+
</checkout_cart_save_before>
|
37 |
+
</events>
|
38 |
</frontend>
|
39 |
|
40 |
<adminhtml>
|
package.xml
CHANGED
@@ -1,18 +1,18 @@
|
|
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>
|
8 |
<extends/>
|
9 |
<summary>TroopID Connect integration.</summary>
|
10 |
<description>N/A</description>
|
11 |
-
<notes>
|
12 |
<authors><author><name>ID.me</name><user>idme</user><email>support@id.me</email></author></authors>
|
13 |
-
<date>2013-
|
14 |
-
<time>13:
|
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="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.1.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>Clear ID.me affiliation related info when cart i cleared.</notes>
|
12 |
<authors><author><name>ID.me</name><user>idme</user><email>support@id.me</email></author></authors>
|
13 |
+
<date>2013-10-16</date>
|
14 |
+
<time>13:56:15</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="c521e18c2ffeaa45e8a90fe0de3875e5"/></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="1c3243fb721e0e1a689686831011b5f3"/></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="bcd7c53ccd2637029d98c4e33ccf64f3"/></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="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>
|