ColiPoste_La_Poste_So_Colissimo - Version 2.3.4

Version Notes

Compatibilité Community 1.9

Download this release

Release Info

Developer Berlioz
Extension ColiPoste_La_Poste_So_Colissimo
Version 2.3.4
Comparing to
See all releases


Code changes from version 2.3.3 to 2.3.4

app/code/community/LaPoste/SoColissimoSimplicite/Helper/Data.php CHANGED
@@ -157,13 +157,21 @@ class LaPoste_SoColissimoSimplicite_Helper_Data extends Mage_Core_Helper_Abstrac
157
  $phone = $shippingAddress->getTelephone();
158
  $isValid = true;
159
 
 
 
 
160
  switch ($country) {
161
  case 'FR':
 
 
 
 
162
  $firstTwoNumbers = substr($phone, 0, 2);
163
  $isValid = $firstTwoNumbers === '06' || $firstTwoNumbers === '07';
164
  break;
165
 
166
  case 'BE':
 
167
  $firstFourNumbers = substr($phone, 0, 4);
168
  $isValid = $firstFourNumbers === '+324';
169
  break;
157
  $phone = $shippingAddress->getTelephone();
158
  $isValid = true;
159
 
160
+ // Supression des caractères non numériques (sauf +)
161
+ $phone = preg_replace('/[^0-9+]/', '', $phone);
162
+
163
  switch ($country) {
164
  case 'FR':
165
+ // Remplacer +33 par 0
166
+ $phone = str_replace('+33', '0', $phone);
167
+
168
+ // Le numéro est valide s'il commence par 06 ou 07
169
  $firstTwoNumbers = substr($phone, 0, 2);
170
  $isValid = $firstTwoNumbers === '06' || $firstTwoNumbers === '07';
171
  break;
172
 
173
  case 'BE':
174
+ // Le numéro est valide s'il commence par +324
175
  $firstFourNumbers = substr($phone, 0, 4);
176
  $isValid = $firstFourNumbers === '+324';
177
  break;
app/code/community/LaPoste/SoColissimoSimplicite/etc/config.xml CHANGED
@@ -13,7 +13,7 @@
13
  <config>
14
  <modules>
15
  <LaPoste_SoColissimoSimplicite>
16
- <version>2.3.3</version>
17
  </LaPoste_SoColissimoSimplicite>
18
  </modules>
19
 
13
  <config>
14
  <modules>
15
  <LaPoste_SoColissimoSimplicite>
16
+ <version>2.3.4</version>
17
  </LaPoste_SoColissimoSimplicite>
18
  </modules>
19
 
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>ColiPoste_La_Poste_So_Colissimo</name>
4
- <version>2.3.3</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>
@@ -25,9 +25,9 @@ Test&#xE9; et valid&#xE9; sur Magento :&#xD;
25
  R&#xE9;alisation par Smile.</description>
26
  <notes>Compatibilit&#xE9; Community 1.9</notes>
27
  <authors><author><name>Berlioz</name><user>Aline</user><email>Aline.BERLIOZ@laposte.fr</email></author></authors>
28
- <date>2014-09-29</date>
29
- <time>13:48:33</time>
30
- <contents><target name="magedesign"><dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="socolissimosimplicite"><file name="empty.phtml" hash="5726ba2edea823965827685b3bdc3d95"/><dir name="form"><file name="failure.phtml" hash="259bc094879a81cc06b0672c31f2df1b"/></dir><file name="form.phtml" hash="f46decffe3510c59688c5925617e4d1c"/><file name="iframe.phtml" hash="48aabfc24e2cbe6845da1169c6576c10"/><dir name="onepage"><dir name="shipping_method"><file name="socolissimosimplicite.phtml" hash="c0ce496d1dc9369fb06db452aedd2167"/></dir></dir></dir></dir><dir name="layout"><file name="socolissimosimplicite.xml" hash="7cbeeb8095261ca622174d7ed447589f"/></dir></dir></dir></dir></dir></target><target name="magelocale"><dir><dir name="fr_FR"><file name="LaPoste_SoColissimoSimplicite.csv" hash="c70f610f8160ec6415d10bc18ff0ab41"/></dir></dir></target><target name="magecommunity"><dir><dir name="LaPoste"><dir name="SoColissimoSimplicite"><dir name="Block"><file name="Form.php" hash="df4d1dfbd6f8fbb6088b505b285ed7fa"/><file name="Iframe.php" hash="518d7af1a92e9feae96ac2982204dfd1"/><file name="Onepage.php" hash="81d36d830a778e83c0a8f22f3b90ee56"/></dir><dir name="Helper"><file name="Data.php" hash="21dfcfd401fee817010fbf012f38d7a9"/></dir><dir name="Model"><dir name="Carrier"><file name="ShippingMethod.php" hash="1679042ae9465ab6877752860a7c7cc7"/></dir><dir name="Mysql4"><dir name="Transaction"><file name="Collection.php" hash="af31dc43455baed304eb087a1f5a022b"/></dir><file name="Transaction.php" hash="8cf12de5f6a6a50cf69e42e6da77d2f9"/></dir><file name="Observer.php" hash="1fdd106d6ddd0554466701b18a35b7f0"/><dir name="System"><dir name="Config"><dir name="Source"><dir name="Shipping"><file name="Amountbasetype.php" hash="210a1f9bd6c9daac92fb213d3b4d662b"/></dir></dir></dir></dir><file name="Transaction.php" hash="023d0f47d98584520dad99f2b06ed681"/></dir><dir name="controllers"><file name="FormController.php" hash="f4d0c4574c1ad127f680b38286d1bbcb"/></dir><dir name="etc"><file name="config.xml" hash="7fb24193be6ee19ff8d88071ddb0f94b"/><file name="system.xml" hash="be505597ba2f1ddb7ad4a8623619aa74"/></dir><dir name="sql"><dir name="socolissimosimplicite_setup"><file name="mysql4-install-1.0.0.php" hash="39d84d2cee2d8c2c0633c17891e045aa"/><file name="mysql4-uninstall-0.1.0.php" hash="471abbb64f1a962e8cc09d7bf48fe46c"/><file name="mysql4-upgrade-1.0.6-1.0.7.php" hash="03712141361b873740de91b7d0f721f0"/><file name="mysql4-upgrade-1.1.1-2.0.0.php" hash="bd7915ab8d3871491e496f33617d3754"/><file name="mysql4-upgrade-2.2.1-2.3.0.php" hash="c578ca0c71a7a6d53dbfd3daff5e594e"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir><dir name="modules"><file name="LaPoste_SoColissimoSimplicite.xml" hash="c7097370b5cc0e66fc2127df191740a6"/></dir></dir></target><target name="mageskin"><dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="js"><dir name="socolissimosimplicite"><file name="shipping_method.js" hash="4f0c0754e221c8981537c82cc34d4324"/></dir></dir></dir></dir></dir></dir></target></contents>
31
  <compatible/>
32
  <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
33
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>ColiPoste_La_Poste_So_Colissimo</name>
4
+ <version>2.3.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>
25
  R&#xE9;alisation par Smile.</description>
26
  <notes>Compatibilit&#xE9; Community 1.9</notes>
27
  <authors><author><name>Berlioz</name><user>Aline</user><email>Aline.BERLIOZ@laposte.fr</email></author></authors>
28
+ <date>2014-10-17</date>
29
+ <time>09:44:19</time>
30
+ <contents><target name="magedesign"><dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="socolissimosimplicite"><file name="empty.phtml" hash="5726ba2edea823965827685b3bdc3d95"/><dir name="form"><file name="failure.phtml" hash="259bc094879a81cc06b0672c31f2df1b"/></dir><file name="form.phtml" hash="f46decffe3510c59688c5925617e4d1c"/><file name="iframe.phtml" hash="48aabfc24e2cbe6845da1169c6576c10"/><dir name="onepage"><dir name="shipping_method"><file name="socolissimosimplicite.phtml" hash="c0ce496d1dc9369fb06db452aedd2167"/></dir></dir></dir></dir><dir name="layout"><file name="socolissimosimplicite.xml" hash="7cbeeb8095261ca622174d7ed447589f"/></dir></dir></dir></dir></dir></target><target name="magelocale"><dir><dir name="fr_FR"><file name="LaPoste_SoColissimoSimplicite.csv" hash="c70f610f8160ec6415d10bc18ff0ab41"/></dir></dir></target><target name="magecommunity"><dir><dir name="LaPoste"><dir name="SoColissimoSimplicite"><dir name="Block"><file name="Form.php" hash="df4d1dfbd6f8fbb6088b505b285ed7fa"/><file name="Iframe.php" hash="518d7af1a92e9feae96ac2982204dfd1"/><file name="Onepage.php" hash="81d36d830a778e83c0a8f22f3b90ee56"/></dir><dir name="Helper"><file name="Data.php" hash="37a71a81ddb2386672c76cb1475f3805"/></dir><dir name="Model"><dir name="Carrier"><file name="ShippingMethod.php" hash="1679042ae9465ab6877752860a7c7cc7"/></dir><dir name="Mysql4"><dir name="Transaction"><file name="Collection.php" hash="af31dc43455baed304eb087a1f5a022b"/></dir><file name="Transaction.php" hash="8cf12de5f6a6a50cf69e42e6da77d2f9"/></dir><file name="Observer.php" hash="1fdd106d6ddd0554466701b18a35b7f0"/><dir name="System"><dir name="Config"><dir name="Source"><dir name="Shipping"><file name="Amountbasetype.php" hash="210a1f9bd6c9daac92fb213d3b4d662b"/></dir></dir></dir></dir><file name="Transaction.php" hash="023d0f47d98584520dad99f2b06ed681"/></dir><dir name="controllers"><file name="FormController.php" hash="f4d0c4574c1ad127f680b38286d1bbcb"/></dir><dir name="etc"><file name="config.xml" hash="6085a5a598ff198e853c7fc635a6c24e"/><file name="system.xml" hash="be505597ba2f1ddb7ad4a8623619aa74"/></dir><dir name="sql"><dir name="socolissimosimplicite_setup"><file name="mysql4-install-1.0.0.php" hash="39d84d2cee2d8c2c0633c17891e045aa"/><file name="mysql4-uninstall-0.1.0.php" hash="471abbb64f1a962e8cc09d7bf48fe46c"/><file name="mysql4-upgrade-1.0.6-1.0.7.php" hash="03712141361b873740de91b7d0f721f0"/><file name="mysql4-upgrade-1.1.1-2.0.0.php" hash="bd7915ab8d3871491e496f33617d3754"/><file name="mysql4-upgrade-2.2.1-2.3.0.php" hash="c578ca0c71a7a6d53dbfd3daff5e594e"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir><dir name="modules"><file name="LaPoste_SoColissimoSimplicite.xml" hash="c7097370b5cc0e66fc2127df191740a6"/></dir></dir></target><target name="mageskin"><dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="js"><dir name="socolissimosimplicite"><file name="shipping_method.js" hash="4f0c0754e221c8981537c82cc34d4324"/></dir></dir></dir></dir></dir></dir></target></contents>
31
  <compatible/>
32
  <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
33
  </package>