Chapagain_AutoCurrency - Version 0.1.4

Version Notes

Fixed Issue: Showing nearest currency in the list instead of showing base currency when visitor's currency is not enabled. Now, visitor's base currency is displayed in this case.

Download this release

Release Info

Developer Magento Core Team
Extension Chapagain_AutoCurrency
Version 0.1.4
Comparing to
See all releases


Code changes from version 0.1.2 to 0.1.4

app/code/community/Chapagain/AutoCurrency/Model/Store.php CHANGED
@@ -49,6 +49,13 @@ class Chapagain_AutoCurrency_Model_Store extends Mage_Core_Model_Store
49
  // close the geo database
50
  geoip_close($geoIp);
51
 
 
 
 
 
 
 
 
52
  return $currencyCode;
53
  }
54
  }
49
  // close the geo database
50
  geoip_close($geoIp);
51
 
52
+ // if currencyCode is not present in allowedCurrencies
53
+ // then return the default currency code
54
+ $allowedCurrencies = Mage::getModel('directory/currency')->getConfigAllowCurrencies();
55
+ if(!in_array($currencyCode, $allowedCurrencies)) {
56
+ return $result;
57
+ }
58
+
59
  return $currencyCode;
60
  }
61
  }
app/code/community/Chapagain/AutoCurrency/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <Chapagain_AutoCurrency>
5
- <version>0.1.2</version>
6
  </Chapagain_AutoCurrency>
7
  </modules>
8
  <global>
2
  <config>
3
  <modules>
4
  <Chapagain_AutoCurrency>
5
+ <version>0.1.4</version>
6
  </Chapagain_AutoCurrency>
7
  </modules>
8
  <global>
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Chapagain_AutoCurrency</name>
4
- <version>0.1.2</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
  <channel>community</channel>
@@ -18,11 +18,11 @@ Features:-&#xD;
18
  Easy to install and use&#xD;
19
  100% Free&#xD;
20
  100% Open Source</description>
21
- <notes>Fixed Bug: Showing Fatal error: Cannot redeclare geoip_load_shared_mem()</notes>
22
  <authors><author><name>Mukesh Chapagain</name><user>auto-converted</user><email>mukesh.chapagain@gmail.com</email></author></authors>
23
- <date>2011-05-15</date>
24
- <time>14:47:26</time>
25
- <contents><target name="magecommunity"><dir name="Chapagain"><dir name="AutoCurrency"><dir name="Helper"><file name="Data.php" hash="657392d567588d02cff9a00e884e8b1e"/></dir><dir name="Model"><file name="Store.php" hash="8a048e19fb94355e0bfc52e8c09e77d0"/></dir><dir name="etc"><file name="config.xml" hash="c97af314950b7fb81b749249c8596538"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Chapagain_AutoCurrency.xml" hash="dd65769f686b4c12011f5d09e18249ff"/></dir></target><target name="mage"><dir name="var"><dir name="geoip"><file name="GeoIP.dat" hash="4744053b2eb4264db3b345f40b0bfa9f"/><file name="geoip.inc" hash="e8a6c661ddcb38bf80471939391cab6d"/></dir></dir></target></contents>
26
  <compatible/>
27
  <dependencies/>
28
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Chapagain_AutoCurrency</name>
4
+ <version>0.1.4</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
  <channel>community</channel>
18
  Easy to install and use&#xD;
19
  100% Free&#xD;
20
  100% Open Source</description>
21
+ <notes>Fixed Issue: Showing nearest currency in the list instead of showing base currency when visitor's currency is not enabled. Now, visitor's base currency is displayed in this case.</notes>
22
  <authors><author><name>Mukesh Chapagain</name><user>auto-converted</user><email>mukesh.chapagain@gmail.com</email></author></authors>
23
+ <date>2011-06-13</date>
24
+ <time>07:14:07</time>
25
+ <contents><target name="magecommunity"><dir name="Chapagain"><dir name="AutoCurrency"><dir name="Helper"><file name="Data.php" hash="657392d567588d02cff9a00e884e8b1e"/></dir><dir name="Model"><file name="Store.php" hash="36deac5b59fcbebfc92519348cab50ae"/></dir><dir name="etc"><file name="config.xml" hash="acae11c684aff47adde8b38a8c6250de"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Chapagain_AutoCurrency.xml" hash="dd65769f686b4c12011f5d09e18249ff"/></dir></target><target name="mage"><dir name="var"><dir name="geoip"><file name="GeoIP.dat" hash="4744053b2eb4264db3b345f40b0bfa9f"/><file name="geoip.inc" hash="e8a6c661ddcb38bf80471939391cab6d"/></dir></dir></target></contents>
26
  <compatible/>
27
  <dependencies/>
28
  </package>