Chronopost - Version 1.0.6

Version Notes

Version destinée à Magento 1.6.X et supérieures.
Compatibilité 1.9.2.2 validée
Compatibilité patch SUPEE-6788 validée

Download this release

Release Info

Developer Benjamin GOSSELET
Extension Chronopost
Version 1.0.6
Comparing to
See all releases


Code changes from version 1.0.5 to 1.0.6

Files changed (22) hide show
  1. app/code/community/Chronopost/Chronorelais/Block/Adminhtml/System/Config/Checklogin.php +1 -1
  2. app/code/community/Chronopost/Chronorelais/Block/Adminhtml/System/Config/Form/Field/Config.php +2 -2
  3. app/code/community/Chronopost/Chronorelais/Block/Adminhtml/System/Config/Form/Fieldsetconflicts.php +1 -1
  4. app/code/community/Chronopost/Chronorelais/Block/Export/Orders/Grid.php +1 -1
  5. app/code/community/Chronopost/Chronorelais/Block/Sales/Bordereau/Grid.php +3 -3
  6. app/code/community/Chronopost/Chronorelais/Block/Sales/Order/Shipment/View.php +2 -2
  7. app/code/community/Chronopost/Chronorelais/Block/Sales/Shipment/Grid.php +5 -5
  8. app/code/community/Chronopost/Chronorelais/Helper/Conflicts.php +7 -4
  9. app/code/community/Chronopost/Chronorelais/Helper/Webservice.php +6 -2
  10. app/code/community/Chronopost/Chronorelais/controllers/{AjaxController.php → Adminhtml/Chronorelais/AjaxController.php} +4 -4
  11. app/code/community/Chronopost/Chronorelais/controllers/{ExportController.php → Adminhtml/Chronorelais/ExportController.php} +4 -4
  12. app/code/community/Chronopost/Chronorelais/controllers/{ImportController.php → Adminhtml/Chronorelais/ImportController.php} +6 -6
  13. app/code/community/Chronopost/Chronorelais/controllers/{Sales → Adminhtml/Chronorelais/Sales}/BordereauController.php +5 -5
  14. app/code/community/Chronopost/Chronorelais/controllers/{Sales → Adminhtml/Chronorelais/Sales}/ImpressionController.php +2 -2
  15. app/code/community/Chronopost/Chronorelais/controllers/{Sales → Adminhtml/Chronorelais/Sales}/Order/ShipmentController.php +5 -5
  16. app/code/community/Chronopost/Chronorelais/controllers/Checkout/OnepageController.php +5 -3
  17. app/code/community/Chronopost/Chronorelais/etc/config.xml +20 -8
  18. app/code/community/Chronopost/Chronorelais/sql/chronorelais_setup/mysql4-upgrade-1.0.5-1.0.6.php +5 -0
  19. app/design/frontend/base/default/template/chronorelais/checkout/onepage/shipping_method.phtml +3 -4
  20. app/design/frontend/base/default/template/chronorelais/checkout/onepage/shipping_method/available.phtml +1 -1
  21. package.xml +9 -17
  22. skin/frontend/base/default/chronorelais/chronorelaismap.js +49 -47
app/code/community/Chronopost/Chronorelais/Block/Adminhtml/System/Config/Checklogin.php CHANGED
@@ -35,7 +35,7 @@ class Chronopost_Chronorelais_Block_Adminhtml_System_Config_Checklogin extends M
35
  $this->addData(array(
36
  'button_label' => Mage::helper('chronorelais')->__($originalData['button_label']),
37
  'html_id' => $element->getHtmlId(),
38
- 'ajax_url' => Mage::getSingleton('adminhtml/url')->getUrl('chronorelais/ajax/checklogin')
39
  ));
40
 
41
 
35
  $this->addData(array(
36
  'button_label' => Mage::helper('chronorelais')->__($originalData['button_label']),
37
  'html_id' => $element->getHtmlId(),
38
+ 'ajax_url' => Mage::getSingleton('adminhtml/url')->getUrl('adminhtml/chronorelais_ajax/checklogin')
39
  ));
40
 
41
 
app/code/community/Chronopost/Chronorelais/Block/Adminhtml/System/Config/Form/Field/Config.php CHANGED
@@ -3,7 +3,7 @@
3
  class Chronopost_Chronorelais_Block_Adminhtml_System_Config_Form_Field_Config extends Mage_Adminhtml_Block_System_Config_Form_Field
4
  {
5
  private static $JS_INCLUDED = false;
6
-
7
  private function label($input) {
8
  return str_replace(array("\r\n","\r","\n","'"),array("\\n","\\n","\\n","\\'"),$this->__($input));
9
  }
@@ -19,7 +19,7 @@ class Chronopost_Chronorelais_Block_Adminhtml_System_Config_Form_Field_Config ex
19
  ."//<![CDATA[\n"
20
  ."jQuery.noConflict();\n"
21
  ."var ocseditor = new OCSEditor({\n"
22
- ."ajax_url: '".$this->getUrl('chronorelais/ajax')."?isAjax=true',\n"
23
  ."form_key: FORM_KEY,\n"
24
  ."menu_item_dissociate_label: '".$this->label('Dissociate')."',\n"
25
  ."menu_item_remove_label: '".$this->label('Remove')."',\n"
3
  class Chronopost_Chronorelais_Block_Adminhtml_System_Config_Form_Field_Config extends Mage_Adminhtml_Block_System_Config_Form_Field
4
  {
5
  private static $JS_INCLUDED = false;
6
+
7
  private function label($input) {
8
  return str_replace(array("\r\n","\r","\n","'"),array("\\n","\\n","\\n","\\'"),$this->__($input));
9
  }
19
  ."//<![CDATA[\n"
20
  ."jQuery.noConflict();\n"
21
  ."var ocseditor = new OCSEditor({\n"
22
+ ."ajax_url: '".$this->getUrl('adminhtml/chronorelais_ajax')."?isAjax=true',\n"
23
  ."form_key: FORM_KEY,\n"
24
  ."menu_item_dissociate_label: '".$this->label('Dissociate')."',\n"
25
  ."menu_item_remove_label: '".$this->label('Remove')."',\n"
app/code/community/Chronopost/Chronorelais/Block/Adminhtml/System/Config/Form/Fieldsetconflicts.php CHANGED
@@ -26,7 +26,7 @@ class Chronopost_Chronorelais_Block_Adminhtml_System_Config_Form_Fieldsetconflic
26
  $html .= '<script type="text/javascript">' . "\r\n";
27
  $html .= '//<![CDATA[' . "\r\n";
28
  $html .= ' function checkConflicts() {' . "\r\n";
29
- $html .= ' new Ajax.Request(\'' . Mage::getSingleton('adminhtml/url')->getUrl('chronorelais/ajax/checkConflicts') . '\', {' . "\r\n";
30
  $html .= ' onSuccess: function(data) {' . "\r\n";
31
  $html .= ' var response = data.responseText;' . "\r\n";
32
  $html .= ' $(\'chronorelais_conflicts_result\').update(response).show();' . "\r\n";
26
  $html .= '<script type="text/javascript">' . "\r\n";
27
  $html .= '//<![CDATA[' . "\r\n";
28
  $html .= ' function checkConflicts() {' . "\r\n";
29
+ $html .= ' new Ajax.Request(\'' . Mage::getSingleton('adminhtml/url')->getUrl('adminhtml/chronorelais_ajax/checkConflicts') . '\', {' . "\r\n";
30
  $html .= ' onSuccess: function(data) {' . "\r\n";
31
  $html .= ' var response = data.responseText;' . "\r\n";
32
  $html .= ' $(\'chronorelais_conflicts_result\').update(response).show();' . "\r\n";
app/code/community/Chronopost/Chronorelais/Block/Export/Orders/Grid.php CHANGED
@@ -32,7 +32,7 @@ class Chronopost_Chronorelais_Block_Export_Orders_Grid extends Mage_Adminhtml_Bl
32
  $collection = Mage::getResourceModel($this->_getCollectionClass());
33
  $collection->join('order', 'main_table.entity_id = order.entity_id', 'shipping_description');
34
  $collection->join('order_payment', 'main_table.entity_id = order_payment.parent_id', 'method');
35
- $collection->getSelect()->joinLeft(array('oes' => Mage::getSingleton('core/resource')->getTableName('sales_chronopost_order_export_status')), 'main_table.entity_id = oes.order_id', array("if(isNull(oes.livraison_le_samedi), CASE LOWER(SUBSTRING_INDEX(order.shipping_method,'_','1')) WHEN 'chronopost' THEN '$_chronopost_deliver_saturday' WHEN 'chronorelais' THEN '$_chronorelais_deliver_saturday' WHEN 'chronoexpress' THEN '--' ELSE 'No' END, oes.livraison_le_samedi) as livraison_le_samedi"));
36
  $collection->getSelect()->where('order.shipping_method LIKE "chronorelais%" OR order.shipping_method LIKE "chronopost%" OR order.shipping_method LIKE "chronoexpress%"');
37
 
38
  $this->setCollection($collection);
32
  $collection = Mage::getResourceModel($this->_getCollectionClass());
33
  $collection->join('order', 'main_table.entity_id = order.entity_id', 'shipping_description');
34
  $collection->join('order_payment', 'main_table.entity_id = order_payment.parent_id', 'method');
35
+ $collection->getSelect()->joinLeft(array('oes' => Mage::getSingleton('core/resource')->getTableName('sales_chronopost_order_export_status')), 'main_table.entity_id = oes.order_id', array(new Zend_Db_Expr("if(isNull(oes.livraison_le_samedi), CASE LOWER(SUBSTRING_INDEX(order.shipping_method,'_','1')) WHEN 'chronopost' THEN '$_chronopost_deliver_saturday' WHEN 'chronorelais' THEN '$_chronorelais_deliver_saturday' WHEN 'chronoexpress' THEN '--' ELSE 'No' END, oes.livraison_le_samedi) as livraison_le_samedi")));
36
  $collection->getSelect()->where('order.shipping_method LIKE "chronorelais%" OR order.shipping_method LIKE "chronopost%" OR order.shipping_method LIKE "chronoexpress%"');
37
 
38
  $this->setCollection($collection);
app/code/community/Chronopost/Chronorelais/Block/Sales/Bordereau/Grid.php CHANGED
@@ -37,9 +37,9 @@ class Chronopost_Chronorelais_Block_Sales_Bordereau_Grid extends Mage_Adminhtml_
37
 
38
  $collection = Mage::getResourceModel($this->_getCollectionClass());
39
  $collection->getSelect()->joinLeft(array('og' => $collection->getTable('sales/order')), 'main_table.entity_id = og.entity_id', array('CASE LOWER(SUBSTRING_INDEX(og.shipping_method,"_","1")) WHEN "chronoexpress" THEN "Chrono Express" WHEN "chronorelais" THEN "Chrono Relais" ELSE CONCAT(UCASE(SUBSTRING(SUBSTRING_INDEX(og.shipping_method,"_","1"),1,1)),LOWER(SUBSTRING(SUBSTRING_INDEX(og.shipping_method,"_","1"), 2))) END as chrono_shipping_method', 'og.total_qty_ordered'));
40
- $collection->getSelect()->joinLeft(array('osg' => $collection->getTable('sales/shipment_grid')), 'main_table.entity_id = osg.order_id', array('if(isNull(osg.increment_id) , "--" , GROUP_CONCAT(DISTINCT osg.increment_id SEPARATOR \', \')) as shipment_increment_id', 'GROUP_CONCAT(DISTINCT osg.created_at SEPARATOR \', \') as shipment_created_at'));
41
- $collection->getSelect()->joinLeft(array('ost' => $collection->getTable('sales/shipment_track')), 'main_table.entity_id = ost.order_id', array('if(isNull(ost.'.$trackNumberFieldName.') , "--" , GROUP_CONCAT(DISTINCT ost.'.$trackNumberFieldName.' SEPARATOR \', \')) as track_number', 'if(isNull(ost.title) , "--" , GROUP_CONCAT(DISTINCT ost.title SEPARATOR \', \')) as title'));
42
- $collection->getSelect()->joinLeft(array('oes' => Mage::getSingleton('core/resource')->getTableName('sales_chronopost_order_export_status')), 'main_table.entity_id = oes.order_id', array("if(isNull(oes.livraison_le_samedi), CASE LOWER(SUBSTRING_INDEX(og.shipping_method,'_','1')) WHEN 'chronopost' THEN '$_chronopost_deliver_saturday' WHEN 'chronorelais' THEN '$_chronorelais_deliver_saturday' WHEN 'chronoexpress' THEN '--' ELSE 'No' END, oes.livraison_le_samedi) as livraison_le_samedi"));
43
  $collection->getSelect()->where('og.shipping_method LIKE "chronorelais%" OR og.shipping_method LIKE "chronopost%" OR og.shipping_method LIKE "chronoexpress%"');
44
  $collection->getSelect()->group('main_table.entity_id');
45
  $sql = $collection->getSelectSql(true);
37
 
38
  $collection = Mage::getResourceModel($this->_getCollectionClass());
39
  $collection->getSelect()->joinLeft(array('og' => $collection->getTable('sales/order')), 'main_table.entity_id = og.entity_id', array('CASE LOWER(SUBSTRING_INDEX(og.shipping_method,"_","1")) WHEN "chronoexpress" THEN "Chrono Express" WHEN "chronorelais" THEN "Chrono Relais" ELSE CONCAT(UCASE(SUBSTRING(SUBSTRING_INDEX(og.shipping_method,"_","1"),1,1)),LOWER(SUBSTRING(SUBSTRING_INDEX(og.shipping_method,"_","1"), 2))) END as chrono_shipping_method', 'og.total_qty_ordered'));
40
+ $collection->getSelect()->joinLeft(array('osg' => $collection->getTable('sales/shipment_grid')), 'main_table.entity_id = osg.order_id', array(new Zend_Db_Expr('if(isNull(osg.increment_id) , "--" , GROUP_CONCAT(DISTINCT osg.increment_id SEPARATOR \', \')) as shipment_increment_id', 'GROUP_CONCAT(DISTINCT osg.created_at SEPARATOR \', \') as shipment_created_at')));
41
+ $collection->getSelect()->joinLeft(array('ost' => $collection->getTable('sales/shipment_track')), 'main_table.entity_id = ost.order_id', array(new Zend_Db_Expr('if(isNull(ost.'.$trackNumberFieldName.') , "--" , GROUP_CONCAT(DISTINCT ost.'.$trackNumberFieldName.' SEPARATOR \', \')) as track_number', 'if(isNull(ost.title) , "--" , GROUP_CONCAT(DISTINCT ost.title SEPARATOR \', \')) as title')));
42
+ $collection->getSelect()->joinLeft(array('oes' => Mage::getSingleton('core/resource')->getTableName('sales_chronopost_order_export_status')), 'main_table.entity_id = oes.order_id', array(new Zend_Db_Expr("if(isNull(oes.livraison_le_samedi), CASE LOWER(SUBSTRING_INDEX(og.shipping_method,'_','1')) WHEN 'chronopost' THEN '$_chronopost_deliver_saturday' WHEN 'chronorelais' THEN '$_chronorelais_deliver_saturday' WHEN 'chronoexpress' THEN '--' ELSE 'No' END, oes.livraison_le_samedi) as livraison_le_samedi")));
43
  $collection->getSelect()->where('og.shipping_method LIKE "chronorelais%" OR og.shipping_method LIKE "chronopost%" OR og.shipping_method LIKE "chronoexpress%"');
44
  $collection->getSelect()->group('main_table.entity_id');
45
  $sql = $collection->getSelectSql(true);
app/code/community/Chronopost/Chronorelais/Block/Sales/Order/Shipment/View.php CHANGED
@@ -18,10 +18,10 @@ class Chronopost_Chronorelais_Block_Sales_Order_Shipment_View extends Mage_Admin
18
  );
19
  }
