ColiPoste_La_Poste_Expeditor_Inet_So_Colissimo - Version 1.0.4

Version Notes

Ajout de la possibilité d'exiger une remise contre signature pour les livraisons à domicile

Download this release

Release Info

Developer Berlioz
Extension ColiPoste_La_Poste_Expeditor_Inet_So_Colissimo
Version 1.0.4
Comparing to
See all releases


Code changes from version 1.0.3 to 1.0.4

app/code/community/LaPoste/ExpeditorINet/Helper/Data.php CHANGED
@@ -60,6 +60,16 @@ class LaPoste_ExpeditorINet_Helper_Data extends Mage_Core_Helper_Abstract
60
  return Mage::getStoreConfig('expeditorinet/export/field_separator');
61
  }
62
 
 
 
 
 
 
 
 
 
 
 
63
  /**
64
  * Get export company name
65
  *
60
  return Mage::getStoreConfig('expeditorinet/export/field_separator');
61
  }
62
 
63
+ /**
64
+ * Get whether a signature is required for home delivery
65
+ *
66
+ * @return bool
67
+ */
68
+ public function getConfigurationSignatureRequired()
69
+ {
70
+ return (bool) Mage::getStoreConfig('expeditorinet/export/signature_required');
71
+ }
72
+
73
  /**
74
  * Get export company name
75
  *
app/code/community/LaPoste/ExpeditorINet/controllers/ExportController.php CHANGED
@@ -148,7 +148,7 @@ class LaPoste_ExpeditorINet_ExportController extends Mage_Adminhtml_Controller_A
148
  $content = $this->_addFieldToCsv($content, $delimiter, $telephone);
149
  $content .= $separator;
150
  // product code
151
- $content = $this->_addFieldToCsv($content, $delimiter, $order->getSocoProductCode());
152
  $content .= $separator;
153
  // shipping instruction
154
  $content = $this->_addFieldToCsv($content, $delimiter, $order->getSocoShippingInstruction());
@@ -225,4 +225,22 @@ class LaPoste_ExpeditorINet_ExportController extends Mage_Adminhtml_Controller_A
225
  {
226
  return $csvContent . $fieldDelimiter . $fieldContent . $fieldDelimiter;
227
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
228
  }
148
  $content = $this->_addFieldToCsv($content, $delimiter, $telephone);
149
  $content .= $separator;
150
  // product code
151
+ $content = $this->_addFieldToCsv($content, $delimiter, $this->_getProductCode($order));
152
  $content .= $separator;
153
  // shipping instruction
154
  $content = $this->_addFieldToCsv($content, $delimiter, $order->getSocoShippingInstruction());
225
  {
226
  return $csvContent . $fieldDelimiter . $fieldContent . $fieldDelimiter;
227
  }
228
+
229
+ /**
230
+ * Get the So Colissimo product code stored in the order data.
231
+ *
232
+ * @param Mage_Sales_Model_Order $order the order
233
+ * @return string
234
+ */
235
+ protected function _getProductCode($order)
236
+ {
237
+ $value = $order->getSocoProductCode();
238
+
239
+ // request a signature for home delivery
240
+ if ($value === 'DOM' && Mage::helper('expeditorinet')->getConfigurationSignatureRequired()) {
241
+ $value = 'DOS';
242
+ }
243
+
244
+ return $value;
245
+ }
246
  }
app/code/community/LaPoste/ExpeditorINet/etc/config.xml CHANGED
@@ -13,7 +13,7 @@
13
  <config>
14
  <modules>
15
  <LaPoste_ExpeditorINet>
16
- <version>1.0.3</version>
17
  <depends>
18
  <Mage_Sales />
19
  <Mage_Adminhtml />
13
  <config>
14
  <modules>
15
  <LaPoste_ExpeditorINet>
16
+ <version>1.0.4</version>
17
  <depends>
18
  <Mage_Sales />
19
  <Mage_Adminhtml />
app/code/community/LaPoste/ExpeditorINet/etc/system.xml CHANGED
@@ -74,10 +74,20 @@
74
  <show_in_website>1</show_in_website>
75
  <show_in_store>1</show_in_store>
76
  </field_separator>
 
 
 
 
 
 
 
 
 
 
77
  <company_commercial_name translate="label comment">
78
  <label>Company commercial name</label>
79
  <frontend_type>text</frontend_type>
