Multibyte_VATFix - Version 1.0.0

Version Notes

nothing special

Download this release

Release Info

Developer Roman Hutterer
Extension Multibyte_VATFix
Version 1.0.0
Comparing to
See all releases


Version 1.0.0

app/code/local/Multibyte/VATFix/Helper/Data.php ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * @category Multibyte
5
+ * @package Multibyte_VatFix
6
+ * @author Roman Hutterer <info@multibyte.at>
7
+ */
8
+ class Multiybte_VATFix_Helper_Data extends Mage_Customer_Helper_Data {
9
+
10
+ const VAT_VALIDATION_WSDL_URL = 'http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl';
11
+
12
+ /**
13
+ * override the checkVatNumber from CustomerHelper
14
+ * @param string $countryCode
15
+ * @param string $vatNumber
16
+ * @param string $requesterCountryCode
17
+ * @param string $requesterVatNumber
18
+ * @return boolean
19
+ */
20
+ public function checkVatNumber($countryCode, $vatNumber, $requesterCountryCode = '', $requesterVatNumber = '') {
21
+ //@RHU take the VAT without the first two signs (which are the countrycode
22
+ $vatNumber = substr(str_replace(' ', '', trim($vatNumber)), 2);
23
+ return parent::checkVatNumber($countryCode, $vatNumber, $requesterCountryCode, $requesterVatNumber);
24
+ }
25
+
26
+ }
app/code/local/Multibyte/VATFix/etc/config.xml ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+
3
+ <config>
4
+
5
+ <modules>
6
+ <Multiybte_VATFix>
7
+ <version>0.4.1</version>
8
+ </Multiybte_VATFix>
9
+ </modules>
10
+ <global>
11
+ <helpers>
12
+ <customer>
13
+ <rewrite>
14
+ <data>Multiybte_VATFix_Helper_Data</data>
15
+ </rewrite>
16
+ </customer>
17
+ </helpers>
18
+ </global>
19
+ </config>
package.xml ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>Multibyte_VATFix</name>
4
+ <version>1.0.0</version>
5
+ <stability>stable</stability>
6
+ <license>GPL</license>
7
+ <channel>community</channel>
8
+ <extends/>
9
+ <summary>The VatFix extension for magento fixes the broken VAT check in Magento for European Companies.&#xD;
10
+ </summary>
11
+ <description>The VatFix extension for magento fixes the broken VAT check in Magento for European Companies which want to use the built-in feature of Customergroups based on valid VAT-number in Magento.&#xD;
12
+ &#xD;
13
+ With this extension the ability to change a Customers Usergroup bases on a valid VAT number is possible.</description>
14
+ <notes>nothing special</notes>
15
+ <authors><author><name>Roman Hutterer</name><user>roman204</user><email>info@multibyte.at</email></author></authors>
16
+ <date>2013-07-13</date>
17
+ <time>12:16:15</time>
18
+ <contents><target name="magelocal"><dir name="Multibyte"><dir name="VATFix"><dir name="Helper"><file name="Data.php" hash="f4345e4bafd2ceda1a64576561eb84b2"/></dir><dir name="etc"><file name="config.xml" hash="44f5bf8ad74914d95266b00410c639b4"/></dir></dir></dir></target></contents>
19
+ <compatible/>
20
+ <dependencies><required><php><min>5.1.0</min><max>5.4.0</max></php></required></dependencies>
21
+ </package>