20
  }
21
-
22
  public function getPrintChronopostUrl()
23
  {
24
- return $this->getUrl('chronorelais/sales_impression/print', array(
25
  'shipment_id' => $this->getShipment()->getId()
26
  ));
27
  }
18
  );
19
  }
20
  }
21
+
22
  public function getPrintChronopostUrl()
23
  {
24
+ return $this->getUrl('adminhtml/chronorelais_sales_impression/print', array(
25
  'shipment_id' => $this->getShipment()->getId()
26
  ));
27
  }
app/code/community/Chronopost/Chronorelais/Block/Sales/Shipment/Grid.php CHANGED
@@ -36,9 +36,9 @@ class Chronopost_Chronorelais_Block_Sales_Shipment_Grid extends Mage_Adminhtml_B
36
 
37
  $collection = Mage::getResourceModel($this->_getCollectionClass());
38
  $collection->getSelect()->joinLeft(array('og' => $collection->getTable('sales/order')), 'main_table.entity_id = og.entity_id', array('CASE LOWER(SUBSTRING_INDEX(og.shipping_method,"_","1")) WHEN "chronoexpress" THEN "Chrono Express" WHEN "chronorelais" THEN "Chrono Relais" ELSE CONCAT(UCASE(SUBSTRING(SUBSTRING_INDEX(og.shipping_method,"_","1"),1,1)),LOWER(SUBSTRING(SUBSTRING_INDEX(og.shipping_method,"_","1"), 2))) END as chrono_shipping_method', 'og.total_qty_ordered'));
39
- $collection->getSelect()->joinLeft(array('osg' => $collection->getTable('sales/shipment_grid')), 'main_table.entity_id = osg.order_id', array('if(isNull(osg.increment_id) , "--" , GROUP_CONCAT(DISTINCT osg.increment_id SEPARATOR \', \')) as shipment_increment_id', 'GROUP_CONCAT(DISTINCT osg.created_at SEPARATOR \', \') as shipment_created_at'));
40
- $collection->getSelect()->joinLeft(array('ost' => $collection->getTable('sales/shipment_track')), 'main_table.entity_id = ost.order_id', array('if(isNull(ost.'.$trackNumberFieldName.') , "--" , GROUP_CONCAT(DISTINCT ost.'.$trackNumberFieldName.' SEPARATOR \', \')) as track_number', 'if(isNull(ost.title) , "--" , GROUP_CONCAT(DISTINCT ost.title SEPARATOR \', \')) as title'));
41
- $collection->getSelect()->joinLeft(array('oes' => Mage::getSingleton('core/resource')->getTableName('sales_chronopost_order_export_status')), 'main_table.entity_id = oes.order_id', array("if(isNull(oes.livraison_le_samedi), CASE LOWER(SUBSTRING_INDEX(og.shipping_method,'_','1')) WHEN 'chronopost' THEN '$_chronopost_deliver_saturday' WHEN 'chronorelais' THEN '$_chronorelais_deliver_saturday' WHEN 'chronoexpress' THEN '--' ELSE 'No' END, oes.livraison_le_samedi) as livraison_le_samedi"));
42
  $collection->getSelect()->where('og.shipping_method LIKE "chronorelais%" OR og.shipping_method LIKE "chronopost%" OR og.shipping_method LIKE "chronoexpress%"');
43
  $collection->getSelect()->group('main_table.entity_id');
44
  $sql = $collection->getSelectSql(true);
@@ -128,7 +128,7 @@ class Chronopost_Chronorelais_Block_Sales_Shipment_Grid extends Mage_Adminhtml_B
128
  array(
129
  'caption' => Mage::helper('chronorelais')->__('Expédition'),
130
  'url' => array(
131
- 'base' => 'chronorelais/sales_impression/print'
132
  ),
133
  'field' => 'order_id'
134
  )
@@ -147,7 +147,7 @@ class Chronopost_Chronorelais_Block_Sales_Shipment_Grid extends Mage_Adminhtml_B
147
  array(
148
  'caption' => Mage::helper('chronorelais')->__('Retour SAV'),
149
  'url' => array(
150
- 'base' => 'chronorelais/sales_impression/printEtiquetteRetour'
151
  ),
152
  'field' => 'order_id'
153
  )
36
 
37
  $collection = Mage::getResourceModel($this->_getCollectionClass());
38
  $collection->getSelect()->joinLeft(array('og' => $collection->getTable('sales/order')), 'main_table.entity_id = og.entity_id', array('CASE LOWER(SUBSTRING_INDEX(og.shipping_method,"_","1")) WHEN "chronoexpress" THEN "Chrono Express" WHEN "chronorelais" THEN "Chrono Relais" ELSE CONCAT(UCASE(SUBSTRING(SUBSTRING_INDEX(og.shipping_method,"_","1"),1,1)),LOWER(SUBSTRING(SUBSTRING_INDEX(og.shipping_method,"_","1"), 2))) END as chrono_shipping_method', 'og.total_qty_ordered'));
39
+ $collection->getSelect()->joinLeft(array('osg' => $collection->getTable('sales/shipment_grid')), 'main_table.entity_id = osg.order_id', array(new Zend_Db_Expr('if(isNull(osg.increment_id) , "--" , GROUP_CONCAT(DISTINCT osg.increment_id SEPARATOR \', \')) as shipment_increment_id', 'GROUP_CONCAT(DISTINCT osg.created_at SEPARATOR \', \') as shipment_created_at')));
40
+ $collection->getSelect()->joinLeft(array('ost' => $collection->getTable('sales/shipment_track')), 'main_table.entity_id = ost.order_id', array(new Zend_Db_Expr('if(isNull(ost.'.$trackNumberFieldName.') , "--" , GROUP_CONCAT(DISTINCT ost.'.$trackNumberFieldName.' SEPARATOR \', \')) as track_number', 'if(isNull(ost.title) , "--" , GROUP_CONCAT(DISTINCT ost.title SEPARATOR \', \')) as title')));
41
+ $collection->getSelect()->joinLeft(array('oes' => Mage::getSingleton('core/resource')->getTableName('sales_chronopost_order_export_status')), 'main_table.entity_id = oes.order_id', array(new Zend_Db_Expr("if(isNull(oes.livraison_le_samedi), CASE LOWER(SUBSTRING_INDEX(og.shipping_method,'_','1')) WHEN 'chronopost' THEN '$_chronopost_deliver_saturday' WHEN 'chronorelais' THEN '$_chronorelais_deliver_saturday' WHEN 'chronoexpress' THEN '--' ELSE 'No' END, oes.livraison_le_samedi) as livraison_le_samedi")));
42
  $collection->getSelect()->where('og.shipping_method LIKE "chronorelais%" OR og.shipping_method LIKE "chronopost%" OR og.shipping_method LIKE "chronoexpress%"');
43
  $collection->getSelect()->group('main_table.entity_id');
44
  $sql = $collection->getSelectSql(true);
128
  array(
129
  'caption' => Mage::helper('chronorelais')->__('Expédition'),
130
  'url' => array(
131
+ 'base' => '*/*/print'
132
  ),
133
  'field' => 'order_id'
134
  )
147
  array(
148
  'caption' => Mage::helper('chronorelais')->__('Retour SAV'),
149
  'url' => array(
150
+ 'base' => '*/*/printEtiquetteRetour'
151
  ),
152
  'field' => 'order_id'
153
  )
app/code/community/Chronopost/Chronorelais/Helper/Conflicts.php CHANGED
@@ -32,6 +32,9 @@ class Chronopost_Chronorelais_Helper_Conflicts extends Mage_Core_Helper_Abstract
32
 
33
  // Recursively browse pathes
34
  foreach ($modulePathes as $modulePath) {
 
 
 
35
  $dir = new RecursiveDirectoryIterator($modulePath, FilesystemIterator::SKIP_DOTS);
36
  $ite = new RecursiveIteratorIterator($dir, RecursiveIteratorIterator::SELF_FIRST);
37
 
@@ -103,8 +106,8 @@ class Chronopost_Chronorelais_Helper_Conflicts extends Mage_Core_Helper_Abstract
103
  $extends_token = true;
104
  } else if ($extends_token && $token[0] == T_STRING) {
105
  if (self::DEBUG) {
106
- $result .= 'File ' . $controllerPhp[0] . ":\n" .
107
- " Class " . $className . "\n" .
108
  " Extends " . $token[1] . "\n\n";
109
  }
110
 
@@ -124,7 +127,7 @@ class Chronopost_Chronorelais_Helper_Conflicts extends Mage_Core_Helper_Abstract
124
  $className = "";
125
  $extends_token = false;
126
  }
127
- }
128
  }
129
 
130
  // $className = str_replace(".php", "", str_replace($modulePath . DS, "", $controllerPhp[0]));
@@ -135,7 +138,7 @@ class Chronopost_Chronorelais_Helper_Conflicts extends Mage_Core_Helper_Abstract
135
  }
136
 
137
  // Parse rewrites table to check for conflicts
138
-
139
  foreach ($this->rewrites['chrono'] as $type => $rewrites) {
140
  foreach ($rewrites as $from => $tos) {
141
  if (!in_array($from, $this->whiteList) && isset($this->rewrites['other'][$type][$from])) {
32
 
33
  // Recursively browse pathes
34
  foreach ($modulePathes as $modulePath) {
35
+
36
+ if(!is_dir($modulePath)) { continue; }
37
+
38
  $dir = new RecursiveDirectoryIterator($modulePath, FilesystemIterator::SKIP_DOTS);
39
  $ite = new RecursiveIteratorIterator($dir, RecursiveIteratorIterator::SELF_FIRST);
40
 
106
  $extends_token = true;
107
  } else if ($extends_token && $token[0] == T_STRING) {
108
  if (self::DEBUG) {
109
+ $result .= 'File ' . $controllerPhp[0] . ":\n" .
110
+ " Class " . $className . "\n" .
111
  " Extends " . $token[1] . "\n\n";
112
  }
113
 
127
  $className = "";
128
  $extends_token = false;
129
  }
130
+ }
131
  }
132
 
133
  // $className = str_replace(".php", "", str_replace($modulePath . DS, "", $controllerPhp[0]));
138
  }