80
- <sort_order>100</sort_order>
81
  <show_in_default>1</show_in_default>
82
  <show_in_website>1</show_in_website>
83
  <show_in_store>1</show_in_store>
74
  <show_in_website>1</show_in_website>
75
  <show_in_store>1</show_in_store>
76
  </field_separator>
77
+ <signature_required translate="label comment">
78
+ <label>Signature On Delivery</label>
79
+ <frontend_type>select</frontend_type>
80
+ <source_model>adminhtml/system_config_source_yesno</source_model>
81
+ <sort_order>60</sort_order>
82
+ <show_in_default>1</show_in_default>
83
+ <show_in_website>1</show_in_website>
84
+ <show_in_store>1</show_in_store>
85
+ <comment>Whether a signature is required for home delivery</comment>
86
+ </signature_required>
87
  <company_commercial_name translate="label comment">
88
  <label>Company commercial name</label>
89
  <frontend_type>text</frontend_type>
90
+ <sort_order>70</sort_order>
91
  <show_in_default>1</show_in_default>
92
  <show_in_website>1</show_in_website>
93
  <show_in_store>1</show_in_store>
app/locale/fr_FR/LaPoste_ExpeditorINet.csv CHANGED
@@ -36,5 +36,7 @@
36
  "Import shipping","Importer les expéditions"
37
  "Carrier code","Code du transporteur"
38
  "By default, the tracking number will be associated to the ""custom"" code. If you want to associate it with your carrier code, put it here.","Par défaut, le numéro de suivi est associé avec le code ""custom"". Indiquer ici le code du transporteur auquel on souhaite l'associer."
 
 
39
  "Company commercial name","Nom commercial de la société"
40
  "This value is used as commercial name of company for Expeditor Inet","Utilisé comme nom commercial de la société sur les étiquettes de livraison"
36
  "Import shipping","Importer les expéditions"
37
  "Carrier code","Code du transporteur"
38
  "By default, the tracking number will be associated to the ""custom"" code. If you want to associate it with your carrier code, put it here.","Par défaut, le numéro de suivi est associé avec le code ""custom"". Indiquer ici le code du transporteur auquel on souhaite l'associer."
39
+ "Signature On Delivery","Remise contre signature"
40
+ "Whether a signature is required for home delivery","Exiger une remise contre signature pour les envois de colis à domicile"
41
  "Company commercial name","Nom commercial de la société"
42
  "This value is used as commercial name of company for Expeditor Inet","Utilisé comme nom commercial de la société sur les étiquettes de livraison"
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>ColiPoste_La_Poste_Expeditor_Inet_So_Colissimo</name>
4
- <version>1.0.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>
@@ -17,11 +17,11 @@ Test&#xE9; et valid&#xE9; sur Magento :&#xD;
17
  - Enterprise : 1.8, 1.9, 1.10, 1.11, 1.12, 1.13, 1.14&#xD;
18
  &#xD;
19
  R&#xE9;alis&#xE9; par Smile sur la base du module cr&#xE9;&#xE9; par Jib&#xE9;.</description>
20
- <notes>Ajout du champ code r&#xE9;seau point de retrait</notes>
21
  <authors><author><name>Berlioz</name><user>Aline</user><email>Aline.BERLIOZ@laposte.fr</email></author></authors>
