Chapagain_AutoCurrency - Version 0.1.7

Version Notes

Fixed issue of module not working for some countries. Updated geoip.inc file.

Download this release

Release Info

Developer Mukesh Chapagain
Extension Chapagain_AutoCurrency
Version 0.1.7
Comparing to
See all releases


Code changes from version 0.1.6 to 0.1.7

app/code/community/Chapagain/AutoCurrency/Helper/Data.php CHANGED
@@ -33,8 +33,7 @@ class Chapagain_AutoCurrency_Helper_Data extends Mage_Core_Helper_Abstract
33
  * @return string
34
  */
35
  public function getIpAddress()
36
- {
37
- //return "124.41.230.51";
38
  return $_SERVER['REMOTE_ADDR'];
39
  }
40
  }
33
  * @return string
34
  */
35
  public function getIpAddress()
36
+ {
 
37
  return $_SERVER['REMOTE_ADDR'];
38
  }
39
  }
app/code/community/Chapagain/AutoCurrency/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <Chapagain_AutoCurrency>
5
- <version>0.1.6</version>
6
  </Chapagain_AutoCurrency>
7
  </modules>
8
  <global>
2
  <config>
3
  <modules>
4
  <Chapagain_AutoCurrency>
5
+ <version>0.1.7</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.6</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>Updated with latest version of GeoIP.dat</notes>
22
  <authors><author><name>Mukesh Chapagain</name><user>chapagain</user><email>mukesh.chapagain@gmail.com</email></author></authors>
23
- <date>2012-09-24</date>
24
- <time>07:45:34</time>
25
- <contents><target name="magecommunity"><dir name="Chapagain"><dir name="AutoCurrency"><dir name="Helper"><file name="Data.php" hash="63e33740dc53723ac4e8b1a5a20c34b8"/></dir><dir name="Model"><file name="Store.php" hash="36deac5b59fcbebfc92519348cab50ae"/></dir><dir name="etc"><file name="config.xml" hash="0c65b87b6571e179c76f7f522c868fd3"/></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="9533bdd7c9705ad2bec16dba59ce092f"/><file name="geoip.inc" hash="e8a6c661ddcb38bf80471939391cab6d"/></dir></dir></target></contents>
26
  <compatible/>
27
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
28
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Chapagain_AutoCurrency</name>
4
+ <version>0.1.7</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 of module not working for some countries. Updated geoip.inc file.</notes>
22
  <authors><author><name>Mukesh Chapagain</name><user>chapagain</user><email>mukesh.chapagain@gmail.com</email></author></authors>
23
+ <date>2013-10-20</date>
24
+ <time>08:41:20</time>
25
+ <contents><target name="magecommunity"><dir name="Chapagain"><dir name="AutoCurrency"><dir name="Helper"><file name="Data.php" hash="6649b9ad502d88f9755d35df1a7ea0ee"/></dir><dir name="Model"><file name="Store.php" hash="36deac5b59fcbebfc92519348cab50ae"/></dir><dir name="etc"><file name="config.xml" hash="e0699238986f2a1d8bd666020bed5488"/></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="9533bdd7c9705ad2bec16dba59ce092f"/><file name="geoip.inc" hash="f2e497053c5d7dbd39431d14a87b2b27"/></dir></dir></target></contents>
26
  <compatible/>
27
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
28
  </package>