139
 
140
  // Parse rewrites table to check for conflicts
141
+
142
  foreach ($this->rewrites['chrono'] as $type => $rewrites) {
143
  foreach ($rewrites as $from => $tos) {
144
  if (!in_array($from, $this->whiteList) && isset($this->rewrites['other'][$type][$from])) {
app/code/community/Chronopost/Chronorelais/Helper/Webservice.php CHANGED
@@ -19,7 +19,8 @@ class Chronopost_Chronorelais_Helper_Webservice extends Mage_Core_Helper_Abstrac
19
  /* get point relais by address */
20
  public function getPointRelaisByAddress() {
21
 
22
- $quote = Mage::getSingleton('checkout/cart')->init()->getQuote();
 
23
  $address = $quote->getShippingAddress();
24
  $helperData = Mage::helper('chronorelais');
25
 
@@ -39,7 +40,7 @@ class Chronopost_Chronorelais_Helper_Webservice extends Mage_Core_Helper_Abstrac
39
  'weight' => 2000,
40
  'shippingDate' => date('d/m/Y'),
41
  'maxPointChronopost' => 5,
42
- 'maxDistanceSearch' => 10,
43
  'holidayTolerant' => 1
44
  );
45
  $webservbt = $client->recherchePointChronopost($params);
@@ -92,6 +93,9 @@ class Chronopost_Chronorelais_Helper_Webservice extends Mage_Core_Helper_Abstrac
92
  *
93
  */
94
  $listePr = $webservbt->return->listePointRelais;
 
 
 
95
  $return = array();
96
  foreach($listePr as $pr)
97
  {
19
  /* get point relais by address */
20
  public function getPointRelaisByAddress() {
21
 
22
+ //$quote = Mage::getSingleton('checkout/cart')->init()->getQuote();
23
+ $quote = Mage::getSingleton('checkout/cart')->getQuote();
24
  $address = $quote->getShippingAddress();
25
  $helperData = Mage::helper('chronorelais');
26
 
40
  'weight' => 2000,
41
  'shippingDate' => date('d/m/Y'),
42
  'maxPointChronopost' => 5,
43
+ 'maxDistanceSearch' => 15,
44
  'holidayTolerant' => 1
45
  );
46
  $webservbt = $client->recherchePointChronopost($params);
93
  *
94
  */
95
  $listePr = $webservbt->return->listePointRelais;
96
+ if(count($webservbt->return->listePointRelais) == 1) {
97
+ $listePr = array($listePr);
98
+ }
99
  $return = array();
100
  foreach($listePr as $pr)
101
  {
app/code/community/Chronopost/Chronorelais/controllers/{AjaxController.php → Adminhtml/Chronorelais/AjaxController.php} RENAMED
@@ -19,7 +19,7 @@
19
  * @author Antoine Lemoine
20
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
21
  */
22
- class Chronopost_Chronorelais_AjaxController extends Chronopost_Chronorelais_Controller_Abstract {
23
 
24
  private function getPropertyHelper($row_id, $property_key, $property) {
25
  $cleaned_property = $this->cleanKey($property_key);
@@ -190,9 +190,9 @@ class Chronopost_Chronorelais_AjaxController extends Chronopost_Chronorelais_Con
190
  for ($i = count($region_codes); --$i >= 0;) {
191
  $code = trim($region_codes[$i]);
192
  $region_codes[$i] = $code;
193
- }
194
  }
195
-
196
  /* $in_array = in_array($address['region_code'],$region_codes,true) || in_array($address['postcode'],$region_codes,true); */
197
  $excluding_region = (isset($result[2]) && $result[2] == '-') || (isset($result[3]) && $result[3] == '-');
198
  $output['countries'][] = array(
@@ -440,7 +440,7 @@ class Chronopost_Chronorelais_AjaxController extends Chronopost_Chronorelais_Con
440
  }
441
 
442
  public function checkConflictsAction() {
443
- // Vérification
444
  echo '<pre style="background: #000; color: #FFF; padding: 5px 10px; margin-top: 5px; border: 1px solid #0F0; font-family: Courier, Sans Serif; white-space: normal; text-indent: -20px; padding-left: 30px; line-height: 15px;">' . Mage::helper('chronorelais/conflicts')->checkForConflicts() . '</pre>';
445
  }
446
  }
19
  * @author Antoine Lemoine
20
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
21
  */
22
+ class Chronopost_Chronorelais_Adminhtml_Chronorelais_AjaxController extends Chronopost_Chronorelais_Controller_Abstract {
23
 
24
  private function getPropertyHelper($row_id, $property_key, $property) {
25
  $cleaned_property = $this->cleanKey($property_key);
190
  for ($i = count($region_codes); --$i >= 0;) {
191
  $code = trim($region_codes[$i]);
192
  $region_codes[$i] = $code;
193
+ }
194
  }
195
+
196
  /* $in_array = in_array($address['region_code'],$region_codes,true) || in_array($address['postcode'],$region_codes,true); */
197
  $excluding_region = (isset($result[2]) && $result[2] == '-') || (isset($result[3]) && $result[3] == '-');
198
  $output['countries'][] = array(
440
  }
441
 
442
  public function checkConflictsAction() {
443
+ // Vérification
444
  echo '<pre style="background: #000; color: #FFF; padding: 5px 10px; margin-top: 5px; border: 1px solid #0F0; font-family: Courier, Sans Serif; white-space: normal; text-indent: -20px; padding-left: 30px; line-height: 15px;">' . Mage::helper('chronorelais/conflicts')->checkForConflicts() . '</pre>';
445
  }
446
  }
app/code/community/Chronopost/Chronorelais/controllers/{ExportController.php → Adminhtml/Chronorelais/ExportController.php} RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
 
3
- class Chronopost_Chronorelais_ExportController extends Mage_Adminhtml_Controller_Action {
4
 
5
  /**
6
  * Constructor
@@ -130,8 +130,8 @@ class Chronopost_Chronorelais_ExportController extends Mage_Adminhtml_Controller
130
  /* real order id */
131
  $content = $this->_addFieldToCsv($content, $delimiter, $this->getValue($order->getRealOrderId()));
132
  $content .= $separator;
133
-
134
-
135
  /* total weight (in kg) */
136
  $order_weight = number_format($order->getWeight(), 2, '.', '');
137
  if($weightUnit == 'g') {
@@ -309,7 +309,7 @@ class Chronopost_Chronorelais_ExportController extends Mage_Adminhtml_Controller
309
  /* real order id */
310
  $content = $this->_addFieldToCsv($content, $delimiter, $this->getValue($order->getRealOrderId()));
311
  $content .= $separator;
312
-
313
  /* total weight (in g)*/
314
  $order_weight = number_format($order->getWeight(), 2, '.', '');
315
  if($weightUnit == 'kg') {
1
  <?php
2
 
3
+ class Chronopost_Chronorelais_Adminhtml_Chronorelais_ExportController extends Mage_Adminhtml_Controller_Action {
4
 
5
  /**
6
  * Constructor
130
  /* real order id */
131
  $content = $this->_addFieldToCsv($content, $delimiter, $this->getValue($order->getRealOrderId()));
132
  $content .= $separator;
133
+
134
+
135
  /* total weight (in kg) */
136
  $order_weight = number_format($order->getWeight(), 2, '.', '');
137
  if($weightUnit == 'g') {
309
  /* real order id */
310
  $content = $this->_addFieldToCsv($content, $delimiter, $this->getValue($order->getRealOrderId()));
311
  $content .= $separator;
312
+
313
  /* total weight (in g)*/
314
  $order_weight = number_format($order->getWeight(), 2, '.', '');
315
  if($weightUnit == 'kg') {
app/code/community/Chronopost/Chronorelais/controllers/{ImportController.php → Adminhtml/Chronorelais/ImportController.php} RENAMED
@@ -1,12 +1,12 @@
1
  <?php
2
- class Chronopost_Chronorelais_ImportController extends Mage_Adminhtml_Controller_Action
3
  {
4
 
5
  /**
6
  * Constructor
7
  */
8
  protected function _construct()
9
- {
10
  $this->setUsedModuleName('Chronopost_Chronorelais');
11
  }
12
 
@@ -120,11 +120,11 @@ class Chronopost_Chronorelais_ImportController extends Mage_Adminhtml_Controller
120
  * Try to create a shipment
121
  */
122
  $shipmentId = $this->_createShipment($order, $trackingNumber, $trackingTitle, $sendEmail, $comment, $includeComment);
123
-
124
  if ($shipmentId != 0) {
125
  $this->_getSession()->addSuccess($this->__('Shipment %s created for order %s, with tracking number %s', $shipmentId, $orderId, $trackingNumber));
126
  }
127
-
128
  }//foreach
129
 
130
  }
@@ -180,7 +180,7 @@ class Chronopost_Chronorelais_ImportController extends Mage_Adminhtml_Controller
180
  /**
181
  * Tracking number instanciation
182
  */
183
-
184
  $_shippingMethod = explode("_",$order->getShippingMethod());
185
  switch($_shippingMethod[0]) {
186
  case "chronopost":
@@ -200,7 +200,7 @@ class Chronopost_Chronorelais_ImportController extends Mage_Adminhtml_Controller
200
  $tracking_order = '';
201
  break;
202
  }
203
-
204
  $track = Mage::getModel('sales/order_shipment_track')
205
  ->setNumber($trackingNumber) //setTrackingNumber ?
206
  ->setCarrierCode($carrier_code)
1
  <?php
2
+ class Chronopost_Chronorelais_Adminhtml_Chronorelais_ImportController extends Mage_Adminhtml_Controller_Action
3
  {
4
 
5
  /**
6
  * Constructor
7
  */
8
  protected function _construct()
9
+ {
10
  $this->setUsedModuleName('Chronopost_Chronorelais');
11
  }
12
 
120
  * Try to create a shipment
121
  */
122
  $shipmentId = $this->_createShipment($order, $trackingNumber, $trackingTitle, $sendEmail, $comment, $includeComment);
123
+
124
  if ($shipmentId != 0) {
125
  $this->_getSession()->addSuccess($this->__('Shipment %s created for order %s, with tracking number %s', $shipmentId, $orderId, $trackingNumber));
126
  }
127
+
128
  }//foreach
129
 
130
  }
180
  /**
181
  * Tracking number instanciation
182
  */
183
+
184
  $_shippingMethod = explode("_",$order->getShippingMethod());
185
  switch($_shippingMethod[0]) {
186
  case "chronopost":
200
  $tracking_order = '';
201
  break;
202
  }
203
+
204
  $track = Mage::getModel('sales/order_shipment_track')
205
  ->setNumber($trackingNumber) //setTrackingNumber ?
206
  ->setCarrierCode($carrier_code)
app/code/community/Chronopost/Chronorelais/controllers/{Sales → Adminhtml/Chronorelais/Sales}/BordereauController.php RENAMED
@@ -2,7 +2,7 @@
2
 
3
  require_once 'Mage/Adminhtml/controllers/Sales/OrderController.php';
4
 
5
- class Chronopost_Chronorelais_Sales_BordereauController extends Mage_Adminhtml_Sales_OrderController {
6
 
7
  /**
8
  * Additional initialization
@@ -60,12 +60,12 @@ class Chronopost_Chronorelais_Sales_BordereauController extends Mage_Adminhtml_S
60
 
61
  /* Tracking Number */
62
  $trackNumber = $this->getTrackingNumber($shipment->getId());
63
-
64
  /* items */
65
  $items = $shipment->getAllItems();
66
  $weightTotal = 0;
67
  $nbTotal = 0;
68
-
69
  $maxAmount = $helper->getMaxAdValoremAmount();
70
  $adValoremAmount = $helper->assuranceAdValoremAmount();
71
  $adValoremEnabled = $helper->assuranceAdValoremEnabled();
@@ -208,7 +208,7 @@ class Chronopost_Chronorelais_Sales_BordereauController extends Mage_Adminhtml_S
208
  $page->drawRectangle($xPos, $yPos, 570, $yPos -20);
209
  $page->setFillColor(new Zend_Pdf_Color_Rgb(0, 0, 0));
210
  $yPos -= 15;
211
-
212
  $page->drawText("Numéro de LT", $xPos+5, $yPos,'UTF-8');
213
  $page->drawText('Poids (kg)', $xPos+110, $yPos);
214
  $page->drawText('Code produit', $xPos+170, $yPos);
@@ -217,7 +217,7 @@ class Chronopost_Chronorelais_Sales_BordereauController extends Mage_Adminhtml_S
217
  $page->drawText('Assurance', $xPos+380, $yPos);
218
  $page->drawText('Ville', $xPos+440, $yPos);
219
  $yPos -= 5;
220
-
221
  foreach($detail as $line) {
222
 
223
  $page->setFillColor(new Zend_Pdf_Color_Rgb(255, 255, 255));
2
 
3
  require_once 'Mage/Adminhtml/controllers/Sales/OrderController.php';
4
 
5
+ class Chronopost_Chronorelais_Adminhtml_Chronorelais_Sales_BordereauController extends Mage_Adminhtml_Sales_OrderController {
6
 
7
  /**
8
  * Additional initialization
60
 
61
  /* Tracking Number */
62
  $trackNumber = $this->getTrackingNumber($shipment->getId());
63
+
64
  /* items */
65
  $items = $shipment->getAllItems();
66
  $weightTotal = 0;
67
  $nbTotal = 0;
68
+
69
  $maxAmount = $helper->getMaxAdValoremAmount();
70
  $adValoremAmount = $helper->assuranceAdValoremAmount();
71
  $adValoremEnabled = $helper->assuranceAdValoremEnabled();
208
  $page->drawRectangle($xPos, $yPos, 570, $yPos -20);
209
  $page->setFillColor(new Zend_Pdf_Color_Rgb(0, 0, 0));
210
  $yPos -= 15;
211
+
212
  $page->drawText("Numéro de LT", $xPos+5, $yPos,'UTF-8');
213
  $page->drawText('Poids (kg)', $xPos+110, $yPos);
214
  $page->drawText('Code produit', $xPos+170, $yPos);
217
  $page->drawText('Assurance', $xPos+380, $yPos);
218
  $page->drawText('Ville', $xPos+440, $yPos);
219
  $yPos -= 5;
220
+
221
  foreach($detail as $line) {
222
 
223
  $page->setFillColor(new Zend_Pdf_Color_Rgb(255, 255, 255));
app/code/community/Chronopost/Chronorelais/controllers/{Sales → Adminhtml/Chronorelais/Sales}/ImpressionController.php RENAMED
@@ -2,7 +2,7 @@
2
 
3
  require_once 'Mage/Adminhtml/controllers/Sales/Order/ShipmentController.php';
4
 
5
- class Chronopost_Chronorelais_Sales_ImpressionController extends Mage_Adminhtml_Sales_Order_ShipmentController {
6
 
7
  protected $_trackingNumbers = '';
8
 
@@ -1001,7 +1001,7 @@ class Chronopost_Chronorelais_Sales_ImpressionController extends Mage_Adminhtml_
1001
  'password' => $_helper->getConfigurationAccountPass(),
1002
  'option' => '0'
1003
  );
1004
-
1005
  return $expeditionArray;
1006
  }
1007
  }
2
 
3
  require_once 'Mage/Adminhtml/controllers/Sales/Order/ShipmentController.php';
4
 
5
+ class Chronopost_Chronorelais_Adminhtml_Chronorelais_Sales_ImpressionController extends Mage_Adminhtml_Sales_Order_ShipmentController {
6
 
7
  protected $_trackingNumbers = '';
8
 
1001
  'password' => $_helper->getConfigurationAccountPass(),
1002
  'option' => '0'
1003
  );
1004
+
1005
  return $expeditionArray;
1006
  }
1007
  }
app/code/community/Chronopost/Chronorelais/controllers/{Sales → Adminhtml/Chronorelais/Sales}/Order/ShipmentController.php RENAMED
@@ -2,7 +2,7 @@
2
 
3
  require_once 'Mage/Adminhtml/controllers/Sales/Order/ShipmentController.php';
4
 
5
- class Chronopost_Chronorelais_Sales_Order_ShipmentController extends Mage_Adminhtml_Sales_Order_ShipmentController {
6
 
7
  /**
8
  * Save shipment
@@ -28,7 +28,7 @@ class Chronopost_Chronorelais_Sales_Order_ShipmentController extends Mage_Adminh
28
  }
29
  }
30
 
31
- protected function saveAndCreateEtiquette($shipment) {
32
  $shipment->register();
33
 
34
  //Si l'expedition est réalisé par Mondial Relay, on créé le tracking automatiquement.
@@ -105,7 +105,7 @@ class Chronopost_Chronorelais_Sales_Order_ShipmentController extends Mage_Adminh
105
  $recipientName = $this->getFilledValue($_shippingAddress->getCompany()); //RelayPoint Name if chronorelais or Companyname if chronopost and
106
  $recipientName2 = $this->getFilledValue($_shippingAddress->getFirstname() . ' ' . $_shippingAddress->getLastname());
107
  //remove any alphabets in phone number
108
-
109
  //$recipientPhone = trim(ereg_replace("[^0-9.-]", " ", $_shippingAddress->getTelephone()));
110
  $recipientPhone = trim(preg_replace("/[^0-9\.\-]/", " ", $_shippingAddress->getTelephone()));
111
 
@@ -351,12 +351,12 @@ class Chronopost_Chronorelais_Sales_Order_ShipmentController extends Mage_Adminh
351
  if(is_array($shipment))
352
  {
353
  foreach($shipment as $ship) {
354
- $this->saveAndCreateEtiquette($ship);
355
  }
356
  }
357
  else
358
  {
359
- $this->saveAndCreateEtiquette($shipment);
360
  }
361
  } else {
362
  $this->_redirect('*/*/new', array('order_id' => $this->getRequest()->getParam('order_id')));
2
 
3
  require_once 'Mage/Adminhtml/controllers/Sales/Order/ShipmentController.php';
4
 
5
+ class Chronopost_Chronorelais_Adminhtml_Chronorelais_Sales_Order_ShipmentController extends Mage_Adminhtml_Sales_Order_ShipmentController {
6
 
7
  /**
8
  * Save shipment
28
  }
29
  }
30
 
31
+ protected function saveAndCreateEtiquette($shipment,$data) {
32
  $shipment->register();
33
 
34
  //Si l'expedition est réalisé par Mondial Relay, on créé le tracking automatiquement.
105
  $recipientName = $this->getFilledValue($_shippingAddress->getCompany()); //RelayPoint Name if chronorelais or Companyname if chronopost and
106
  $recipientName2 = $this->getFilledValue($_shippingAddress->getFirstname() . ' ' . $_shippingAddress->getLastname());
107
  //remove any alphabets in phone number
108
+
109
  //$recipientPhone = trim(ereg_replace("[^0-9.-]", " ", $_shippingAddress->getTelephone()));
110
  $recipientPhone = trim(preg_replace("/[^0-9\.\-]/", " ", $_shippingAddress->getTelephone()));
111
 
351
  if(is_array($shipment))
352
  {
353
  foreach($shipment as $ship) {
354
+ $this->saveAndCreateEtiquette($ship,$data);
355
  }
356
  }
357
  else
358
  {
359
+ $this->saveAndCreateEtiquette($shipment,$data);
360
  }
361
  } else {
362
  $this->_redirect('*/*/new', array('order_id' => $this->getRequest()->getParam('order_id')));
app/code/community/Chronopost/Chronorelais/controllers/Checkout/OnepageController.php CHANGED
@@ -167,7 +167,7 @@ class Chronopost_Chronorelais_Checkout_OnepageController extends Mage_Checkout_O
167
  }
168
  }
169
  //ENDWEC chronorelais
170
-
171
  parent::saveShippingMethodAction();
172
  }
173
  }
@@ -183,6 +183,7 @@ class Chronopost_Chronorelais_Checkout_OnepageController extends Mage_Checkout_O
183
  $quote = $this->getOnepage()->getQuote(); //Mage::getSingleton('checkout/cart')->init()->getQuote();
184
  $address = $quote->getShippingAddress();
185
  $postcode = $address->getPostcode();
 
186
 
187
  if (extension_loaded('soap')) {
188
 
@@ -193,7 +194,7 @@ class Chronopost_Chronorelais_Checkout_OnepageController extends Mage_Checkout_O
193
  $this->loadLayout('checkout_onepage_shippingchronorelais');
194
  $result['goto_section'] = 'shipping-method';
195
  $result['update_section'] = array(
196
- 'name' => 'shipping-method-chronorelais',
197
  'html' => $this->_getChronoRelaisHtml()
198
  );
199
  $result['relaypoints'] = $webservbt;
@@ -218,6 +219,7 @@ class Chronopost_Chronorelais_Checkout_OnepageController extends Mage_Checkout_O
218
  $result = array();
219
  $webservbt = array();
220
  $postcode = $this->getRequest()->getPost('mappostalcode');
 
221
  if ($postcode) {
222
  $quote = $this->getOnepage()->getQuote(); //Mage::getSingleton('checkout/cart')->init()->getQuote();
223
  $address = $quote->getShippingAddress();
@@ -233,7 +235,7 @@ class Chronopost_Chronorelais_Checkout_OnepageController extends Mage_Checkout_O
233
  $this->loadLayout('checkout_onepage_shippingchronorelais');
234
  $result['goto_section'] = 'shipping-method';
235
  $result['update_section'] = array(
236
- 'name' => 'shipping-method-chronorelais',
237
  'html' => $this->_getChronoRelaisHtml()
238
  );
239
  $result['relaypoints'] = $webservbt;
167
  }
168
  }
169
  //ENDWEC chronorelais
170
+
171
  parent::saveShippingMethodAction();
172
  }
173
  }
183
  $quote = $this->getOnepage()->getQuote(); //Mage::getSingleton('checkout/cart')->init()->getQuote();
184
  $address = $quote->getShippingAddress();
185
  $postcode = $address->getPostcode();
186
+ $shippingMethod = $this->getRequest()->getPost('shipping_method');
187
 
188
  if (extension_loaded('soap')) {
189
 
194
  $this->loadLayout('checkout_onepage_shippingchronorelais');
195
  $result['goto_section'] = 'shipping-method';
196
  $result['update_section'] = array(
197
+ 'name' => 'shipping-method-'.$shippingMethod,
198
  'html' => $this->_getChronoRelaisHtml()
199
  );
200
  $result['relaypoints'] = $webservbt;
219
  $result = array();
220
  $webservbt = array();
221
  $postcode = $this->getRequest()->getPost('mappostalcode');
222
+ $shippingMethod = $this->getRequest()->getPost('shipping_method');
223
  if ($postcode) {
224
  $quote = $this->getOnepage()->getQuote(); //Mage::getSingleton('checkout/cart')->init()->getQuote();
225
  $address = $quote->getShippingAddress();
235
  $this->loadLayout('checkout_onepage_shippingchronorelais');
236
  $result['goto_section'] = 'shipping-method';
237
  $result['update_section'] = array(
238
+ 'name' => 'shipping-method-'.$shippingMethod,
239
  'html' => $this->_getChronoRelaisHtml()
240
  );
241
  $result['relaypoints'] = $webservbt;
app/code/community/Chronopost/Chronorelais/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <Chronopost_Chronorelais>
5
- <version>1.0.5</version>
6
  <depends>
7
  <Mage_Shipping />
8
  <Mage_Sales />
@@ -90,7 +90,7 @@
90
  <chronopost_chronorelais_sales_order_shipment>
91
  <from><![CDATA[#^/.*sales_order_shipment/save/#]]>
92
  </from>
93
- <to>/chronorelais/sales_order_shipment/save/</to>
94
  </chronopost_chronorelais_sales_order_shipment>
95
  </rewrite>
96
 
@@ -154,7 +154,7 @@
154
  </translate>
155
  </frontend>
156
 
157
- <admin>
158
  <routers>
159
  <chronorelais>
160
  <use>admin</use>
@@ -164,7 +164,7 @@
164
  </args>
165
  </chronorelais>
166
  </routers>
167
- </admin>
168
 
169
  <adminhtml>
170
  <layout>
@@ -183,22 +183,22 @@
183
  <children>
184
  <export translate="title">
185
  <title>Export</title>
186
- <action>chronorelais/export</action>
187
  <sort_order>10</sort_order>
188
  </export>
189
  <import translate="title">
190
  <title>Import</title>
191
- <action>chronorelais/import</action>
192
  <sort_order>20</sort_order>
193
  </import>
194
  <impression translate="title" module="sales">
195
  <title>Impression des étiquettes</title>
196
- <action>chronorelais/sales_impression</action>
197
  <sort_order>30</sort_order>
198
  </impression>
199
  <bordereau translate="title" module="sales">
200
  <title>Bordereau de fin de journée</title>
201
- <action>chronorelais/sales_bordereau</action>
202
  <sort_order>40</sort_order>
203
  </bordereau>
204
  </children>
@@ -261,6 +261,18 @@
261
 
262
  </adminhtml>
263
 
 
 
 
 
 
 
 
 
 
 
 
 
264
  <default>
265
  <chronorelais>
266
  <shipping>
2
  <config>
3
  <modules>
4
  <Chronopost_Chronorelais>
5
+ <version>1.0.6</version>
6
  <depends>
7
  <Mage_Shipping />
8
  <Mage_Sales />
90
  <chronopost_chronorelais_sales_order_shipment>
91
  <from><![CDATA[#^/.*sales_order_shipment/save/#]]>
92
  </from>
93
+ <to>/admin/chronorelais_sales_order_shipment/save/</to>
94
  </chronopost_chronorelais_sales_order_shipment>
95
  </rewrite>
96
 
154
  </translate>
155
  </frontend>
156
 
157
+ <!-- <admin>
158
  <routers>
159
  <chronorelais>
160
  <use>admin</use>
164
  </args>
165
  </chronorelais>
166
  </routers>
167
+ </admin> -->
168
 
169
  <adminhtml>
170
  <layout>
183
  <children>
184
  <export translate="title">
185
  <title>Export</title>
186
+ <action>adminhtml/chronorelais_export</action>
187
  <sort_order>10</sort_order>
188
  </export>
189
  <import translate="title">
190
  <title>Import</title>
191
+ <action>adminhtml/chronorelais_import</action>
192
  <sort_order>20</sort_order>
193
  </import>
194
  <impression translate="title" module="sales">
195
  <title>Impression des étiquettes</title>
196
+ <action>adminhtml/chronorelais_sales_impression</action>
197
  <sort_order>30</sort_order>
198
  </impression>
199
  <bordereau translate="title" module="sales">
200
  <title>Bordereau de fin de journée</title>
201
+ <action>adminhtml/chronorelais_sales_bordereau</action>
202
  <sort_order>40</sort_order>
203
  </bordereau>
204
  </children>
261
 
262
  </adminhtml>
263
 
264
+ <admin>
265
+ <routers>
266
+ <adminhtml>
267
+ <args>
268
+ <modules>
269
+ <Chronopost_Chronorelais before="Mage_Adminhtml">Chronopost_Chronorelais_Adminhtml</Chronopost_Chronorelais>
270
+ </modules>
271
+ </args>
272
+ </adminhtml>
273
+ </routers>
274
+ </admin>
275
+
276
  <default>
277
  <chronorelais>
278
  <shipping>
app/code/community/Chronopost/Chronorelais/sql/chronorelais_setup/mysql4-upgrade-1.0.5-1.0.6.php ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ <?php
2
+ $installer = $this;
3
+ $installer->startSetup();
4
+
5
+ $this->endSetup();
app/design/frontend/base/default/template/chronorelais/checkout/onepage/shipping_method.phtml CHANGED
@@ -44,10 +44,9 @@
44
 
45
  $('checkout-shipping-method-load').on('click', 'input[name=shipping_method]', function(event, element) {
46
  var shippingMethodSelected = element.value;
47
- if(shippingMethodSelected=="chronorelais_chronorelais") {
48
- shippingMethod.getrelais('<?php echo $this->getUrl("checkout/onepage/getRelais")?>');
49
- } else {
50
- shippingMethod.hiderelais();
51
  }
52
  });
53
 
44
 
45
  $('checkout-shipping-method-load').on('click', 'input[name=shipping_method]', function(event, element) {
46
  var shippingMethodSelected = element.value;
47
+ shippingMethod.hiderelais();
48
+ if(shippingMethodSelected.indexOf("chronorelais") !== -1) {
49
+ shippingMethod.getrelais('<?php echo $this->getUrl("checkout/onepage/getRelais",shippingMethodSelected)?>');
 
50
  }
51
  });
52
 
app/design/frontend/base/default/template/chronorelais/checkout/onepage/shipping_method/available.phtml CHANGED
@@ -82,7 +82,7 @@
82
  </tr>
83
  </table>
84
  <?php if($code=="chronorelais"): ?>
85
- <div id="checkout-shipping-method-chronorelais-load" class="chronorelais-list">
86
  <?php echo $this->getChildHtml('relaislist') ?>
87
  </div>
88
  <?php endif; ?>
82
  </tr>
83
  </table>
84
  <?php if($code=="chronorelais"): ?>
85
+ <div id="checkout-shipping-method-<?php echo $_rate->getCode() ?>-load" class="chronorelais-list">
86
  <?php echo $this->getChildHtml('relaislist') ?>
87
  </div>
88
  <?php endif; ?>
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Chronopost</name>
4
- <version>1.0.5</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
  <channel>community</channel>
@@ -19,7 +19,7 @@ Afin de vous accompagner dans le d&#xE9;veloppement des sites e-marchands sur la
19
  Le calcul du co&#xFB;t du transport (via logiciel QuickCost)&#xD;
20
  Le suivi int&#xE9;gr&#xE9;&#xD;
21
  Le choix entre 3 solutions possibles d'&#xE9;tiquetage des envois selon les besoins de l'e-commer&#xE7;ant&#xD;
22
- Test&#xE9; et valid&#xE9; sur Magento 1.9.0&#xD;
23
  &#xD;
24
  --&gt; Un manuel d'installation est &#xE0; votre disposition sur Magento Connect afin de vous guider dans l'installation du module. (A lire imp&#xE9;rativement)&#xD;
25
  &#xD;
@@ -27,22 +27,14 @@ ATTENTION : Pour toute mise en production du module Chronopost, un contrat avec
27
  &#xD;
28
  R&#xE9;alisation Adexos&#xD;
29
  &#xD;
30
- Ce module est d&#xE9;velopp&#xE9; &#xE0; partir de l'extension Owebia Shipping 2</description>
31
- <notes>Compatibilit&#xE9; 1.9 valid&#xE9;e, support du th&#xE8;me responsive par d&#xE9;faut de Magento 1.9&#xD;
32
- D&#xE9;placement des templates et skin de default/default vers base/default pour qu'ils puissent &#xEA;tre pris en compte en cas de package / th&#xE8;me personnalis&#xE9; ; voir d&#xE9;tails ci-dessous&#xD;
33
- Ajout de la fonctionnalit&#xE9; de d&#xE9;tection des conflits avec d'autres modules de transport&#xD;
34
- Compatibilit&#xE9; HTTPS de l'appel au Google Maps&#xD;
35
- Possibilit&#xE9; d'utiliser le module Chronorelais sans Google Maps&#xD;
36
- Limitation de la version de Google Maps &#xE0; 3.17 pour pr&#xE9;venir d'une incompatibilit&#xE9; avec prototype 1.7 distribu&#xE9; par Magento&#xD;
37
- Alerte back-office en cas de disponibilit&#xE9; d'une nouvelle version du module&#xD;
38
- Remplacement des URLs de quickcost par d&#xE9;faut (http://wsshipping.chronopost.fr/wsQuickcost/services/ServiceQuickCost?wsdl =&gt; https://www.chronopost.fr/quickcost-cxf/QuickcostServiceWS?wsdl)&#xD;
39
- Adresse du point relais remplac&#xE9;e par celle du client pour les &#xE9;tiquettes de retour&#xD;
40
- Correctifs mineurs (m&#xE9;thode Chronopost_Chronorelais_Helper_Webservice::getMethodIsAllowed, test de Ghostscript avec option '-v', suppression de 'Notices' PHP)&#xD;
41
- </notes>
42
  <authors><author><name>Benjamin GOSSELET</name><user>Chronopost</user><email>bgosselet@adexos.fr</email></author></authors>
43
- <date>2014-12-22</date>
44
- <time>10:00:07</time>
45
- <contents><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="chronorelais"><dir name="bordereau"><file name="grid.phtml" hash="0eca2119f27219d6bb568c2d1f50dbaf"/></dir><dir name="config"><file name="checklogin.phtml" hash="5455c412136bb8aee5dc7376ec7db2e8"/></dir><dir name="import"><file name="form.phtml" hash="356aadf2bb0182b23f7af38888a0cd38"/></dir><file name="notification.phtml" hash="8bada98676c671f4937feb47b26c73fa"/><dir name="sales"><dir name="order"><dir name="view"><dir name="tab"><file name="info.phtml" hash="3c30b03519879b7ef0e5b37f44f4d823"/></dir></dir></dir></dir></dir></dir><dir name="layout"><file name="chronorelais.xml" hash="98a5bb79ecf4b9924dc3157cdada3c67"/></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="chronorelais.xml" hash="c1ffe70e9836bd14e342d8c2c17c3b15"/></dir><dir name="template"><dir name="chronorelais"><dir name="checkout"><dir name="multishipping"><file name="shipping.phtml" hash="89ac65c42722975ec8b872a1e69b5ae9"/><dir name="shipping_method"><file name="chronorelais.phtml" hash="f184ce28e619c185434810545bc82d9f"/></dir></dir><dir name="onepage"><dir name="shipping_method"><file name="available.phtml" hash="6e432bb687e8384cd7a20d282368bbb6"/><file name="chronorelais.phtml" hash="a4b081aae173c01d21cf5b1e69afcbc1"/></dir><file name="shipping_method.phtml" hash="b2710ed8991a3d22bf743ce7a500e999"/></dir></dir><dir name="sales"><dir name="order"><file name="history.phtml" hash="67bfaad7cff5ab92b5bd1c00581c6a8f"/><file name="recent.phtml" hash="7288560d442eadf3d8c19a40f80a9765"/></dir></dir></dir></dir></dir></dir></dir></target><target name="magecommunity"><dir name="Chronopost"><dir name="Chronorelais"><dir name="Block"><dir name="Adminhtml"><file name="Notification.php" hash="7f8d18949d90c2a21d9b5b4fa28f3952"/><dir name="System"><dir name="Config"><file name="Checklogin.php" hash="163f40010cc47a564a7655ede95d73b0"/><dir name="Form"><dir name="Field"><file name="Config.php" hash="b38741ddd97fcae5dd276239fb3c6b70"/><file name="Enabled.php" hash="c04ab5ade5716bdb3da170961215d7bf"/></dir><file name="Fieldsetassurance.php" hash="b5dbc90058d4d2cd8365965e2a2dc821"/><file name="Fieldsetconflicts.php" hash="d7eef1a172e60d7212ed388b85a22574"/></dir></dir></dir></dir><dir name="Checkout"><dir name="Multishipping"><dir name="Shipping"><dir name="Method"><file name="Chronorelais.php" hash="867238885e2aee05a729ba2e8b6f5d51"/></dir></dir></dir><dir name="Onepage"><dir name="Shipping"><dir name="Method"><file name="Chronorelais.php" hash="2abbc99d42ac0b6d3c97a4de32130cd6"/></dir></dir></dir></dir><file name="Detail.php" hash="42437d3c2c262e10f62e7b83ad73ccad"/><dir name="Export"><dir name="Orders"><file name="Grid.php" hash="79c4b566772f3d2b21d712b963c34b48"/></dir><file name="Orders.php" hash="9ada10bd85cb58122e722b3e82c71e37"/></dir><file name="Filter.php" hash="07712e19ee91e331e8e141d075a787a3"/><dir name="Import"><file name="Form.php" hash="56c6e3787c05e58d57b48ec4b1421468"/></dir><dir name="Sales"><dir name="Bordereau"><file name="Grid.php" hash="70b124d41c6e8c7a4f02bc9b607c9ebb"/></dir><file name="Bordereau.php" hash="699028f61947ea13f6939c2d2e1be01d"/><file name="Impression.php" hash="619599b136b9cc49f01dba5b08ee8428"/><dir name="Order"><dir name="Shipment"><file name="View.php" hash="826e9972daef7b7d8e6d92ed83449aaf"/></dir></dir><dir name="Shipment"><dir name="Grid"><dir name="Renderer"><file name="Retoursav.php" hash="c3a1fb0229bc2a4fa4d24d5808f58114"/></dir></dir><file name="Grid.php" hash="542fc30fe5d9f299ac55519ce9359e8f"/></dir></dir></dir><dir name="Controller"><file name="Abstract.php" hash="94680cd88c6af59764dedb613b08d5f6"/></dir><dir name="Helper"><file name="Conflicts.php" hash="e34d9c718f4941df85d05f709baf1e11"/><file name="Data.php" hash="4a3b9a2df40170dc46e0b5583f4de21f"/><file name="Webservice.php" hash="53c94c2612ba43df05dd495bd7c89279"/></dir><dir name="Model"><dir name="Carrier"><file name="AbstractChronorelais.php" hash="f4957f6d660c4adb0328f9f2d73da1e2"/><file name="AbstractChronorelaisShipping.php" hash="487657a9d9e1bebba87b9bad313abde0"/><file name="Chronoexpress.php" hash="bc867a6b98966ada549a0b81ec334b64"/><file name="Chronopost.php" hash="c4d4525447d2801d28d921eaedc35a9a"/><file name="ChronopostC10.php" hash="bb642a19103ce9a40ef1725fd5cf22bd"/><file name="ChronopostC18.php" hash="85419f76cf74e93d7385dd98c04587a7"/><file name="ChronopostCClassic.php" hash="2195866755728930b16695d06d06feb1"/><file name="Chronorelais.php" hash="5cfcb83c23d05585fdc50f8b2747fc40"/></dir><dir name="Config"><dir name="Source"><file name="Civility.php" hash="fe6ec6eebe6faffdd0bb65479d91cd5d"/><file name="EndOfLineCharacter.php" hash="3fe6b6069a9efdc29ad0d3f7d1cf4794"/><file name="FieldDelimiter.php" hash="3e023d40aeca50932e62ff97eed6317e"/><file name="FieldSeparator.php" hash="ce30c5974a893bd5467334d574dd578a"/><file name="FileCharset.php" hash="6cc4ebab95735bd121af16e0eedd90d6"/><file name="FileExtension.php" hash="597c3e78e7584bf7c4b7b2ebad6d2a65"/><file name="PrintMode.php" hash="67e8a6e98e12c7e72624ba5322076c00"/><file name="WeightUnit.php" hash="97ed82ddf61e05a094ba1a04982d0010"/></dir></dir><dir name="Sales"><dir name="Quote"><dir name="Address"><dir name="Total"><file name="Shipping.php" hash="fbc2d92286b2df2d2b8f35c018788f4a"/><file name="Shipping.toDel.php" hash="fbc2d92286b2df2d2b8f35c018788f4a"/></dir></dir></dir></dir></dir><dir name="controllers"><file name="AjaxController.php" hash="8f3ecaf7f50a06ffd167f1e4aea2763c"/><dir name="Checkout"><file name="MultishippingController.php" hash="5841817a54f05995454e4b0bbc792f4d"/><file name="OnepageController.php" hash="33e1e6eb3d145e4f0fd8b9e14a8bb076"/></dir><file name="ExportController.php" hash="cd56c718918c650c30a078e90dae0b9c"/><file name="ImportController.php" hash="964bf705b593bede1fc3b93e02fb37f2"/><file name="RelaisController.php" hash="5d48155ddb7cc2d4effbbfdeb4f3946d"/><dir name="Sales"><file name="BordereauController.php" hash="1102091b04b0af8f0d88bb6888f5fffd"/><file name="ImpressionController.php" hash="e1119e044e9521c956768da68bce1b31"/><dir name="Order"><file name="ShipmentController.php" hash="17a8ed4d056abb4d989502a6b5ed443d"/></dir></dir></dir><dir name="etc"><file name="config.xml" hash="2b17e21894eeda5c8a39dd45e67f4877"/><file name="system.xml" hash="6a2a5d899b4fe440ea04acf2e1551b8f"/></dir><dir name="includes"><file name="ChronorelaisShippingHelper.php" hash="8f94b3f4780a6d3211a934b5ebaa53c7"/><file name="countries.inc.php" hash="16888220015fbc818e273d0b64c99742"/></dir><dir name="sql"><dir name="chronorelais_setup"><file name="mysql4-install-0.1.0.php" hash="c307802a7bd10c1ecce06799b04569c2"/><file name="mysql4-upgrade-0.1.0-0.1.1.php" hash="ea3358055a851a96b673c721202045be"/><file name="mysql4-upgrade-0.1.1-0.1.2.php" hash="961f41dc1012d0917504f9bb5f5d106c"/><file name="mysql4-upgrade-0.1.2-0.1.3.php" hash="b85470889421f652c3d01b96072f579c"/><file name="mysql4-upgrade-0.1.3-0.1.4.php" hash="def69d0ae26b0d130d2ce6e0838e5d7f"/></dir></dir></dir></dir></target><target name="magelocale"><dir name="en_US"><file name="Chronopost_Chronorelais.csv" hash="76475aa4fa500c135a666e47bab62ddf"/></dir><dir name="fr_FR"><file name="Chronopost_Chronorelais.csv" hash="a842d358c8f3dcf5b397d0683ac03c38"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="chronorelais"><file name="Logo-Chronopost.jpg" hash="cc1226ebcd7236ce021076657ac22265"/><file name="Picto_Chrono_Relais.png" hash="1ea0f0c410d237adf23d5905cd8431f5"/><file name="ac.png" hash="0c04f70da35d43a2636cfbd6ad2b10d5"/><file name="chronopost.png" hash="51ec3f1b8f0c970749ff24000bf7c162"/><file name="chronorelais.css" hash="c76cc51ae175137605f532fcf6d16588"/><file name="chronorelais.png" hash="b3a8e94469113e5814c268cc6de66a2e"/><file name="chronorelaismap.js" hash="afb57f8faa01720aa64da585c62407d7"/><file name="home.png" hash="7904b495e94047eb3406e260bc660cce"/><file name="ico_ac_shaded.gif" hash="e55d9b2071fb976cf5331b6273a40731"/></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="chronorelais"><file name="chronorelais.css" hash="0a50cd0eebbe49540ad32294b4ffa2bd"/><file name="picto.gif" hash="9b11332763c74ebe43a25f8329b5347b"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="WSChronopost_Chronorelais.xml" hash="e614759d6b46c0c25f6c26d6e9dff45a"/></dir></target><target name="mage"><dir name="js"><dir name="chronopost"><dir name="chronorelais"><file name="chronorelais.js" hash="9c55c7a13327be44a8c4fde0f272fb35"/><file name="ocseditor.css" hash="1bfc847153768d6729cdad7cb1abe443"/><file name="ocseditor.js" hash="8b7f29ddf7faff2fd3a63af18ba666aa"/></dir></dir></dir></target></contents>
46
  <compatible/>
47
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
48
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Chronopost</name>
4
+ <version>1.0.6</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
  <channel>community</channel>
19
  Le calcul du co&#xFB;t du transport (via logiciel QuickCost)&#xD;
20
  Le suivi int&#xE9;gr&#xE9;&#xD;
21
  Le choix entre 3 solutions possibles d'&#xE9;tiquetage des envois selon les besoins de l'e-commer&#xE7;ant&#xD;
22
+ Test&#xE9; et valid&#xE9; sur Magento 1.7.0&#xD;
23
  &#xD;
24
  --&gt; Un manuel d'installation est &#xE0; votre disposition sur Magento Connect afin de vous guider dans l'installation du module. (A lire imp&#xE9;rativement)&#xD;
25
  &#xD;
27
  &#xD;
28
  R&#xE9;alisation Adexos&#xD;
29
  &#xD;
30
+ Ce module est d&#xE9;vellop&#xE9; &#xE0; partir de l'extension Owebia Shipping 2</description>
31
+ <notes>Version destin&#xE9;e &#xE0; Magento 1.6.X et sup&#xE9;rieures. &#xD;
32
+ Compatibilit&#xE9; 1.9.2.2 valid&#xE9;e&#xD;
33
+ Compatibilit&#xE9; patch SUPEE-6788 valid&#xE9;e</notes>
 
 
 
 
 
 
 
 
34
  <authors><author><name>Benjamin GOSSELET</name><user>Chronopost</user><email>bgosselet@adexos.fr</email></author></authors>
35
+ <date>2015-11-02</date>
36
+ <time>10:33:27</time>
37
+ <contents><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="chronorelais"><dir name="bordereau"><file name="grid.phtml" hash="0eca2119f27219d6bb568c2d1f50dbaf"/></dir><dir name="config"><file name="checklogin.phtml" hash="5455c412136bb8aee5dc7376ec7db2e8"/></dir><dir name="import"><file name="form.phtml" hash="356aadf2bb0182b23f7af38888a0cd38"/></dir><file name="notification.phtml" hash="8bada98676c671f4937feb47b26c73fa"/><dir name="sales"><dir name="order"><dir name="view"><dir name="tab"><file name="info.phtml" hash="3c30b03519879b7ef0e5b37f44f4d823"/></dir></dir></dir></dir></dir></dir><dir name="layout"><file name="chronorelais.xml" hash="98a5bb79ecf4b9924dc3157cdada3c67"/></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="chronorelais.xml" hash="c1ffe70e9836bd14e342d8c2c17c3b15"/></dir><dir name="template"><dir name="chronorelais"><dir name="checkout"><dir name="multishipping"><file name="shipping.phtml" hash="89ac65c42722975ec8b872a1e69b5ae9"/><dir name="shipping_method"><file name="chronorelais.phtml" hash="f184ce28e619c185434810545bc82d9f"/></dir></dir><dir name="onepage"><dir name="shipping_method"><file name="available.phtml" hash="bd2eaf26a8a36d1242cf223f9d23afdd"/><file name="chronorelais.phtml" hash="a4b081aae173c01d21cf5b1e69afcbc1"/></dir><file name="shipping_method.phtml" hash="4348e52db5ead38a394a8fc9745401f7"/></dir></dir><dir name="sales"><dir name="order"><file name="history.phtml" hash="67bfaad7cff5ab92b5bd1c00581c6a8f"/><file name="recent.phtml" hash="7288560d442eadf3d8c19a40f80a9765"/></dir></dir></dir></dir></dir></dir></dir></target><target name="magecommunity"><dir name="Chronopost"><dir name="Chronorelais"><dir name="Block"><dir name="Adminhtml"><file name="Notification.php" hash="7f8d18949d90c2a21d9b5b4fa28f3952"/><dir name="System"><dir name="Config"><file name="Checklogin.php" hash="bfe3de1607667907bf00acd3b40173e1"/><dir name="Form"><dir name="Field"><file name="Config.php" hash="7ca98f1ceb10927692fb390ff2a3b57b"/><file name="Enabled.php" hash="c04ab5ade5716bdb3da170961215d7bf"/></dir><file name="Fieldsetassurance.php" hash="b5dbc90058d4d2cd8365965e2a2dc821"/><file name="Fieldsetconflicts.php" hash="851f7a61b1afb08191a1064cd747f205"/></dir></dir></dir></dir><dir name="Checkout"><dir name="Multishipping"><dir name="Shipping"><dir name="Method"><file name="Chronorelais.php" hash="867238885e2aee05a729ba2e8b6f5d51"/></dir></dir></dir><dir name="Onepage"><dir name="Shipping"><dir name="Method"><file name="Chronorelais.php" hash="2abbc99d42ac0b6d3c97a4de32130cd6"/></dir></dir></dir></dir><file name="Detail.php" hash="42437d3c2c262e10f62e7b83ad73ccad"/><dir name="Export"><dir name="Orders"><file name="Grid.php" hash="4b2d68a9cee481826611f77415d6a369"/></dir><file name="Orders.php" hash="9ada10bd85cb58122e722b3e82c71e37"/></dir><file name="Filter.php" hash="07712e19ee91e331e8e141d075a787a3"/><dir name="Import"><file name="Form.php" hash="56c6e3787c05e58d57b48ec4b1421468"/></dir><dir name="Sales"><dir name="Bordereau"><file name="Grid.php" hash="3d2b43a4e99be375cfcd8d1de774cbbb"/></dir><file name="Bordereau.php" hash="699028f61947ea13f6939c2d2e1be01d"/><file name="Impression.php" hash="619599b136b9cc49f01dba5b08ee8428"/><dir name="Order"><dir name="Shipment"><file name="View.php" hash="d4adb0947144bde5344960d3f3aeae39"/></dir></dir><dir name="Shipment"><dir name="Grid"><dir name="Renderer"><file name="Retoursav.php" hash="c3a1fb0229bc2a4fa4d24d5808f58114"/></dir></dir><file name="Grid.php" hash="ab0438143243e6fc4addae6d417c85d1"/></dir></dir></dir><dir name="Controller"><file name="Abstract.php" hash="94680cd88c6af59764dedb613b08d5f6"/></dir><dir name="Helper"><file name="Conflicts.php" hash="69a512b80518e662db5a3502671f709c"/><file name="Data.php" hash="4a3b9a2df40170dc46e0b5583f4de21f"/><file name="Webservice.php" hash="bf049dc9e225efed9eac2062a14a45fd"/></dir><dir name="Model"><dir name="Carrier"><file name="AbstractChronorelais.php" hash="f4957f6d660c4adb0328f9f2d73da1e2"/><file name="AbstractChronorelaisShipping.php" hash="487657a9d9e1bebba87b9bad313abde0"/><file name="Chronoexpress.php" hash="bc867a6b98966ada549a0b81ec334b64"/><file name="Chronopost.php" hash="c4d4525447d2801d28d921eaedc35a9a"/><file name="ChronopostC10.php" hash="bb642a19103ce9a40ef1725fd5cf22bd"/><file name="ChronopostC18.php" hash="85419f76cf74e93d7385dd98c04587a7"/><file name="ChronopostCClassic.php" hash="2195866755728930b16695d06d06feb1"/><file name="Chronorelais.php" hash="5cfcb83c23d05585fdc50f8b2747fc40"/></dir><dir name="Config"><dir name="Source"><file name="Civility.php" hash="fe6ec6eebe6faffdd0bb65479d91cd5d"/><file name="EndOfLineCharacter.php" hash="3fe6b6069a9efdc29ad0d3f7d1cf4794"/><file name="FieldDelimiter.php" hash="3e023d40aeca50932e62ff97eed6317e"/><file name="FieldSeparator.php" hash="ce30c5974a893bd5467334d574dd578a"/><file name="FileCharset.php" hash="6cc4ebab95735bd121af16e0eedd90d6"/><file name="FileExtension.php" hash="597c3e78e7584bf7c4b7b2ebad6d2a65"/><file name="PrintMode.php" hash="67e8a6e98e12c7e72624ba5322076c00"/><file name="WeightUnit.php" hash="97ed82ddf61e05a094ba1a04982d0010"/></dir></dir><dir name="Sales"><dir name="Quote"><dir name="Address"><dir name="Total"><file name="Shipping.php" hash="fbc2d92286b2df2d2b8f35c018788f4a"/><file name="Shipping.toDel.php" hash="fbc2d92286b2df2d2b8f35c018788f4a"/></dir></dir></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><dir name="Chronorelais"><file name="AjaxController.php" hash="702594670710011b8f3bea7730bfbb96"/><file name="ExportController.php" hash="9349246617748b038d153fd1979ad12c"/><file name="ImportController.php" hash="31c27aac46929eaabc84eab2b84756cd"/><dir name="Sales"><file name="BordereauController.php" hash="621f16a402dbf123a83c3e28818c695f"/><file name="ImpressionController.php" hash="9efe9e6931c68dadf3da4f32ce05d1ed"/><dir name="Order"><file name="ShipmentController.php" hash="95e035ac65870ea536b9912a65eb45a3"/></dir></dir></dir></dir><dir name="Checkout"><file name="MultishippingController.php" hash="5841817a54f05995454e4b0bbc792f4d"/><file name="OnepageController.php" hash="03f6694c1d0fe133e3f163a4259b9f33"/></dir><file name="RelaisController.php" hash="5d48155ddb7cc2d4effbbfdeb4f3946d"/></dir><dir name="etc"><file name="config.xml" hash="a0586362ebe76c5b7eadbac85e0e836e"/><file name="system.xml" hash="6a2a5d899b4fe440ea04acf2e1551b8f"/></dir><dir name="includes"><file name="ChronorelaisShippingHelper.php" hash="8f94b3f4780a6d3211a934b5ebaa53c7"/><file name="countries.inc.php" hash="16888220015fbc818e273d0b64c99742"/></dir><dir name="sql"><dir name="chronorelais_setup"><file name="mysql4-install-0.1.0.php" hash="c307802a7bd10c1ecce06799b04569c2"/><file name="mysql4-upgrade-0.1.0-0.1.1.php" hash="ea3358055a851a96b673c721202045be"/><file name="mysql4-upgrade-0.1.1-0.1.2.php" hash="961f41dc1012d0917504f9bb5f5d106c"/><file name="mysql4-upgrade-0.1.2-0.1.3.php" hash="b85470889421f652c3d01b96072f579c"/><file name="mysql4-upgrade-0.1.3-0.1.4.php" hash="def69d0ae26b0d130d2ce6e0838e5d7f"/><file name="mysql4-upgrade-1.0.5-1.0.6.php" hash="7d1d19a43760514300c096315a61c42e"/></dir></dir></dir></dir></target><target name="magelocale"><dir name="en_US"><file name="Chronopost_Chronorelais.csv" hash="76475aa4fa500c135a666e47bab62ddf"/></dir><dir name="fr_FR"><file name="Chronopost_Chronorelais.csv" hash="a842d358c8f3dcf5b397d0683ac03c38"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="chronorelais"><file name="Logo-Chronopost.jpg" hash="cc1226ebcd7236ce021076657ac22265"/><file name="Picto_Chrono_Relais.png" hash="1ea0f0c410d237adf23d5905cd8431f5"/><file name="ac.png" hash="0c04f70da35d43a2636cfbd6ad2b10d5"/><file name="chronopost.png" hash="51ec3f1b8f0c970749ff24000bf7c162"/><file name="chronorelais.css" hash="c76cc51ae175137605f532fcf6d16588"/><file name="chronorelais.png" hash="b3a8e94469113e5814c268cc6de66a2e"/><file name="chronorelaismap.js" hash="d4d405aa5c7ae196cd8beb1655f02c78"/><file name="home.png" hash="7904b495e94047eb3406e260bc660cce"/><file name="ico_ac_shaded.gif" hash="e55d9b2071fb976cf5331b6273a40731"/></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="chronorelais"><file name="chronorelais.css" hash="0a50cd0eebbe49540ad32294b4ffa2bd"/><file name="picto.gif" hash="9b11332763c74ebe43a25f8329b5347b"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="WSChronopost_Chronorelais.xml" hash="e614759d6b46c0c25f6c26d6e9dff45a"/></dir></target><target name="mage"><dir name="js"><dir name="chronopost"><dir name="chronorelais"><file name="chronorelais.js" hash="9c55c7a13327be44a8c4fde0f272fb35"/><file name="ocseditor.css" hash="1bfc847153768d6729cdad7cb1abe443"/><file name="ocseditor.js" hash="8b7f29ddf7faff2fd3a63af18ba666aa"/></dir></dir></dir></target></contents>
38
  <compatible/>
39
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
40
  </package>
skin/frontend/base/default/chronorelais/chronorelaismap.js CHANGED
@@ -13,24 +13,24 @@ function loadMyPoint(i) {
13
 
14
  var bounds = new google.maps.LatLngBounds();
15
  function loadRelayMap(address, relaisArray, nextpt, mapid) {
16
- var geo = new google.maps.Geocoder();
17
-
18
  var myOptions = {
19
  zoom: 5,
20
  center: new google.maps.LatLng(47.37285025362682, 2.4172996312499784),
21
  mapTypeId: google.maps.MapTypeId.ROADMAP
22
  }
23
  map = new google.maps.Map(document.getElementById(mapid), myOptions);
24
-
25
  var blueIcon = new google.maps.MarkerImage(Picto_Chrono_Relais);
26
-
27
  var homeIcon = new google.maps.MarkerImage(Home_Chrono_Icon);
28
-
29
  if(!homeaddress && !hidehomeicon) {
30
  var ship_address = getShipAddress(); //get shipping address to set home address
31
  homeaddress = relaisArray.codePostal + " " + relaisArray.localite;
32
  if(ship_address) { homeaddress = ship_address+" "+homeaddress; }
33
-
34
  geo.geocode({'address': homeaddress}, function(results, status) {
35
  if (status == google.maps.GeocoderStatus.OK) {
36
  var point = results[0].geometry.location;
@@ -42,7 +42,7 @@ function loadRelayMap(address, relaisArray, nextpt, mapid) {
42
  });
43
  map.setCenter(point, 11);
44
  }
45
- });
46
  }
47
 
48
  function createTabbedMarker(point, relaisArray) {
@@ -50,7 +50,7 @@ function loadRelayMap(address, relaisArray, nextpt, mapid) {
50
  var label = nextpt;
51
  var relaypoint_id = relaisArray.identifiantChronopostPointA2PAS;
52
  var marker = new google.maps.Marker({map: map, position: point, title:relaisArray.nomEnseigne, icon:blueIcon});
53
-
54
  var infowindow;
55
  if (window.innerWidth < 700) {
56
  infowindow = new google.maps.InfoWindow({
@@ -61,39 +61,39 @@ function loadRelayMap(address, relaisArray, nextpt, mapid) {
61
  content: '<div style="width: 400px;"><div style="width: 190px; float: left;"><h2>Infos</h2>'+getMarkerInfoContent(relaisArray) + getActionsForm(addressrelais.length)+'</div><div style="margin-left: 10px; padding-left: 10px; border-left: 1px solid #000; float: left;"><h2>Horaires</h2><div style="width: 189px">'+getHorairesTab(relaisArray, true)+'</div></div></div>'
62
  });
63
  }
64
-
65
  google.maps.event.addListener(marker, 'click', function() {
66
  if(document.getElementById('s_method_chronorelais_'+relaisArray.identifiantChronopostPointA2PAS))
67
  document.getElementById('s_method_chronorelais_'+relaisArray.identifiantChronopostPointA2PAS).checked = true;
68
-
69
  if (currentInfoWindow) {
70
  currentInfoWindow.close();
71
  }
72
  infowindow.open(map,marker);
73
  currentInfoWindow = infowindow;
74
  });
75
-
76
  gmarkers[relaypoint_id] = marker;
77
  return marker;
78
  }
79
 
80
  function showAddress(address, relaisArray) {
81
  var search = address;
82
- // ====== Perform the Geocoding ======
83
  geo.geocode({'address': search}, function(results, status)
84
- {
85
  // If that was successful
86
  if (status == google.maps.GeocoderStatus.OK) {
87
  // Loop through the results, placing markers
88
  //for (var i=0; i<result.Placemark.length; i++) {
89
- for (var i=0; i<1; i++) {
90
  var p = results[i].geometry.location;
91
  relaylatan.push(p);
92
  var marker = createTabbedMarker(p, relaisArray);
93
  // ==== Each time a point is found, extent the bounds ato include it =====
94
  bounds.extend(p);
95
  }
96
- // centre the map on the first result
97
  //!homeaddress && hidehomeicon &&
98
  if(nextpt==5) {
99
  var p = results[0].geometry.location;
@@ -109,7 +109,7 @@ function loadRelayMap(address, relaisArray, nextpt, mapid) {
109
  /*
110
  if (reasons[status]) {
111
  reason = reasons[status]
112
- }
113
  */
114
  alert('Could not find "' + search + '" ' + reason);
115
  }
@@ -123,9 +123,9 @@ function addEvent( obj, type, fn ) {
123
  obj["e"+type+fn] = fn;
124
  obj[type+fn] = function() { obj["e"+type+fn]( window.event ) };
125
  obj.attachEvent( "on"+type, obj[type+fn] );
126
- }
127
  else{
128
- obj.addEventListener( type, fn, false );
129
  }
130
  }
131
 
@@ -133,9 +133,9 @@ function getMarkerInfoContent(relaisArray){
133
  var icoPath = Picto_Chrono_Relais;
134
  var content="<div class=\"sw-map-adresse-wrp\" style=\"background-image: url("+ icoPath +"); background-repeat: no-repeat;padding-left:50px;\">"
135
  + "<h2>"+relaisArray.nomEnseigne+"</h2>"
136
- + "<div class=\"sw-map-adresse\">"
137
- + parseAdresse(relaisArray)
138
- + relaisArray.codePostal + " " + relaisArray.localite
139
  + "</div></div>";
140
  return content;
141
  }
@@ -154,7 +154,7 @@ function getHorairesTab(anArray, highlight)
154
  var rs = "" ;
155
  rs = "<table id=\"sw-table-horaire\" class=\"sw-table\"";
156
  if(msie) {
157
- rs += " style=\"width:auto;\"";
158
  }
159
  rs += ">"
160
  + "<tr><td>Lun:</td>"+ parseHorairesOuverture(anArray.horairesOuvertureLundi, 1, highlight) +"</tr>"
@@ -167,7 +167,7 @@ function getHorairesTab(anArray, highlight)
167
  + "</table>" ;
168
  return rs ;
169
  }
170
-
171
  function parseAdresse(anArray)
172
  {
173
  var address = anArray.adresse1 + "<br />" ;
@@ -176,19 +176,19 @@ function parseAdresse(anArray)
176
  if (anArray.adresse3)
177
  address += anArray.adresse3 + "<br />" ;
178
  return address ;
179
- }
180
 
181
  function parseHorairesOuverture(value , day, highlight)
182
  {
183
  var rs = "" ;
184
-
185
  var now = new Date() ;
186
  var today = now.getDay() ; // number of day
187
- var attributedCell = "" ;
188
  var reg = new RegExp(" ", "g");
189
 
190
  var horaires = value.split(reg) ;
191
-
192
  for (var i=0; i < horaires.length; i++)
193
  {
194
  // first define the attributes for the current cell
@@ -204,7 +204,7 @@ function parseHorairesOuverture(value , day, highlight)
204
  /*
205
  }
206
  */
207
-
208
  // so, re-format time
209
  if (horaires[i] == "00:00-00:00")
210
  {
@@ -214,17 +214,17 @@ function parseHorairesOuverture(value , day, highlight)
214
  {
215
  horaires[i] = "<td "+attributedCell+">"+horaires[i]+"</td>" ;
216
  }
217
-
218
  // yeah, concatenates result to the returned value
219
  rs += horaires[i] ;
220
  }
221
-
222
  return rs ;
223
  }
224
 
225
  function printPage(i)
226
  {
227
- var fen=open("","Impression");
228
  fen.focus();
229
  var baseURL = "http://www.chronopost.fr/transport-express/webdav/site/chronov4/groups/administrators/public/Chronomaps/" ;
230
  var latlngpoint = relaylatan[i-1];
@@ -264,7 +264,7 @@ function btQueryString(anArray, needEscape)
264
  rs += key +"=" + anArray[key] ;
265
  }
266
  }
267
- }
268
  return rs ;
269
  }
270
 
@@ -330,7 +330,7 @@ ShippingMethod.prototype = {
330
 
331
  for (var i=0; i<methods.length; i++) {
332
  if (methods[i].checked) {
333
- if (methods[i].value == 'chronorelais_chronorelais') {
334
  var submethods = document.getElementsByName('shipping_method_chronorelais');
335
  if (submethods.length==0) {
336
  alert(Translator.translate('Your order cannot be completed at this time as there is no shipping methods available for it. Please make neccessary changes in your shipping address.'));
@@ -367,7 +367,7 @@ ShippingMethod.prototype = {
367
  );
368
  //}
369
  },
370
-
371
  changePostalCode: function(url){
372
  if (checkout.loadWaiting!=false) return;
373
  //if (this.validate()) {
@@ -389,11 +389,13 @@ ShippingMethod.prototype = {
389
  );
390
  //}
391
  },
392
-
393
  hiderelais: function(url){
394
- if($('checkout-shipping-method-chronorelais-load')) {
395
- $('checkout-shipping-method-chronorelais-load').innerHTML = "";
396
- }
 
 
397
  },
398
 
399
  save: function(){
@@ -427,7 +429,7 @@ ShippingMethod.prototype = {
427
  response = {};
428
  }
429
  }
430
-
431
  if (response.error) {
432
  alert(response.message);
433
  if($('mappostalcodebtn')) { $('mappostalcodebtn').show(); }
@@ -438,7 +440,7 @@ ShippingMethod.prototype = {
438
  if (response.update_section) {
439
  $('checkout-'+response.update_section.name+'-load').update(response.update_section.html);
440
  response.update_section.html.evalScripts();
441
-
442
  if(response.relaypoints) {
443
  if(response.relaypoints.length>0) {
444
  var relayaddress = "";
@@ -499,9 +501,9 @@ MultiShippingMethod.prototype = {
499
  onComplete: this.onComplete
500
  }
501
  );
502
-
503
  },
504
-
505
  changePostalCode: function(url, index){
506
  if (this.loadWaiting!=false) return;
507
  this.loadWaiting = true;
@@ -520,7 +522,7 @@ MultiShippingMethod.prototype = {
520
  }
521
  );
522
  },
523
-
524
  hiderelais: function(url, index){
525
  if($('checkout-shipping-method-chronorelais-load_' + index)) {
526
  $('checkout-shipping-method-chronorelais-load_' + index).innerHTML = "";
@@ -529,7 +531,7 @@ MultiShippingMethod.prototype = {
529
 
530
  complete: function(transport){
531
  this.loadWaiting = false;
532
-
533
  if (transport && transport.responseText){
534
  try{
535
  response = eval('(' + transport.responseText + ')');
@@ -538,18 +540,18 @@ MultiShippingMethod.prototype = {
538
  response = {};
539
  }
540
  }
541
-
542
  if (response.error) {
543
  alert(response.message);
544
  if($('mappostalcodebtn' + multiindex)) { $('mappostalcodebtn' + multiindex).show(); }
545
  if($('postalcode-please-wait' + multiindex)) { $('postalcode-please-wait' + multiindex).hide(); }
546
  return false;
547
  }
548
-
549
  if (response.update_section) {
550
  $(response.update_section.name).update(response.update_section.html);
551
  response.update_section.html.evalScripts();
552
-
553
  if(response.relaypoints) {
554
  if(response.relaypoints.length>0) {
555
  var relayaddress = "";
13
 
14
  var bounds = new google.maps.LatLngBounds();
15
  function loadRelayMap(address, relaisArray, nextpt, mapid) {
16
+ var geo = new google.maps.Geocoder();
17
+
18
  var myOptions = {
19
  zoom: 5,
20
  center: new google.maps.LatLng(47.37285025362682, 2.4172996312499784),
21
  mapTypeId: google.maps.MapTypeId.ROADMAP
22
  }
23
  map = new google.maps.Map(document.getElementById(mapid), myOptions);
24
+
25
  var blueIcon = new google.maps.MarkerImage(Picto_Chrono_Relais);
26
+
27
  var homeIcon = new google.maps.MarkerImage(Home_Chrono_Icon);
28
+
29
  if(!homeaddress && !hidehomeicon) {
30
  var ship_address = getShipAddress(); //get shipping address to set home address
31
  homeaddress = relaisArray.codePostal + " " + relaisArray.localite;
32
  if(ship_address) { homeaddress = ship_address+" "+homeaddress; }
33
+
34
  geo.geocode({'address': homeaddress}, function(results, status) {
35
  if (status == google.maps.GeocoderStatus.OK) {
36
  var point = results[0].geometry.location;
42
  });
43
  map.setCenter(point, 11);
44
  }
45
+ });
46
  }
47
 
48
  function createTabbedMarker(point, relaisArray) {
50
  var label = nextpt;
51
  var relaypoint_id = relaisArray.identifiantChronopostPointA2PAS;
52
  var marker = new google.maps.Marker({map: map, position: point, title:relaisArray.nomEnseigne, icon:blueIcon});
53
+
54
  var infowindow;
55
  if (window.innerWidth < 700) {
56
  infowindow = new google.maps.InfoWindow({
61
  content: '<div style="width: 400px;"><div style="width: 190px; float: left;"><h2>Infos</h2>'+getMarkerInfoContent(relaisArray) + getActionsForm(addressrelais.length)+'</div><div style="margin-left: 10px; padding-left: 10px; border-left: 1px solid #000; float: left;"><h2>Horaires</h2><div style="width: 189px">'+getHorairesTab(relaisArray, true)+'</div></div></div>'
62
  });
63
  }
64
+
65
  google.maps.event.addListener(marker, 'click', function() {
66
  if(document.getElementById('s_method_chronorelais_'+relaisArray.identifiantChronopostPointA2PAS))
67
  document.getElementById('s_method_chronorelais_'+relaisArray.identifiantChronopostPointA2PAS).checked = true;
68
+
69
  if (currentInfoWindow) {
70
  currentInfoWindow.close();
71
  }
72
  infowindow.open(map,marker);
73
  currentInfoWindow = infowindow;
74
  });
75
+
76
  gmarkers[relaypoint_id] = marker;
77
  return marker;
78
  }
79
 
80
  function showAddress(address, relaisArray) {
81
  var search = address;
82
+ // ====== Perform the Geocoding ======
83
  geo.geocode({'address': search}, function(results, status)
84
+ {
85
  // If that was successful
86
  if (status == google.maps.GeocoderStatus.OK) {
87
  // Loop through the results, placing markers
88
  //for (var i=0; i<result.Placemark.length; i++) {
89
+ for (var i=0; i<1; i++) {
90
  var p = results[i].geometry.location;
91
  relaylatan.push(p);
92
  var marker = createTabbedMarker(p, relaisArray);
93
  // ==== Each time a point is found, extent the bounds ato include it =====
94
  bounds.extend(p);
95
  }
96
+ // centre the map on the first result
97
  //!homeaddress && hidehomeicon &&
98
  if(nextpt==5) {
99
  var p = results[0].geometry.location;
109
  /*
110
  if (reasons[status]) {
111
  reason = reasons[status]
112
+ }
113
  */
114
  alert('Could not find "' + search + '" ' + reason);
115
  }
123
  obj["e"+type+fn] = fn;
124
  obj[type+fn] = function() { obj["e"+type+fn]( window.event ) };
125
  obj.attachEvent( "on"+type, obj[type+fn] );
126
+ }
127
  else{
128
+ obj.addEventListener( type, fn, false );
129
  }
130
  }
131
 
133
  var icoPath = Picto_Chrono_Relais;
134
  var content="<div class=\"sw-map-adresse-wrp\" style=\"background-image: url("+ icoPath +"); background-repeat: no-repeat;padding-left:50px;\">"
135
  + "<h2>"+relaisArray.nomEnseigne+"</h2>"
136
+ + "<div class=\"sw-map-adresse\">"
137
+ + parseAdresse(relaisArray)
138
+ + relaisArray.codePostal + " " + relaisArray.localite
139
  + "</div></div>";
140
  return content;
141
  }
154
  var rs = "" ;
155
  rs = "<table id=\"sw-table-horaire\" class=\"sw-table\"";
156
  if(msie) {
157
+ rs += " style=\"width:auto;\"";
158
  }
159
  rs += ">"
160
  + "<tr><td>Lun:</td>"+ parseHorairesOuverture(anArray.horairesOuvertureLundi, 1, highlight) +"</tr>"
167
  + "</table>" ;
168
  return rs ;
169
  }
170
+
171
  function parseAdresse(anArray)
172
  {
173
  var address = anArray.adresse1 + "<br />" ;
176
  if (anArray.adresse3)
177
  address += anArray.adresse3 + "<br />" ;
178
  return address ;
179
+ }
180
 
181
  function parseHorairesOuverture(value , day, highlight)
182
  {
183
  var rs = "" ;
184
+
185
  var now = new Date() ;
186
  var today = now.getDay() ; // number of day
187
+ var attributedCell = "" ;
188
  var reg = new RegExp(" ", "g");
189
 
190
  var horaires = value.split(reg) ;
191
+
192
  for (var i=0; i < horaires.length; i++)
193
  {
194
  // first define the attributes for the current cell
204
  /*
205
  }
206
  */
207
+
208
  // so, re-format time
209
  if (horaires[i] == "00:00-00:00")
210
  {
214
  {
215
  horaires[i] = "<td "+attributedCell+">"+horaires[i]+"</td>" ;
216
  }
217
+
218
  // yeah, concatenates result to the returned value
219
  rs += horaires[i] ;
220
  }
221
+
222
  return rs ;
223
  }
224
 
225
  function printPage(i)
226
  {
227
+ var fen=open("","Impression");
228
  fen.focus();
229
  var baseURL = "http://www.chronopost.fr/transport-express/webdav/site/chronov4/groups/administrators/public/Chronomaps/" ;
230
  var latlngpoint = relaylatan[i-1];
264
  rs += key +"=" + anArray[key] ;
265
  }
266
  }
267
+ }
268
  return rs ;
269
  }
270
 
330
 
331
  for (var i=0; i<methods.length; i++) {
332
  if (methods[i].checked) {
333
+ if (methods[i].value.indexOf('chronorelais') != -1) {
334
  var submethods = document.getElementsByName('shipping_method_chronorelais');
335
  if (submethods.length==0) {
336
  alert(Translator.translate('Your order cannot be completed at this time as there is no shipping methods available for it. Please make neccessary changes in your shipping address.'));
367
  );
368
  //}
369
  },
370
+
371
  changePostalCode: function(url){
372
  if (checkout.loadWaiting!=false) return;
373
  //if (this.validate()) {
389
  );
390
  //}
391
  },
392
+
393
  hiderelais: function(url){
394
+ if($$('.chronorelais-list')) {
395
+ $$('.chronorelais-list').each(function(element) {
396
+ element.innerHTML = "";
397
+ });
398
+ }
399
  },
400
 
401
  save: function(){
429
  response = {};
430
  }
431
  }
432
+
433
  if (response.error) {
434
  alert(response.message);
435
  if($('mappostalcodebtn')) { $('mappostalcodebtn').show(); }
440
  if (response.update_section) {
441
  $('checkout-'+response.update_section.name+'-load').update(response.update_section.html);
442
  response.update_section.html.evalScripts();
443
+
444
  if(response.relaypoints) {
445
  if(response.relaypoints.length>0) {
446
  var relayaddress = "";
501
  onComplete: this.onComplete
502
  }
503
  );
504
+
505
  },
506
+
507
  changePostalCode: function(url, index){
508
  if (this.loadWaiting!=false) return;
509
  this.loadWaiting = true;
522
  }
523
  );
524
  },
525
+
526
  hiderelais: function(url, index){
527
  if($('checkout-shipping-method-chronorelais-load_' + index)) {
528
  $('checkout-shipping-method-chronorelais-load_' + index).innerHTML = "";
531
 
532
  complete: function(transport){
533
  this.loadWaiting = false;
534
+
535
  if (transport && transport.responseText){
536
  try{
537
  response = eval('(' + transport.responseText + ')');
540
  response = {};
541
  }
542
  }
543
+
544
  if (response.error) {
545
  alert(response.message);
546
  if($('mappostalcodebtn' + multiindex)) { $('mappostalcodebtn' + multiindex).show(); }
547
  if($('postalcode-please-wait' + multiindex)) { $('postalcode-please-wait' + multiindex).hide(); }
548
  return false;
549
  }
550
+
551
  if (response.update_section) {
552
  $(response.update_section.name).update(response.update_section.html);
553
  response.update_section.html.evalScripts();
554
+
555
  if(response.relaypoints) {
556
  if(response.relaypoints.length>0) {
557
  var relayaddress = "";