Juicy_GeoIP - Version 1.2.1

Version Notes

FIXED: Minor bug with the "Current Administrator" testing mode

Download this release

Release Info

Developer Juicy Media
Extension Juicy_GeoIP
Version 1.2.1
Comparing to
See all releases


Code changes from version 1.2.0 to 1.2.1

app/code/local/Juicy/Geoip/Helper/Data.php CHANGED
@@ -1,6 +1,7 @@
1
  <?php
2
 
3
  class Juicy_Geoip_Helper_Data extends Mage_Core_Helper_Abstract {
 
4
  public function isPrivateIp()
5
  {
6
  if($this->getConfig('general/private_bypass')){
@@ -45,10 +46,11 @@ class Juicy_Geoip_Helper_Data extends Mage_Core_Helper_Abstract {
45
  $oldSession = $_SESSION;
46
  session_decode($sessionFile);
47
  $adminSessionData = $_SESSION;
48
- $_SESSION = $oldSession;
49
 
50
- } if(array_key_exists('user', $adminSessionData['admin'])){
51
- $adminUserObj = $adminSessionData['admin']['user'];
 
52
  }
53
  if(isset($adminUserObj)){
54
  return $adminUserObj->getId() && $adminUserObj->getIsActive();
1
  <?php
2
 
3
  class Juicy_Geoip_Helper_Data extends Mage_Core_Helper_Abstract {
4
+
5
  public function isPrivateIp()
6
  {
7
  if($this->getConfig('general/private_bypass')){
46
  $oldSession = $_SESSION;
47
  session_decode($sessionFile);
48
  $adminSessionData = $_SESSION;
49
+ $_SESSION = $oldSession;
50
 
51
+ if(array_key_exists('user', $adminSessionData['admin'])){
52
+ $adminUserObj = $adminSessionData['admin']['user'];
53
+ }
54
  }
55
  if(isset($adminUserObj)){
56
  return $adminUserObj->getId() && $adminUserObj->getIsActive();
app/code/local/Juicy/Geoip/etc/adminhtml.xml CHANGED
@@ -1,10 +1,4 @@
1
  <?xml version="1.0" encoding="UTF-8"?>
2
- <!--
3
- To change this license header, choose License Headers in Project Properties.
4
- To change this template file, choose Tools | Templates
5
- and open the template in the editor.
6
- -->
7
-
8
  <config>
9
  <acl>
10
  <resources>
1
  <?xml version="1.0" encoding="UTF-8"?>
 
 
 
 
 
 
2
  <config>
3
  <acl>
4
  <resources>
app/code/local/Juicy/Geoip/etc/config.xml CHANGED
@@ -4,7 +4,7 @@
4
  <config>
5
  <modules>
6
  <Juicy_Geoip>
7
- <version>1.1.0</version>
8
  </Juicy_Geoip>
9
  </modules>
10
  <global>
4
  <config>
5
  <modules>
6
  <Juicy_Geoip>
7
+ <version>1.2.1</version>
8
  </Juicy_Geoip>
9
  </modules>
10
  <global>
app/code/local/Juicy/Geoip/etc/system.xml CHANGED
@@ -1,11 +1,4 @@
1
  <?xml version="1.0" encoding="UTF-8"?>
2
- <!--
3
- To change this license header, choose License Headers in Project Properties.
4
- To change this template file, choose Tools | Templates
5
- and open the template in the editor.
6
- -->
7
-
8
-
9
  <config>
10
  <tabs>
11
  <juicy translate="label" module="geoip">
@@ -81,17 +74,6 @@ and open the template in the editor.
81
  <show_in_store>0</show_in_store>
82
  <depends><status>1</status></depends>
83
  </switch_currency>
84
- <!--
85
- <switch_locale translate="label">
86
- <label>Allow Locale(Translation) Switching</label>
87
- <frontend_type>select</frontend_type>
88
- <source_model>adminhtml/system_config_source_enabledisable</source_model>
89
- <sort_order>50</sort_order>
90
- <show_in_default>1</show_in_default>
91
- <show_in_website>1</show_in_website>
92
- <show_in_store>0</show_in_store>
93
- </switch_locale>
94
- -->
95
  <switch_store translate="label">
96
  <label>Allow Store Switching</label>
97
  <frontend_type>select</frontend_type>
1
  <?xml version="1.0" encoding="UTF-8"?>
 
 
 
 
 
 
 
2
  <config>
3
  <tabs>
4
  <juicy translate="label" module="geoip">
74
  <show_in_store>0</show_in_store>
75
  <depends><status>1</status></depends>
76
  </switch_currency>
 
 
 
 
 
 
 
 
 
 
 
77
  <switch_store translate="label">
78
  <label>Allow Store Switching</label>
79
  <frontend_type>select</frontend_type>
package.xml CHANGED
@@ -1,20 +1,18 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Juicy_GeoIP</name>
4
- <version>1.2.0</version>
5
  <stability>stable</stability>
6
  <license>GPL</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Change currency using the visitors IP address and the PHP GeoIP module</summary>
10
  <description>Gets the customers current country using PHP's GeoIP module, filters through a list of countries and grabs the associated currency code for Magento</description>
11
- <notes>Added Crawler and Bot detection for SEO purposes. This will disable the module if a crawler is detected. &#xD;
12
- Added multiple testing options, including Admin only, Specific IP and Everyone. &#xD;
13
- Added localhost bypass. Localhost servers are not able to run the GeoIP module correctly, but this will allow you to try.</notes>
14
  <authors><author><name>Jonathan Webb</name><user>JuicyMedia</user><email>jonathan.webb@juicymedia.co.uk</email></author></authors>
15
- <date>2015-04-21</date>
16
- <time>11:27:15</time>
17
- <contents><target name="magelocal"><dir name="Juicy"><dir name="Geoip"><dir name="Block"><file name="Countrydefine.php" hash="0032d7797b0dc464fe0edc99d6a7fe7e"/></dir><dir name="Helper"><file name="Data.php" hash="8546d1ddfd020b49eb1a5cdba2c1677c"/></dir><dir name="Model"><dir name="Adminhtml"><dir name="Source"><file name="TestingMode.php" hash="38e6931166fc53782940e80e1af2257b"/></dir></dir><file name="Geoip.php" hash="839209264d547ecce878609430efc3fd"/><file name="Observer.php" hash="8da0cfe6f653a32498deb1ce2be4c616"/></dir><dir name="etc"><file name="adminhtml.xml" hash="5ac9ab6f0f5b9bb998fa7666dbe54803"/><file name="config.xml" hash="d79f79cd2cb96d11c27d97e52be61916"/><file name="system.xml" hash="670761821f542c713b116dd8aa20bee5"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Juicy_Geoip.xml" hash="c4ebc7b11208b6c6b6020cb581ba9b12"/></dir></target><target name="magelib"><dir name="Juicy"><dir name="Geoip"><dir name="Data"><file name="geoip.dat" hash="76476935f1cfea10145cf52d3798f801"/></dir><file name="geoip.inc" hash="09b0a2dd03361a2cb00ef5ec68b4edea"/></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="juicy"><dir name="geoip"><dir name="system"><dir name="config"><dir name="form"><dir name="field"><file name="array.phtml" hash="6335d9d4d1ce8a63793a1dede6061010"/></dir></dir></dir></dir></dir></dir></dir></dir></dir></dir></target></contents>
18
  <compatible/>
19
  <dependencies><required><php><min>5.0.0</min><max>6.0.0</max></php></required></dependencies>
20
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Juicy_GeoIP</name>
4
+ <version>1.2.1</version>
5
  <stability>stable</stability>
6
  <license>GPL</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Change currency using the visitors IP address and the PHP GeoIP module</summary>
10
  <description>Gets the customers current country using PHP's GeoIP module, filters through a list of countries and grabs the associated currency code for Magento</description>
11
+ <notes>FIXED: Minor bug with the "Current Administrator" testing mode</notes>
 
 
12
  <authors><author><name>Jonathan Webb</name><user>JuicyMedia</user><email>jonathan.webb@juicymedia.co.uk</email></author></authors>
13
+ <date>2015-04-27</date>
14
+ <time>07:47:03</time>
15
+ <contents><target name="magelocal"><dir name="Juicy"><dir name="Geoip"><dir name="Block"><file name="Countrydefine.php" hash="0032d7797b0dc464fe0edc99d6a7fe7e"/></dir><dir name="Helper"><file name="Data.php" hash="9882f9b97a39dfa24e5c4308ccb64e4f"/></dir><dir name="Model"><dir name="Adminhtml"><dir name="Source"><file name="TestingMode.php" hash="38e6931166fc53782940e80e1af2257b"/></dir></dir><file name="Geoip.php" hash="839209264d547ecce878609430efc3fd"/><file name="Observer.php" hash="8da0cfe6f653a32498deb1ce2be4c616"/></dir><dir name="etc"><file name="adminhtml.xml" hash="91b7ec025a4c78cfec3ccabbad065ecb"/><file name="config.xml" hash="f259a8d24dc9aaf7ee23943f4ecf26dc"/><file name="system.xml" hash="fa8ad2819935e9ad08a901d334ea8537"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Juicy_Geoip.xml" hash="c4ebc7b11208b6c6b6020cb581ba9b12"/></dir></target><target name="magelib"><dir name="Juicy"><dir name="Geoip"><dir name="Data"><file name="geoip.dat" hash="76476935f1cfea10145cf52d3798f801"/></dir><file name="geoip.inc" hash="09b0a2dd03361a2cb00ef5ec68b4edea"/></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="juicy"><dir name="geoip"><dir name="system"><dir name="config"><dir name="form"><dir name="field"><file name="array.phtml" hash="6335d9d4d1ce8a63793a1dede6061010"/></dir></dir></dir></dir></dir></dir></dir></dir></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.0.0</min><max>6.0.0</max></php></required></dependencies>
18
  </package>