22
- <date>2014-09-05</date>
23
- <time>13:36:00</time>
24
- <contents><target name="magedesign"><dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="expeditorinet"><dir name="import"><file name="form.phtml" hash="0afef5bb21747ce26466f7367b3f6d19"/></dir></dir></dir></dir></dir></dir></dir></target><target name="magelocale"><dir><dir name="fr_FR"><file name="LaPoste_ExpeditorINet.csv" hash="b59e1a3a7f65747aea2386606e7a89e8"/></dir></dir></target><target name="magecommunity"><dir><dir name="LaPoste"><dir name="ExpeditorINet"><dir name="Block"><dir name="Export"><dir name="Orders"><file name="Grid.php" hash="0160b61df3bd9f9df92adc57fe73063c"/></dir><file name="Orders.php" hash="eddae8e734c4b12a36343ef330cdcb32"/></dir><dir name="Import"><file name="Form.php" hash="375c120395760e50ce8eb6e6edf2cdca"/></dir></dir><dir name="Helper"><file name="Data.php" hash="24cb04365b62674358f146627c95125f"/></dir><dir name="Model"><dir name="Config"><dir name="Source"><file name="EndOfLineCharacter.php" hash="b8c600ab0371995b790bbb9f9ce43185"/><file name="FieldDelimiter.php" hash="d82eacb4771e2db3168bc360dbd9586b"/><file name="FieldSeparator.php" hash="30c60175102f0c138798d6ce095e1439"/><file name="FileCharset.php" hash="67ae7384d6c71a535e1d93fd683a4d80"/><file name="FileExtension.php" hash="b5d4b7b193e63270f30c5624ff7e9921"/></dir></dir></dir><dir name="controllers"><file name="ExportController.php" hash="d2eafbe048998ee0ef2468b8ea4526ae"/><file name="ImportController.php" hash="81ed1330737f49c111478411f5287b2c"/></dir><dir name="etc"><file name="config.xml" hash="b19f1f21e76d75c140d6558a4bab2aa2"/><file name="system.xml" hash="633934a8f0ce96d8008a4362a77a364c"/></dir></dir></dir></dir></target><target name="mageetc"><dir><dir name="modules"><file name="LaPoste_ExpeditorINet.xml" hash="f2198321021ba493d81d064eb99e6aec"/></dir></dir></target></contents>
25
  <compatible/>
26
  <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
27
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>ColiPoste_La_Poste_Expeditor_Inet_So_Colissimo</name>
4
+ <version>1.0.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>
17
  - Enterprise : 1.8, 1.9, 1.10, 1.11, 1.12, 1.13, 1.14&#xD;
18
  &#xD;
19
  R&#xE9;alis&#xE9; par Smile sur la base du module cr&#xE9;&#xE9; par Jib&#xE9;.</description>
20
+ <notes>Ajout de la possibilit&#xE9; d'exiger une remise contre signature pour les livraisons &#xE0; domicile</notes>
21
  <authors><author><name>Berlioz</name><user>Aline</user><email>Aline.BERLIOZ@laposte.fr</email></author></authors>
22
+ <date>2015-03-03</date>
23
+ <time>11:24:16</time>
24
+ <contents><target name="mageetc"><dir name="modules"><file name="LaPoste_ExpeditorINet.xml" hash="f2198321021ba493d81d064eb99e6aec"/></dir></target><target name="magecommunity"><dir name="LaPoste"><dir name="ExpeditorINet"><dir name="Block"><dir name="Export"><dir name="Orders"><file name="Grid.php" hash="0160b61df3bd9f9df92adc57fe73063c"/></dir><file name="Orders.php" hash="eddae8e734c4b12a36343ef330cdcb32"/></dir><dir name="Import"><file name="Form.php" hash="375c120395760e50ce8eb6e6edf2cdca"/></dir></dir><dir name="Helper"><file name="Data.php" hash="026ea878ecf24e84711b27ad8b10edaf"/></dir><dir name="Model"><dir name="Config"><dir name="Source"><file name="EndOfLineCharacter.php" hash="b8c600ab0371995b790bbb9f9ce43185"/><file name="FieldDelimiter.php" hash="d82eacb4771e2db3168bc360dbd9586b"/><file name="FieldSeparator.php" hash="30c60175102f0c138798d6ce095e1439"/><file name="FileCharset.php" hash="67ae7384d6c71a535e1d93fd683a4d80"/><file name="FileExtension.php" hash="b5d4b7b193e63270f30c5624ff7e9921"/></dir></dir></dir><dir name="controllers"><file name="ExportController.php" hash="7a1dab0be2737b026bf566a6540899a0"/><file name="ImportController.php" hash="81ed1330737f49c111478411f5287b2c"/></dir><dir name="etc"><file name="config.xml" hash="2bd79e7b2106611ec29f73eb8f4390df"/><file name="system.xml" hash="62af9a91e02ae96358dbee7422f1d165"/></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="expeditorinet"><dir name="import"><file name="form.phtml" hash="0afef5bb21747ce26466f7367b3f6d19"/></dir></dir></dir></dir></dir></dir></target><target name="magelocale"><dir><dir name="fr_FR"><file name="LaPoste_ExpeditorINet.csv" hash="b519614a28683786e3d60293bdc551f6"/></dir></dir></target></contents>
25
  <compatible/>
26
  <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
27
  </package>