Zagzig_Integration - Version 1.1.0

Version Notes

Improvements to SSL compatibility and session management.

Download this release

Release Info

Developer Magento Core Team
Extension Zagzig_Integration
Version 1.1.0
Comparing to
See all releases


Code changes from version 1.0.2 to 1.1.0

app/code/local/Zagzig/Integration/Core/ZagzigRepository.php CHANGED
@@ -3,27 +3,27 @@
3
  class ZagzigRepository
4
  {
5
  public static function setReferralId($referralId) {
6
- Mage::getSingleton('core/session')->setReferralId($referralId);
7
  }
8
 
9
  public static function getReferralId() {
10
- return Mage::getSingleton('core/session')->getReferralId();
11
  }
12
 
13
  public static function clearReferralId() {
14
- return Mage::getSingleton('core/session')->unsReferralId();
15
  }
16
 
17
  public static function setDiscountCode($discountCode) {
18
- Mage::getSingleton('core/session')->setDiscountCode($discountCode);
19
  }
20
 
21
  public static function getDiscountCode() {
22
- return Mage::getSingleton('core/session')->getDiscountCode();
23
  }
24
 
25
  public static function clearDiscountCode() {
26
- return Mage::getSingleton('core/session')->unsDiscountCode();
27
  }
28
 
29
  public static function getUsername() {
@@ -41,6 +41,18 @@ class ZagzigRepository
41
  //return "http://zagzigwebapi/api/Referral/Confirm";
42
  }
43
 
 
 
 
 
 
 
 
 
 
 
 
 
44
  }
45
 
46
  ?>
3
  class ZagzigRepository
4
  {
5
  public static function setReferralId($referralId) {
6
+ ZagzigRepository::set_value('zagzig_referral_id', $referralId);
7
  }
8
 
9
  public static function getReferralId() {
10
+ return ZagzigRepository::get_value('zagzig_referral_id');
11
  }
12
 
13
  public static function clearReferralId() {
14
+ ZagzigRepository::set_value('zagzig_referral_id', null);
15
  }
16
 
17
  public static function setDiscountCode($discountCode) {
18
+ ZagzigRepository::set_value('zagzig_discount_code', $discountCode);
19
  }
20
 
21
  public static function getDiscountCode() {
22
+ return ZagzigRepository::get_value('zagzig_discount_code');
23
  }
24
 
25
  public static function clearDiscountCode() {
26
+ ZagzigRepository::set_value('zagzig_discount_code', null);
27
  }
28
 
29
  public static function getUsername() {
41
  //return "http://zagzigwebapi/api/Referral/Confirm";
42
  }
43
 
44
+ private static function get_value($key) {
45
+ return $_COOKIE[$key];
46
+ }
47
+
48
+ private static function set_value($key, $value) {
49
+ if ($value) {
50
+ setcookie($key, $value, 0, '/');
51
+ } else {
52
+ setcookie($key, '', time()-3600, '/');
53
+ }
54
+ }
55
+
56
  }
57
 
58
  ?>
app/code/local/Zagzig/Integration/Model/CartObserver.php CHANGED
@@ -19,4 +19,4 @@ class Zagzig_Integration_Model_CartObserver
19
  }
20
  }
21
 
22
- ?>
19
  }
20
  }
21
 
22
+ ?>
package.xml CHANGED
@@ -1,18 +1,18 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Zagzig_Integration</name>
4
- <version>1.0.2</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/GPL-3.0">GPL v3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Zagzig integration extension for Magento.</summary>
10
  <description>Zagzig Integration allows Magento users to automatically update their Zagzig Partner Portal with sales information so that no leads needs to be updated manually.</description>
11
- <notes>added missing files</notes>
12
  <authors><author><name>Pawel Burzynski</name><user>auto-converted</user><email>pawelburzynski@moneydebtandcredit.com</email></author></authors>
13
- <date>2014-07-21</date>
14
- <time>14:27:33</time>
15
- <contents><target name="magelocal"><dir name="Zagzig"><dir name="Integration"><dir name="etc"><file name="config.xml" hash="432ee4e297a257582f248c921bc4df77"/><file name="system.xml" hash="0e9535d99b35325c5babfa8a83a4439b"/></dir><dir name="Core"><file name="ZagzigRepository.php" hash="fe55459050c3196e618fbf6367f83889"/></dir><dir name="Model"><file name="CartObserver.php" hash="fb0d87896a40cbea1c97eb39921a9bfb"/><file name="SalesObserver.php" hash="4c61e8fea8efaefe93e4b8eb4d1ded28"/></dir><dir name="controllers"><file name="IndexController.php" hash="e5e5568986b18f5036a35f0c3cfe02ed"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Zagzig_Integration.xml" hash="3b5e26fa50c9abb7034512e866ed47f6"/></dir></target></contents>
16
  <compatible/>
17
  <dependencies/>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Zagzig_Integration</name>
4
+ <version>1.1.0</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/GPL-3.0">GPL v3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Zagzig integration extension for Magento.</summary>
10
  <description>Zagzig Integration allows Magento users to automatically update their Zagzig Partner Portal with sales information so that no leads needs to be updated manually.</description>
11
+ <notes>Improvements to SSL compatibility and session management.</notes>
12
  <authors><author><name>Pawel Burzynski</name><user>auto-converted</user><email>pawelburzynski@moneydebtandcredit.com</email></author></authors>
13
+ <date>2014-09-04</date>
14
+ <time>13:54:35</time>
15
+ <contents><target name="magelocal"><dir name="Zagzig"><dir name="Integration"><dir name="etc"><file name="config.xml" hash="432ee4e297a257582f248c921bc4df77"/><file name="system.xml" hash="0e9535d99b35325c5babfa8a83a4439b"/></dir><dir name="Core"><file name="ZagzigRepository.php" hash="5a5911013c330104caf18513a85e57a5"/></dir><dir name="Model"><file name="CartObserver.php" hash="ebb646af6d7e3e7f63643010b9dba2e8"/><file name="SalesObserver.php" hash="4c61e8fea8efaefe93e4b8eb4d1ded28"/></dir><dir name="controllers"><file name="IndexController.php" hash="e5e5568986b18f5036a35f0c3cfe02ed"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Zagzig_Integration.xml" hash="3b5e26fa50c9abb7034512e866ed47f6"/></dir></target></contents>
16
  <compatible/>
17
  <dependencies/>
18
  </package>