var/geoip/geoip.inc CHANGED
@@ -116,6 +116,52 @@ class GeoIP {
116
  * Added for Chapagain_AutoCurrency Magento Module
117
  */
118
  var $GEOIP_COUNTRY_CODE_TO_CURRENCY = array(
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
119
  "EU" => "EUR", "AD" => "EUR", "AE" => "AED", "AF" => "AFN",
120
  "AG" => "XCD", "AI" => "XCD", "AL" => "ALL", "AM" => "AMD", "AN" => "ANG", "AO" => "AOK",
121
  "AR" => "ARP", "AS" => "EUR", "AT" => "EUR", "AU" => "AUD", "AW" => "ANG",
@@ -608,4 +654,4 @@ function getdnsattributes ($l,$ip){
608
  return $str;
609
  }
610
 
611
- ?>
116
  * Added for Chapagain_AutoCurrency Magento Module
117
  */
118
  var $GEOIP_COUNTRY_CODE_TO_CURRENCY = array(
119
+ "EU" => "EUR", "AD" => "EUR", "AE" => "AED", "AF" => "AFN", "AG" => "XCD", "AI" => "XCD",
120
+ "AL" => "ALL", "AM" => "AMD", "AN" => "ANG", "AO" => "AOA", "AR" => "ARS", "AS" => "EUR",
121
+ "AT" => "EUR", "AU" => "AUD", "AW" => "AWG", "AZ" => "AZN", "BA" => "BAM", "BB" => "BBD",
122
+ "BD" => "BDT", "BE" => "EUR", "BF" => "XOF", "BG" => "BGL", "BH" => "BHD", "BI" => "BIF",
123
+ "BJ" => "XOF", "BM" => "BMD", "BN" => "BND", "BO" => "BOB", "BR" => "BRL", "BS" => "BSD",
124
+ "BT" => "BTN", "BV" => "NOK", "BW" => "BWP", "BY" => "BYR", "BZ" => "BZD", "CA" => "CAD",
125
+ "CC" => "AUD", "CD" => "CDF", "CF" => "XAF", "CG" => "XAF", "CH" => "CHF", "CI" => "XOF",
126
+ "CK" => "NZD", "CL" => "CLP", "CM" => "XAF", "CN" => "CNY", "CO" => "COP", "CR" => "CRC",
127
+ "CU" => "CUP", "CV" => "CVE", "CX" => "AUD", "CY" => "EUR", "CZ" => "CZK", "DE" => "EUR",
128
+ "DJ" => "DJF", "DK" => "DKK", "DM" => "XCD", "DO" => "DOP", "DZ" => "DZD", "EC" => "ECS",
129
+ "EE" => "EEK", "EG" => "EGP", "EH" => "MAD", "ER" => "ETB", "ES" => "EUR", "ET" => "ETB",
130
+ "FI" => "EUR", "FJ" => "FJD", "FK" => "FKP", "FM" => "USD", "FO" => "DKK", "FR" => "EUR",
131
+ "GA" => "XAF", "GB" => "GBP", "GD" => "XCD", "GE" => "GEL", "GF" => "EUR", "GH" => "GHS",
132
+ "GI" => "GIP", "GL" => "DKK", "GM" => "GMD", "GN" => "GNF", "GP" => "EUR", "GQ" => "XAF",
133
+ "GR" => "EUR", "GS" => "GBP", "GT" => "GTQ", "GU" => "USD", "GW" => "XOF", "GY" => "GYD",
134
+ "HK" => "HKD", "HM" => "AUD", "HN" => "HNL", "HR" => "HRK", "HT" => "HTG", "HU" => "HUF",
135
+ "ID" => "IDR", "IE" => "EUR", "IL" => "ILS", "IN" => "INR", "IO" => "USD", "IQ" => "IQD",
136
+ "IR" => "IRR", "IS" => "ISK", "IT" => "EUR", "JM" => "JMD", "JO" => "JOD", "JP" => "JPY",
137
+ "KE" => "KES", "KG" => "KGS", "KH" => "KHR", "KI" => "AUD", "KM" => "KMF", "KN" => "XCD",
138
+ "KP" => "KPW", "KR" => "KRW", "KW" => "KWD", "KY" => "KYD", "KZ" => "KZT", "LA" => "LAK",
139
+ "LB" => "LBP", "LC" => "XCD", "LI" => "CHF", "LK" => "LKR", "LR" => "LRD", "LS" => "LSL",
140
+ "LT" => "LTL", "LU" => "EUR", "LV" => "LVL", "LY" => "LYD", "MA" => "MAD", "MC" => "EUR",
141
+ "MD" => "MDL", "MG" => "MGF", "MH" => "USD", "MK" => "MKD", "ML" => "XOF", "MM" => "MMK",
142
+ "MN" => "MNT", "MO" => "MOP", "MP" => "USD", "MQ" => "EUR", "MR" => "MRO", "MS" => "XCD",
143
+ "MT" => "EUR", "MU" => "MUR", "MV" => "MVR", "MW" => "MWK", "MX" => "MXN", "MY" => "MYR",
144
+ "MZ" => "MZN", "NA" => "NAD", "NC" => "XPF", "NE" => "XOF", "NF" => "AUD", "NG" => "NGN",
145
+ "NI" => "NIO", "NL" => "EUR", "NO" => "NOK", "NP" => "NPR", "NR" => "AUD", "NU" => "NZD",
146
+ "NZ" => "NZD", "OM" => "OMR", "PA" => "PAB", "PE" => "PEN", "PF" => "XPF", "PG" => "PGK",
147
+ "PH" => "PHP", "PK" => "PKR", "PL" => "PLN", "PN" => "NZD", "PR" => "USD", "PT" => "EUR",
148
+ "PW" => "USD", "PY" => "PYG", "QA" => "QAR", "RE" => "EUR", "RO" => "RON", "RU" => "RUB",
149
+ "RW" => "RWF", "SA" => "SAR", "SB" => "SBD", "SC" => "SCR", "SD" => "SDD", "SE" => "SEK",
150
+ "SG" => "SGD", "SH" => "SHP", "SI" => "EUR", "SJ" => "NOK", "SK" => "SKK", "SL" => "SLL",
151
+ "SM" => "EUR", "SN" => "XOF", "SO" => "SOS", "SR" => "SRG", "ST" => "STD", "SV" => "SVC",
152
+ "SY" => "SYP", "SZ" => "SZL", "TC" => "USD", "TD" => "XAF", "TF" => "EUR", "TG" => "XOF",
153
+ "TH" => "THB", "TJ" => "TJS", "TK" => "NZD", "TM" => "TMM", "TN" => "TND", "TO" => "TOP",
154
+ "TR" => "TRY", "TT" => "TTD", "TV" => "AUD", "TW" => "TWD", "TZ" => "TZS", "UA" => "UAH",
155
+ "UG" => "UGX", "UM" => "USD", "US" => "USD", "UY" => "UYU", "UZ" => "UZS", "VA" => "EUR",
156
+ "VC" => "XCD", "VE" => "VEF", "VG" => "USD", "VI" => "USD", "VN" => "VND", "VU" => "VUV",
157
+ "WF" => "XPF", "WS" => "EUR", "YE" => "YER", "YT" => "EUR", "ZA" => "ZAR", "ZM" => "ZMK", "ZW" => "ZWD"
158
+ );
159
+
160
+ /**
161
+ * Chapagain_Autocurrency
162
+ * Some currency codes were old/outdated
163
+ */
164
+ var $GEOIP_COUNTRY_CODE_TO_CURRENCY_OLD = array(
165
  "EU" => "EUR", "AD" => "EUR", "AE" => "AED", "AF" => "AFN",
166
  "AG" => "XCD", "AI" => "XCD", "AL" => "ALL", "AM" => "AMD", "AN" => "ANG", "AO" => "AOK",
167
  "AR" => "ARP", "AS" => "EUR", "AT" => "EUR", "AU" => "AUD", "AW" => "ANG",
654
  return $str;
655
  }
656
 
657
+ ?>