Fianet_Sac - Version 1.0.4

Version Notes

fifth official commit

Download this release

Release Info

Developer Magento Core Team
Extension Fianet_Sac
Version 1.0.4
Comparing to
See all releases


Code changes from version 1.0.3 to 1.0.4

Files changed (41) hide show
  1. app/code/community/Fianet/Sac/Block/Adminhtml/Payment/Configuration.php +1 -1
  2. app/code/community/Fianet/Sac/Block/Adminhtml/Payment/Edit/Form.php +2 -2
  3. app/code/community/Fianet/Sac/Helper/Data.php +1 -1
  4. app/code/community/Fianet/Sac/Helper/Order.php +34 -23
  5. app/code/community/Fianet/Sac/Model/Action.php +12 -12
  6. app/code/community/Fianet/Sac/Model/Fianet/Order/Info/Sac.php +3 -4
  7. app/code/community/Fianet/Sac/Model/Fianet/Order/Sac.php +124 -44
  8. app/code/community/Fianet/Sac/Model/Mysql4/Payment/Association.php +1 -1
  9. app/code/community/Fianet/Sac/Model/Mysql4/Payment/Association/Collection.php +1 -1
  10. app/code/community/Fianet/Sac/Model/Observer.php +1 -2
  11. app/code/community/Fianet/Sac/Model/Payment/Association.php +1 -1
  12. app/code/community/Fianet/Sac/Model/Product.php +1 -1
  13. app/code/community/Fianet/Sac/Model/Source/Statut.php +1 -1
  14. app/code/community/Fianet/Sac/Model/Source/Type.php +1 -1
  15. app/code/community/Fianet/Sac/controllers/Adminhtml/PaymentController.php +1 -1
  16. app/code/community/Fianet/Sac/etc/adminhtml.xml +32 -2
  17. app/code/community/Fianet/Sac/etc/config.xml +2 -2
  18. app/code/community/Fianet/Sac/etc/system.xml +10 -1
  19. app/code/community/Fianet/Sac/sql/sac_setup/mysql4-install-0.0.1.php +1 -1
  20. app/code/community/Fianet/Sac/sql/sac_setup/mysql4-upgrade-0.0.1-0.0.2.php +1 -1
  21. app/code/community/Fianet/Sac/sql/sac_setup/mysql4-upgrade-0.0.10-0.0.11.php +1 -1
  22. app/code/community/Fianet/Sac/sql/sac_setup/mysql4-upgrade-0.0.11-0.0.12.php +1 -1
  23. app/code/community/Fianet/Sac/sql/sac_setup/mysql4-upgrade-0.0.12-0.0.13.php +1 -1
  24. app/code/community/Fianet/Sac/sql/sac_setup/mysql4-upgrade-0.0.13-1.0.0.php +1 -1
  25. app/code/community/Fianet/Sac/sql/sac_setup/mysql4-upgrade-0.0.2-0.0.3.php +1 -1
  26. app/code/community/Fianet/Sac/sql/sac_setup/mysql4-upgrade-0.0.3-0.0.4.php +1 -1
  27. app/code/community/Fianet/Sac/sql/sac_setup/mysql4-upgrade-0.0.4-0.0.5.php +1 -1
  28. app/code/community/Fianet/Sac/sql/sac_setup/mysql4-upgrade-1.0.0-1.0.1.php +1 -1
  29. app/code/community/Fianet/Sac/sql/sac_setup/mysql4-upgrade-1.0.3-1.0.4.php +31 -0
  30. app/design/adminhtml/default/default/layout/sac.xml +1 -1
  31. app/design/adminhtml/default/default/template/sac/categoriestree.phtml +0 -562
  32. app/design/adminhtml/default/default/template/sac/categorytreeformcontainer.phtml +0 -39
  33. app/design/adminhtml/default/default/template/sac/shipping.phtml +0 -82
  34. app/design/adminhtml/default/default/template/sac/storeswitcher.phtml +0 -97
  35. app/etc/modules/Fianet_Sac.xml +2 -2
  36. app/locale/fr_FR/Fianet_Sac.csv +7 -5
  37. package.xml +5 -5
  38. skin/adminhtml/default/default/images/fianet/CE_picto_orange.gif +0 -0
  39. skin/adminhtml/default/default/images/fianet/CE_picto_rouge.gif +0 -0
  40. skin/adminhtml/default/default/images/fianet/CE_picto_vert.gif +0 -0
  41. skin/adminhtml/default/default/images/fianet/rond_orange.gif +0 -0
app/code/community/Fianet/Sac/Block/Adminhtml/Payment/Configuration.php CHANGED
@@ -12,7 +12,7 @@
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2012 FIA-NET
15
- * @version Release: $Revision: 1.0.3 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  class Fianet_Sac_Block_Adminhtml_Payment_Configuration extends Mage_Adminhtml_Block_Widget_Form_Container {
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2012 FIA-NET
15
+ * @version Release: $Revision: 1.0.4 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  class Fianet_Sac_Block_Adminhtml_Payment_Configuration extends Mage_Adminhtml_Block_Widget_Form_Container {
app/code/community/Fianet/Sac/Block/Adminhtml/Payment/Edit/Form.php CHANGED
@@ -12,7 +12,7 @@
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2012 FIA-NET
15
- * @version Release: $Revision: 1.0.3 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  class Fianet_Sac_Block_Adminhtml_Payment_Edit_Form extends Mage_Adminhtml_Block_Widget_Form {
@@ -32,7 +32,7 @@ class Fianet_Sac_Block_Adminhtml_Payment_Edit_Form extends Mage_Adminhtml_Block_
32
 
33
  $payments = Mage::getModel('fianet/mageConfiguration')->getPaymentMethods();
34
  $values = Mage::getModel('sac/source_type')->toOptionArray();
35
-
36
  foreach ($payments as $code => $name) {
37
  if ((!preg_match('#receiveandpay#', $code))&&(!preg_match('/kwx/i', $code))) {
38
  $current_payment_association = Mage::getModel('sac/payment_association')->load($code);
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2012 FIA-NET
15
+ * @version Release: $Revision: 1.0.4 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  class Fianet_Sac_Block_Adminhtml_Payment_Edit_Form extends Mage_Adminhtml_Block_Widget_Form {
32
 
33
  $payments = Mage::getModel('fianet/mageConfiguration')->getPaymentMethods();
34
  $values = Mage::getModel('sac/source_type')->toOptionArray();
35
+
36
  foreach ($payments as $code => $name) {
37
  if ((!preg_match('#receiveandpay#', $code))&&(!preg_match('/kwx/i', $code))) {
38
  $current_payment_association = Mage::getModel('sac/payment_association')->load($code);
app/code/community/Fianet/Sac/Helper/Data.php CHANGED
@@ -12,7 +12,7 @@
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2012 FIA-NET
15
- * @version Release: $Revision: 1.0.3 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  class Fianet_Sac_Helper_Data extends Mage_Core_Helper_Abstract {
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2012 FIA-NET
15
+ * @version Release: $Revision: 1.0.4 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  class Fianet_Sac_Helper_Data extends Mage_Core_Helper_Abstract {
app/code/community/Fianet/Sac/Helper/Order.php CHANGED
@@ -12,7 +12,7 @@
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2012 FIA-NET
15
- * @version Release: $Revision: 1.0.3 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  class Fianet_Sac_Helper_Order extends Mage_Core_Helper_Abstract {
@@ -75,24 +75,46 @@ class Fianet_Sac_Helper_Order extends Mage_Core_Helper_Abstract {
75
  $modeArray = explode(',', $myarray);
76
  else
77
  $modeArray = array();
78
-
79
  // Aucune commande trouvée
80
  if (!$order->getId()) {
81
- Mage::getModel('fianet/log')->log(Mage::helper('fianet')->__('Certissim: invalid order #%s.', $orderId));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
82
  return false;
83
  }
84
 
85
  // Pas d'envoi sur les paiements RNP et Kwixo
86
- if (preg_match('/receiveandpay/i', $order->getPayment()->getMethod()) || preg_match('/kwx/i', $order->getPayment()->getMethod())) {
87
- //Mage::getModel('fianet/log')->log(Mage::helper('fianet')->__('Certissim: order #%s not sent - paymentMethod: %s.', $order->getIncrementId(), $order->getPayment()->getMethod()));
88
  return false;
89
  }
90
 
91
- //Pas d'envoi si le module n'est pas activé
92
- if(Mage::getStoreConfig('sac/sacconfg/active') == 0){
93
- Mage::getModel('fianet/log')->log(Mage::helper('fianet')->__('Certissim: module disabled, order #%s not sent.', $orderId));
 
 
 
 
 
94
  return false;
95
- }
96
 
97
  //Pas d'envoi si la commande a été passée avant le délai indiqué dans le module
98
  $time = Mage::getStoreConfig('sac/sacconfg/timecontrol');
@@ -103,14 +125,14 @@ class Fianet_Sac_Helper_Order extends Mage_Core_Helper_Abstract {
103
  $dateOrder = new DateTime($order->getCreatedAt());
104
 
105
  if($dateOrder < $dateMax){
106
- Mage::getModel('fianet/log')->log(Mage::helper('fianet')->__('Certissim: order #%s is too old (%s day max).', $orderId, $time));
107
  return false;
108
  }
109
  }
110
 
111
  // Pas d'envoi si la commande a un total égal à zéro
112
  if ($order->getGrandTotal() == 0) {
113
- Mage::getModel('fianet/log')->log(Mage::helper('fianet')->__('Certissim: order #%s has a total of %s.', $orderId, $order->getGrandTotal()));
114
  return false;
115
  }
116
 
@@ -121,17 +143,6 @@ class Fianet_Sac_Helper_Order extends Mage_Core_Helper_Abstract {
121
  return false;
122
  }
123
  }
124
-
125
- // Pas d'envoi si la commande n'est pas dans un statut défini dans les paramétrages du module
126
- if (!in_array($order->getStatus(), $modeArray)) {
127
- // Si la commande ne vient pas d'être passée
128
- if($order->getStatus() != '' && $order->getState()!='new') {
129
- Mage::getModel('fianet/log')->log(Mage::helper('fianet')->__('Certissim: order #%s not sent - status: %s not selected.', $order->getIncrementId(), $order->getStatus()));
130
- } else if($order->getStatus() != '') {
131
- Mage::getModel('fianet/log')->log(Mage::helper('fianet')->__('Certissim: order #%s not sent - state: %s.', $order->getIncrementId(), $order->getState()));
132
- }
133
- return false;
134
- }
135
 
136
  $billingAddressCounrty = $order->getBillingAddress()->getCountry();
137
  $shippingAddressCounrty = $order->getShippingAddress()->getCountry();
@@ -194,7 +205,7 @@ class Fianet_Sac_Helper_Order extends Mage_Core_Helper_Abstract {
194
  }
195
 
196
  $nb++;
197
- Mage::getModel('fianet/log')->log(Mage::helper('fianet')->__('Certissim: order %s sent and is currently in state: %s.', $response['refid'], $response['etat']));
198
  } else {
199
  Mage::getModel('fianet/log')->log(Mage::helper('fianet')->__(get_class($this) . '::' . __FUNCTION__ . ' : unknow state %s for order %s', $response['etat'], $response['refid']));
200
  }
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2012 FIA-NET
15
+ * @version Release: $Revision: 1.0.4 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  class Fianet_Sac_Helper_Order extends Mage_Core_Helper_Abstract {
75
  $modeArray = explode(',', $myarray);
76
  else
77
  $modeArray = array();
78
+
79
  // Aucune commande trouvée
80
  if (!$order->getId()) {
81
+ Mage::getModel('fianet/log')->log(Mage::helper('fianet')->__('Certissim: invalid order #%s.', $order->getIncrementId()));
82
+ return false;
83
+ }
84
+
85
+ //Pas d'envoi si le module n'est pas activé
86
+ if($order->getStatus() != '' && Mage::getStoreConfig('sac/sacconfg/active') == 0){
87
+ Mage::getModel('fianet/log')->log(Mage::helper('fianet')->__('Certissim: module disabled, order #%s not sent.', $order->getIncrementId()));
88
+ return false;
89
+ }
90
+
91
+ // Pas d'envoi si la commande n'est pas dans un statut défini dans les paramétrages du module
92
+ if (!in_array($order->getStatus(), $modeArray)) {
93
+ // Si la commande ne vient pas d'être passée
94
+ if($order->getStatus() != '' && $order->getState()!='new') {
95
+ Mage::getModel('fianet/log')->log(Mage::helper('fianet')->__('Certissim: order #%s not sent - status: %s not selected.', $order->getIncrementId(), $order->getStatus()));
96
+ } else if($order->getStatus() != '') {
97
+ Mage::getModel('fianet/log')->log(Mage::helper('fianet')->__('Certissim: order #%s not sent - state: %s.', $order->getIncrementId(), $order->getState()));
98
+ }
99
  return false;
100
  }
101
 
102
  // Pas d'envoi sur les paiements RNP et Kwixo
103
+ if ($order->getStatus() != '' && (preg_match('/receiveandpay/i', $order->getPayment()->getMethod()) || preg_match('/kwx/i', $order->getPayment()->getMethod()) || preg_match('/kwixo/i', $order->getPayment()->getMethod()))) {
104
+ Mage::getModel('fianet/log')->log(Mage::helper('fianet')->__('Certissim: order #%s not sent - paymentMethod: %s.', $order->getIncrementId(), $order->getPayment()->getMethod()));
105
  return false;
106
  }
107
 
108
+ // Pas d'envoi si la commande n'est pas dans un statut défini dans les paramétrages du module
109
+ if (!in_array($order->getStatus(), $modeArray)) {
110
+ // Si la commande ne vient pas d'être passée
111
+ if($order->getStatus() != '' && $order->getState()!='new') {
112
+ Mage::getModel('fianet/log')->log(Mage::helper('fianet')->__('Certissim: order #%s not sent - status: %s not selected.', $order->getIncrementId(), $order->getStatus()));
113
+ } else if($order->getStatus() != '') {
114
+ Mage::getModel('fianet/log')->log(Mage::helper('fianet')->__('Certissim: order #%s not sent - state: %s.', $order->getIncrementId(), $order->getState()));
115
+ }
116
  return false;
117
+ }
118
 
119
  //Pas d'envoi si la commande a été passée avant le délai indiqué dans le module
120
  $time = Mage::getStoreConfig('sac/sacconfg/timecontrol');
125
  $dateOrder = new DateTime($order->getCreatedAt());
126
 
127
  if($dateOrder < $dateMax){
128
+ Mage::getModel('fianet/log')->log(Mage::helper('fianet')->__('Certissim: order #%s is too old (%s day max).', $order->getIncrementId(), $time));
129
  return false;
130
  }
131
  }
132
 
133
  // Pas d'envoi si la commande a un total égal à zéro
134
  if ($order->getGrandTotal() == 0) {
135
+ Mage::getModel('fianet/log')->log(Mage::helper('fianet')->__('Certissim: order #%s has a total of %s.', $order->getIncrementId(), $order->getGrandTotal()));
136
  return false;
137
  }
138
 
143
  return false;
144
  }
145
  }
 
 
 
 
 
 
 
 
 
 
 
146
 
147
  $billingAddressCounrty = $order->getBillingAddress()->getCountry();
148
  $shippingAddressCounrty = $order->getShippingAddress()->getCountry();
205
  }
206
 
207
  $nb++;
208
+ Mage::getModel('fianet/log')->log(Mage::helper('fianet')->__('Certissim: order #%s sent and is currently in state: %s.', $response['refid'], $response['etat']));
209
  } else {
210
  Mage::getModel('fianet/log')->log(Mage::helper('fianet')->__(get_class($this) . '::' . __FUNCTION__ . ' : unknow state %s for order %s', $response['etat'], $response['refid']));
211
  }
app/code/community/Fianet/Sac/Model/Action.php CHANGED
@@ -12,7 +12,7 @@
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2012 FIA-NET
15
- * @version Release: $Revision: 1.0.3 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  class Fianet_Sac_Model_Action {
@@ -98,17 +98,17 @@ class Fianet_Sac_Model_Action {
98
  ->addAttributeToSelect('store_id')
99
  ->addAttributeToSelect('fianet_sac_sent')
100
  ->addAttributeToSelect('fianet_sac_evaluation')
101
- ->addAttributeToSelect('fianet_sac_classement_id')
102
  ->addAttributeToSelect('fianet_sac_mode')
103
  ->addAttributeToFilter('fianet_sac_sent', 1) // uniquement les commandes déjà envoyée
104
- ->addAttributeToFilter('fianet_sac_classement_id',
105
  array(
106
  'or' => array(
107
- 0 => array('nin' => array('15','16','17','18','25','26')),
108
  1 => array('is' => new Zend_Db_Expr('null'))
109
  )
110
  )
111
- ); // Uniquement les commandes dont le ClassementID n'est pas "final"
112
 
113
  // Uniquement les commandes sélectionnées quand évaluation lancée depuis le back-office
114
  if (is_array($orderIds) && (count($orderIds) > 0))
@@ -147,19 +147,19 @@ class Fianet_Sac_Model_Action {
147
  if (isset($eval)) {
148
  $maj_value = false;
149
  foreach (self::$_tables as $table) {
150
- // On vérifie si le ClassementID a évolué, sinon on ne fait rien
151
  // Plus rapide par requête directe
152
- $queryR = "SELECT `fianet_sac_evaluation`, `fianet_sac_classement_id` FROM `{$table}` WHERE `increment_id` = '{$evaluation['refid']}' LIMIT 0,1;";
153
  $infos_order = self::$_readConnection->fetchAll($queryR);
154
  foreach($infos_order as $info_order) {
155
  $evaluationOrder = $info_order['fianet_sac_evaluation'];
156
- $classementid = $info_order['fianet_sac_classement_id'];
157
  }
158
 
159
- //Si ClassementID de l'appel est différent de celui en BDD
160
- if(($classementid != $evaluation['classementid']) || ($eval != $evaluationOrder)) {
161
  $queryW = "UPDATE `{$table}`";
162
- $queryW .= " SET `fianet_sac_evaluation` = '{$eval}', `fianet_sac_classement_id` = '{$evaluation['classementid']}'";
163
 
164
  // uniquement pour la table sales_flat_order
165
  if (self::$_resource->getTableName('sales/order') == $table) {
@@ -192,7 +192,7 @@ class Fianet_Sac_Model_Action {
192
  $textLog .= Mage::helper('fianet')->__('(status: \'%s\').', $eval);
193
  }
194
  else {
195
- $textLog .= Mage::helper('fianet')->__('(score: \'%s\' - ClassementID: \'%s\').', $eval, $evaluation['classementid']);
196
  }
197
  Mage::getModel('fianet/log')->Log($textLog);
198
  $nb++;
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2012 FIA-NET
15
+ * @version Release: $Revision: 1.0.4 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  class Fianet_Sac_Model_Action {
98
  ->addAttributeToSelect('store_id')
99
  ->addAttributeToSelect('fianet_sac_sent')
100
  ->addAttributeToSelect('fianet_sac_evaluation')
101
+ ->addAttributeToSelect('fianet_sac_statutcoex')
102
  ->addAttributeToSelect('fianet_sac_mode')
103
  ->addAttributeToFilter('fianet_sac_sent', 1) // uniquement les commandes déjà envoyée
104
+ ->addAttributeToFilter('fianet_sac_statutcoex',
105
  array(
106
  'or' => array(
107
+ 0 => array('nin' => array('na','done','standby','aborted')),
108
  1 => array('is' => new Zend_Db_Expr('null'))
109
  )
110
  )
111
+ ); // Uniquement les commandes dont le statutCoEx n'est pas "final"
112
 
113
  // Uniquement les commandes sélectionnées quand évaluation lancée depuis le back-office
114
  if (is_array($orderIds) && (count($orderIds) > 0))
147
  if (isset($eval)) {
148
  $maj_value = false;
149
  foreach (self::$_tables as $table) {
150
+ // On vérifie si le statutCoEx ou l'évaluation a évolué, sinon on ne fait rien
151
  // Plus rapide par requête directe
152
+ $queryR = "SELECT `fianet_sac_evaluation`, `fianet_sac_statutcoex` FROM `{$table}` WHERE `increment_id` = '{$evaluation['refid']}' LIMIT 0,1;";
153
  $infos_order = self::$_readConnection->fetchAll($queryR);
154
  foreach($infos_order as $info_order) {
155
  $evaluationOrder = $info_order['fianet_sac_evaluation'];
156
+ $statutCoEx = $info_order['fianet_sac_statutcoex'];
157
  }
158
 
159
+ //Si statutCoEx ou évaluation de l'appel est différent de celui en BDD
160
+ if(($statutCoEx != $evaluation['statutcoex']) || ($eval != $evaluationOrder)) {
161
  $queryW = "UPDATE `{$table}`";
162
+ $queryW .= " SET `fianet_sac_evaluation` = '{$eval}', `fianet_sac_statutcoex` = '{$evaluation['statutcoex']}'";
163
 
164
  // uniquement pour la table sales_flat_order
165
  if (self::$_resource->getTableName('sales/order') == $table) {
192
  $textLog .= Mage::helper('fianet')->__('(status: \'%s\').', $eval);
193
  }
194
  else {
195
+ $textLog .= Mage::helper('fianet')->__('(score: \'%s\' - statutCoEx: \'%s\').', $eval, $evaluation['statutcoex']);
196
  }
197
  Mage::getModel('fianet/log')->Log($textLog);
198
  $nb++;
app/code/community/Fianet/Sac/Model/Fianet/Order/Info/Sac.php CHANGED
@@ -12,7 +12,7 @@
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2012 FIA-NET
15
- * @version Release: $Revision: 1.0.3 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  class Fianet_Sac_Model_Fianet_Order_Info_Sac {
@@ -29,9 +29,9 @@ class Fianet_Sac_Model_Fianet_Order_Info_Sac {
29
  public function __construct() {
30
  $this->list = Mage::getModel('fianet/fianet_order_info_productlist');
31
  $this->transport = Mage::getModel('fianet/fianet_order_info_transport');
32
-
33
  $store = Mage::getModel('fianet/functions')->getStore();
34
-
35
  $this->siteid = Mage::getStoreConfig('sac/sacconfg/siteid', $store);
36
  if ($this->siteid == null && $store > 0)
37
  $this->siteid = Mage::getStoreConfig('sac/sacconfg/siteid', '0');
@@ -60,5 +60,4 @@ class Fianet_Sac_Model_Fianet_Order_Info_Sac {
60
  $xml .= "\t" . '</infocommande>' . "\n";
61
  return ($xml);
62
  }
63
-
64
  }
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2012 FIA-NET
15
+ * @version Release: $Revision: 1.0.4 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  class Fianet_Sac_Model_Fianet_Order_Info_Sac {
29
  public function __construct() {
30
  $this->list = Mage::getModel('fianet/fianet_order_info_productlist');
31
  $this->transport = Mage::getModel('fianet/fianet_order_info_transport');
32
+
33
  $store = Mage::getModel('fianet/functions')->getStore();
34
+
35
  $this->siteid = Mage::getStoreConfig('sac/sacconfg/siteid', $store);
36
  if ($this->siteid == null && $store > 0)
37
  $this->siteid = Mage::getStoreConfig('sac/sacconfg/siteid', '0');
60
  $xml .= "\t" . '</infocommande>' . "\n";
61
  return ($xml);
62
  }
 
63
  }
app/code/community/Fianet/Sac/Model/Fianet/Order/Sac.php CHANGED
@@ -12,7 +12,7 @@
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2012 FIA-NET
15
- * @version Release: $Revision: 1.0.3 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  class Fianet_Sac_Model_Fianet_Order_Sac {
@@ -78,15 +78,15 @@ class Fianet_Sac_Model_Fianet_Order_Sac {
78
  public static function generateSacOrder(Mage_Sales_Model_Order $order) {
79
  $scope_field = "store_id";
80
  $id = $order->getStore()->getId();
81
-
82
  $sacOrder = Mage::getModel('sac/fianet_order_sac');
83
-
84
  $sacOrder->scope_field = $scope_field;
85
  $sacOrder->scope_id = $id;
86
-
87
  $billing_address = $order->getBillingAddress();
88
  $shipping_address = $order->getShippingAddress();
89
-
90
  $sacOrder->billing_user->titre = $billing_address->getPrefix();
91
  $sacOrder->billing_user->nom = $billing_address->getLastname();
92
  $sacOrder->billing_user->prenom = $billing_address->getFirstname();
@@ -94,60 +94,141 @@ class Fianet_Sac_Model_Fianet_Order_Sac {
94
  $sacOrder->billing_user->telfax = preg_replace("/[^0-9]/", "", $billing_address->getFax());
95
  $sacOrder->billing_user->email = $billing_address->getEmail() == '' ? $order->getCustomer_email() : $billing_address->getEmail();
96
  $sacOrder->billing_user->societe = $billing_address->getCompany();
97
-
98
  if (trim($billing_address->getCompany()) != '') {
99
  $sacOrder->billing_user->setQualityProfessional();
100
  }
101
-
102
  $sacOrder->billing_address->rue1 = $billing_address->getStreet(1);
103
  $sacOrder->billing_address->rue2 = $billing_address->getStreet(2);
104
  $sacOrder->billing_address->cpostal = $billing_address->getPostcode();
105
  $sacOrder->billing_address->ville = $billing_address->getCity();
106
  $sacOrder->billing_address->pays = (preg_match('/^97/', $billing_address->getPostcode()))? 'FR' : $billing_address->getCountry();
107
-
108
- $shipping_code = $order->getShippingCarrier()->getCarrierCode();
109
- $shipping = Mage::getModel('fianet/shipping_association')->load($shipping_code);
110
-
111
- if ($shipping->fianet_shipping_type != '1' && $shipping->fianet_shipping_type != '2') {
112
- if (!Fianet_Core_Model_Functions::compareBillingAndShipping($billing_address, $shipping_address)) {
113
- $sacOrder->delivery_user = Mage::getModel('fianet/fianet_order_user_delivery');
114
- $sacOrder->delivery_address = Mage::getModel('fianet/fianet_order_address_delivery');
115
-
116
- $sacOrder->delivery_user->qualite = $sacOrder->billing_user->qualite;
117
-
118
- $sacOrder->delivery_user->titre = $shipping_address->getPrefix();
119
- $sacOrder->delivery_user->nom = $shipping_address->getLastname();
120
- $sacOrder->delivery_user->prenom = $shipping_address->getFirstname();
121
- $sacOrder->delivery_user->telhome = preg_replace("/[^0-9]/", "", $shipping_address->getTelephone());
122
- $sacOrder->delivery_user->telfax = preg_replace("/[^0-9]/", "", $shipping_address->getFax());
123
- $sacOrder->delivery_user->email = $shipping_address->getEmail();
124
- $sacOrder->delivery_user->societe = $shipping_address->getCompany();
125
-
126
- $sacOrder->delivery_address->rue1 = $shipping_address->getStreet(1);
127
- $sacOrder->delivery_address->rue2 = $shipping_address->getStreet(2);
128
- $sacOrder->delivery_address->cpostal = $shipping_address->getPostcode();
129
- $sacOrder->delivery_address->ville = $shipping_address->getCity();
130
- $sacOrder->delivery_address->pays = (preg_match('/^97/', $shipping_address->getPostcode()))? 'FR' : $shipping_address->getCountry();
131
- }
132
- }
133
-
134
  $sacOrder->info_commande->refid = $order->getRealOrderId();
135
  $sacOrder->info_commande->devise = $order->getBaseCurrencyCode();
136
  $sacOrder->info_commande->montant = $order->getBaseGrandTotal();
137
  //Si l'IP de l'internaute n'est pas pr�sente dans Magento (en cas de cr�ation de commande depuis le BO) alors on r�cup�re l'IP de la boutique
138
- $sacOrder->info_commande->ip = (!$order->getRemoteIp()) ? $_SERVER['REMOTE_ADDR'] : $order->getRemoteIp();
139
- $sacOrder->info_commande->timestamp = $order->getCreatedAt();
140
-
141
-
142
  $sacOrder->info_commande->siteid = Mage::getStoreConfig('sac/sacconfg/siteid', $id);
143
  if ($sacOrder->info_commande->siteid == null && $id != 0)
144
  $sacOrder->info_commande->siteid = Mage::getStoreConfig('sac/sacconfg/siteid', '0');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
145
 
146
-
147
- $sacOrder->info_commande->transport->type = $shipping->fianet_shipping_type;
148
- $sacOrder->info_commande->transport->nom = $shipping->conveyor_name;
149
- $sacOrder->info_commande->transport->rapidite = $shipping->delivery_times;
150
-
 
 
151
  foreach ($order->getAllVisibleItems() as $item) {
152
  $pAmount = $item->getBaseRowTotal() - $item->getBaseDiscountAmount() + $item->getBaseTaxAmount() + $item->getBaseWeeeTaxAppliedRowAmount();
153
 
@@ -170,7 +251,6 @@ class Fianet_Sac_Model_Fianet_Order_Sac {
170
  $sacOrder->info_commande->list->addProduct($product);
171
  }
172
  $sacOrder->payment->type = Mage::getModel('sac/payment_association')->load($order->getPayment()->getMethod())->getValue();
173
-
174
  return ($sacOrder);
175
  }
176
 
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2012 FIA-NET
15
+ * @version Release: $Revision: 1.0.4 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  class Fianet_Sac_Model_Fianet_Order_Sac {
78
  public static function generateSacOrder(Mage_Sales_Model_Order $order) {
79
  $scope_field = "store_id";
80
  $id = $order->getStore()->getId();
81
+
82
  $sacOrder = Mage::getModel('sac/fianet_order_sac');
83
+
84
  $sacOrder->scope_field = $scope_field;
85
  $sacOrder->scope_id = $id;
86
+
87
  $billing_address = $order->getBillingAddress();
88
  $shipping_address = $order->getShippingAddress();
89
+
90
  $sacOrder->billing_user->titre = $billing_address->getPrefix();
91
  $sacOrder->billing_user->nom = $billing_address->getLastname();
92
  $sacOrder->billing_user->prenom = $billing_address->getFirstname();
94
  $sacOrder->billing_user->telfax = preg_replace("/[^0-9]/", "", $billing_address->getFax());
95
  $sacOrder->billing_user->email = $billing_address->getEmail() == '' ? $order->getCustomer_email() : $billing_address->getEmail();
96
  $sacOrder->billing_user->societe = $billing_address->getCompany();
97
+
98
  if (trim($billing_address->getCompany()) != '') {
99
  $sacOrder->billing_user->setQualityProfessional();
100
  }
101
+
102
  $sacOrder->billing_address->rue1 = $billing_address->getStreet(1);
103
  $sacOrder->billing_address->rue2 = $billing_address->getStreet(2);
104
  $sacOrder->billing_address->cpostal = $billing_address->getPostcode();
105
  $sacOrder->billing_address->ville = $billing_address->getCity();
106
  $sacOrder->billing_address->pays = (preg_match('/^97/', $billing_address->getPostcode()))? 'FR' : $billing_address->getCountry();
107
+
108
+
109
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
110
  $sacOrder->info_commande->refid = $order->getRealOrderId();
111
  $sacOrder->info_commande->devise = $order->getBaseCurrencyCode();
112
  $sacOrder->info_commande->montant = $order->getBaseGrandTotal();
113
  //Si l'IP de l'internaute n'est pas pr�sente dans Magento (en cas de cr�ation de commande depuis le BO) alors on r�cup�re l'IP de la boutique
114
+ $sacOrder->info_commande->ip = (!$order->getRemoteIp()) ? $_SERVER['REMOTE_ADDR'] : $order->getRemoteIp();
115
+ //La fonction $order->created_at de Magento retourne l'heure UTC peu importe la config. Pour obtenir celle de la boutique, il est donc n�cessaire d'appliquer la m�thode ci-dessous
116
+ $sacOrder->info_commande->timestamp = Mage::getModel('core/date')->date(null,strtotime($order->created_at));
 
117
  $sacOrder->info_commande->siteid = Mage::getStoreConfig('sac/sacconfg/siteid', $id);
118
  if ($sacOrder->info_commande->siteid == null && $id != 0)
119
  $sacOrder->info_commande->siteid = Mage::getStoreConfig('sac/sacconfg/siteid', '0');
120
+
121
+ $shipping_code = $order->getShippingCarrier()->getCarrierCode();
122
+ $shipping = Mage::getModel('fianet/shipping_association')->load($shipping_code);
123
+
124
+ //initialisation du type de transport
125
+ $type_transporteur = '';
126
+ $nom_transporteur = '';
127
+ $rapidite_transporteur = '';
128
+
129
+ //Traitement particulier si la m�thode de livraison est So Colissimo Simplicit�
130
+ if ($shipping_code == "socolissimosimplicite") {
131
+ $nom_transporteur = 'So Colissimo Simplicit�';
132
+ $rapidite_transporteur = '2';
133
+ switch ($order->getSocoProductCode()) {
134
+ case "A2P";
135
+ case "CMT";
136
+ case "BPR";
137
+ case "CIT";
138
+ case "ACP";
139
+ case "CDI";
140
+ case "BDP":
141
+ $type_transporteur = '2';
142
+ //R�cup�ration du num tel demand� par SoColissimo
143
+ $sacOrder->billing_user->telmobile = $order->getSocoPhoneNumber();
144
+ $transport_adress = Mage::getModel('fianet/fianet_order_address_transport');
145
+ $transport_adress->rue1 = $shipping_address->getStreet(1);
146
+ $transport_adress->cpostal = $shipping_address->getPostcode();
147
+ $transport_adress->ville = $shipping_address->getCity();
148
+ $transport_adress->pays = (preg_match('/^97/', $shipping_address->getPostcode()))? 'FR' : $shipping_address->getCountry();
149
+
150
+ $sacOrder->info_commande->transport->identifiant = $order->getSocoRelayPointCode();
151
+ $sacOrder->info_commande->transport->adresse = $transport_adress;
152
+ break;
153
+ case "DOM";
154
+ case "RDV":
155
+ $type_transporteur = '4';
156
+ break;
157
+ default:
158
+ //On log l'erreur "So Colissimo mode de livraison inconnu"
159
+ $type_transporteur = 'nc';
160
+ Mage::getModel('fianet/log')->Log(Mage::helper('fianet')->__("Certissim: order #%s. Error with SoColissimo's return. Product Code %s was not recognized.", $order->getRealOrderId(), $order->getSocoProductCode()));
161
+ break;
162
+ }
163
+ } elseif ($shipping_code == "envoimoinscher") {//Traitement particulier si la m�thode de livraison est Envoimoinscher
164
+ $nom_transporteur = $shipping->getConveyorName();
165
+ $rapidite_transporteur = $shipping->getDeliveryTimes();
166
+
167
+ $pointRelais = Mage::getModel('envoimoinscher/emc_points')->getPoint($order['entity_id']);
168
+ if ($pointRelais) {
169
+ $type_transporteur = '2';
170
+
171
+ $moduleConfig = Mage::getStoreConfig("carriers/envoimoinscher");
172
+ $pointClient = new Env_ParcelPoint(array("user" => $moduleConfig["user"], "pass" => $moduleConfig["mdp"], "key" => $moduleConfig["cle"]));
173
+ $pointClient->server = Mage::getModel('envoimoinscher/emc_environment')->getHost($moduleConfig['environment']);
174
+ $pointClient->getParcelPoint("dropoff_point", $pointRelais[0]['emc_operators_code_eo'].'-'.$pointRelais[0]['point_ep'], $shipping_address->getCountry());
175
+ $point = $pointClient->points["dropoff_point"];
176
+
177
+ $transport_adress = Mage::getModel('fianet/fianet_order_address_transport');
178
+ $transport_adress->rue1 = $point['address'];
179
+ $transport_adress->cpostal = $point['zipcode'];
180
+ $transport_adress->ville = $point['city'];
181
+ $transport_adress->pays = $point['country'];
182
+
183
+ $sacOrder->info_commande->transport->identifiant = $point['code'];
184
+ $sacOrder->info_commande->transport->enseigne = $point['name'];
185
+ $sacOrder->info_commande->transport->adresse = $transport_adress;
186
+ } else {
187
+ $type_transporteur = '4';
188
+ }
189
+ } else { //Pour tous les autres cas
190
+ if ($shipping) {
191
+ $type_transporteur = $shipping->getFianetShippingType();
192
+ $nom_transporteur = $shipping->getConveyorName();
193
+ $rapidite_transporteur = $shipping->getDeliveryTimes();
194
+
195
+ if ($type_transporteur == "1") //si r�cup�ration du colis chez le marchand
196
+ $sacOrder->info_commande->transport->enseigne = Mage::getStoreConfig('general/store_information/name');
197
+
198
+ if ($type_transporteur == "2") { //si transport en point relais
199
+ //si module de point relais particulier, l'inscrire ici...
200
+ }
201
+ } elseif (Mage::getStoreConfig('sac/sacconfg/downloadableproducts')) {//Produits t�l�chargeables ou produits virtuels
202
+ $type_transporteur = '5';
203
+ $nom_transporteur = 'Downloadable product or/and virtual product';
204
+ $rapidite_transporteur = '1';
205
+ }
206
+ }
207
+ $sacOrder->info_commande->transport->type = $type_transporteur;
208
+ $sacOrder->info_commande->transport->nom = Mage::helper('fianet')->__($nom_transporteur);
209
+ $sacOrder->info_commande->transport->rapidite = $rapidite_transporteur;
210
+
211
+ if(($type_transporteur == "4") && (!Fianet_Core_Model_Functions::compareBillingAndShipping($billing_address, $shipping_address))) {
212
+ $sacOrder->delivery_user = Mage::getModel('fianet/fianet_order_user_delivery');
213
+ $sacOrder->delivery_address = Mage::getModel('fianet/fianet_order_address_delivery');
214
+
215
+ $sacOrder->delivery_user->qualite = $sacOrder->billing_user->qualite;
216
+
217
+ $sacOrder->delivery_user->titre = $shipping_address->getPrefix();
218
+ $sacOrder->delivery_user->nom = $shipping_address->getLastname();
219
+ $sacOrder->delivery_user->prenom = $shipping_address->getFirstname();
220
+ $sacOrder->delivery_user->telhome = preg_replace("/[^0-9]/", "", $shipping_address->getTelephone());
221
+ $sacOrder->delivery_user->telfax = preg_replace("/[^0-9]/", "", $shipping_address->getFax());
222
+ $sacOrder->delivery_user->email = $shipping_address->getEmail();
223
+ $sacOrder->delivery_user->societe = $shipping_address->getCompany();
224
 
225
+ $sacOrder->delivery_address->rue1 = $shipping_address->getStreet(1);
226
+ $sacOrder->delivery_address->rue2 = $shipping_address->getStreet(2);
227
+ $sacOrder->delivery_address->cpostal = $shipping_address->getPostcode();
228
+ $sacOrder->delivery_address->ville = $shipping_address->getCity();
229
+ $sacOrder->delivery_address->pays = (preg_match('/^97/', $shipping_address->getPostcode()))? 'FR' : $shipping_address->getCountry();
230
+ }
231
+
232
  foreach ($order->getAllVisibleItems() as $item) {
233
  $pAmount = $item->getBaseRowTotal() - $item->getBaseDiscountAmount() + $item->getBaseTaxAmount() + $item->getBaseWeeeTaxAppliedRowAmount();
234
 
251
  $sacOrder->info_commande->list->addProduct($product);
252
  }
253
  $sacOrder->payment->type = Mage::getModel('sac/payment_association')->load($order->getPayment()->getMethod())->getValue();
 
254
  return ($sacOrder);
255
  }
256
 
app/code/community/Fianet/Sac/Model/Mysql4/Payment/Association.php CHANGED
@@ -12,7 +12,7 @@
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2012 FIA-NET
15
- * @version Release: $Revision: 1.0.3 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  class Fianet_Sac_Model_Mysql4_Payment_Association extends Fianet_Core_Model_Mysql4_Abstract {
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2012 FIA-NET
15
+ * @version Release: $Revision: 1.0.4 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  class Fianet_Sac_Model_Mysql4_Payment_Association extends Fianet_Core_Model_Mysql4_Abstract {
app/code/community/Fianet/Sac/Model/Mysql4/Payment/Association/Collection.php CHANGED
@@ -12,7 +12,7 @@
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2012 FIA-NET
15
- * @version Release: $Revision: 1.0.3 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  class Fianet_Sac_Model_Mysql4_Payment_Association_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract {
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2012 FIA-NET
15
+ * @version Release: $Revision: 1.0.4 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  class Fianet_Sac_Model_Mysql4_Payment_Association_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract {
app/code/community/Fianet/Sac/Model/Observer.php CHANGED
@@ -12,7 +12,7 @@
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2012 FIA-NET
15
- * @version Release: $Revision: 1.0.3 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  class Fianet_Sac_Model_Observer {
@@ -22,7 +22,6 @@ class Fianet_Sac_Model_Observer {
22
  if (!$object) {
23
  return $this;
24
  }
25
-
26
  $order = Mage::getModel('sales/order')->load((int) $object->getEntityId());
27
 
28
  if (!Mage::helper('sac/order')->canSendOrder($order, (int) $object->getEntityId())) {
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2012 FIA-NET
15
+ * @version Release: $Revision: 1.0.4 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  class Fianet_Sac_Model_Observer {
22
  if (!$object) {
23
  return $this;
24
  }
 
25
  $order = Mage::getModel('sales/order')->load((int) $object->getEntityId());
26
 
27
  if (!Mage::helper('sac/order')->canSendOrder($order, (int) $object->getEntityId())) {
app/code/community/Fianet/Sac/Model/Payment/Association.php CHANGED
@@ -12,7 +12,7 @@
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2012 FIA-NET
15
- * @version Release: $Revision: 1.0.3 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  class Fianet_Sac_Model_Payment_Association extends Mage_Core_Model_Abstract {
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2012 FIA-NET
15
+ * @version Release: $Revision: 1.0.4 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  class Fianet_Sac_Model_Payment_Association extends Mage_Core_Model_Abstract {
app/code/community/Fianet/Sac/Model/Product.php CHANGED
@@ -12,7 +12,7 @@
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2012 FIA-NET
15
- * @version Release: $Revision: 1.0.3 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  class Fianet_Sac_Model_Product extends Fianet_Core_Model_Product {
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2012 FIA-NET
15
+ * @version Release: $Revision: 1.0.4 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  class Fianet_Sac_Model_Product extends Fianet_Core_Model_Product {
app/code/community/Fianet/Sac/Model/Source/Statut.php CHANGED
@@ -12,7 +12,7 @@
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2012 FIA-NET
15
- * @version Release: $Revision: 1.0.3 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  class Fianet_Sac_Model_Source_Statut {
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2012 FIA-NET
15
+ * @version Release: $Revision: 1.0.4 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  class Fianet_Sac_Model_Source_Statut {
app/code/community/Fianet/Sac/Model/Source/Type.php CHANGED
@@ -12,7 +12,7 @@
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2012 FIA-NET
15
- * @version Release: $Revision: 1.0.3 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  class Fianet_Sac_Model_Source_Type {
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2012 FIA-NET
15
+ * @version Release: $Revision: 1.0.4 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  class Fianet_Sac_Model_Source_Type {
app/code/community/Fianet/Sac/controllers/Adminhtml/PaymentController.php CHANGED
@@ -12,7 +12,7 @@
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2012 FIA-NET
15
- * @version Release: $Revision: 1.0.3 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  class Fianet_Sac_Adminhtml_PaymentController extends Mage_Adminhtml_Controller_Action {
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2012 FIA-NET
15
+ * @version Release: $Revision: 1.0.4 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  class Fianet_Sac_Adminhtml_PaymentController extends Mage_Adminhtml_Controller_Action {
app/code/community/Fianet/Sac/etc/adminhtml.xml CHANGED
@@ -12,7 +12,7 @@
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2012 FIA-NET
15
- * @version Release: $Revision: 1.0.3 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  -->
@@ -31,6 +31,22 @@
31
  </sacconfpaiement>
32
  </children>
33
  </sacconfig>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
34
  </children>
35
  </adminfianet>
36
  </menu>
@@ -62,11 +78,25 @@
62
  <sort_order>20</sort_order>
63
  <children>
64
  <sacconfpaiement>
65
- <title>Configuration payment</title>
66
  <sort_order>10</sort_order>
67
  </sacconfpaiement>
68
  </children>
69
  </sacconfig>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
70
  </children>
71
  </adminfianet>
72
  </children>
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2012 FIA-NET
15
+ * @version Release: $Revision: 1.0.4 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  -->
31
  </sacconfpaiement>
32
  </children>
33
  </sacconfig>
34
+ <fianetconfig module="fianet" translate="title">
35
+ <title>Kwixo and Certissim common settings</title>
36
+ <sort_order>90</sort_order>
37
+ <children>
38
+ <producttype translate="title" module="fianet">
39
+ <title>Products types configuration</title>
40
+ <sort_order>10</sort_order>
41
+ <action>fianet/adminhtml_category_productType</action>
42
+ </producttype>
43
+ <shippingtype translate="title" module="fianet">
44
+ <title>Shipping types configuration</title>
45
+ <sort_order>20</sort_order>
46
+ <action>fianet/adminhtml_shipping</action>
47
+ </shippingtype>
48
+ </children>
49
+ </fianetconfig>
50
  </children>
51
  </adminfianet>
52
  </menu>
78
  <sort_order>20</sort_order>
79
  <children>
80
  <sacconfpaiement>
81
+ <title>Payments configuration</title>
82
  <sort_order>10</sort_order>
83
  </sacconfpaiement>
84
  </children>
85
  </sacconfig>
86
+ <fianetconfig>
87
+ <title>Kwixo and Certissim common settings</title>
88
+ <sort_order>90</sort_order>
89
+ <children>
90
+ <producttype>
91
+ <title>Products types configuration</title>
92
+ <sort_order>10</sort_order>
93
+ </producttype>
94
+ <shippingtype>
95
+ <title>Shipping types configuration</title>
96
+ <sort_order>20</sort_order>
97
+ </shippingtype>
98
+ </children>
99
+ </fianetconfig>
100
  </children>
101
  </adminfianet>
102
  </children>
app/code/community/Fianet/Sac/etc/config.xml CHANGED
@@ -12,14 +12,14 @@
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2012 FIA-NET
15
- * @version Release: $Revision: 1.0.3 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  -->
19
  <config>
20
  <modules>
21
  <Fianet_Sac>
22
- <version>1.0.3</version>
23
  </Fianet_Sac>
24
  </modules>
25
  <admin>
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2012 FIA-NET
15
+ * @version Release: $Revision: 1.0.4 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  -->
19
  <config>
20
  <modules>
21
  <Fianet_Sac>
22
+ <version>1.0.4</version>
23
  </Fianet_Sac>
24
  </modules>
25
  <admin>
app/code/community/Fianet/Sac/etc/system.xml CHANGED
@@ -12,7 +12,7 @@
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2012 FIA-NET
15
- * @version Release: $Revision: 1.0.3 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  -->
@@ -128,6 +128,15 @@
128
  <show_in_website>1</show_in_website>
129
  <show_in_store>0</show_in_store>
130
  </procasso>
 
 
 
 
 
 
 
 
 
131
  </fields>
132
  </sacconfg>
133
  <saclink translate="label">
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2012 FIA-NET
15
+ * @version Release: $Revision: 1.0.4 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  -->
128
  <show_in_website>1</show_in_website>
129
  <show_in_store>0</show_in_store>
130
  </procasso>
131
+ <downloadableproducts translate="label">
132
+ <label>Activate management of downloadable/virtual products</label>
133
+ <frontend_type>select</frontend_type>
134
+ <source_model>adminhtml/system_config_source_yesno</source_model>
135
+ <sort_order>11</sort_order>
136
+ <show_in_default>1</show_in_default>
137
+ <show_in_website>1</show_in_website>
138
+ <show_in_store>0</show_in_store>
139
+ </downloadableproducts>
140
  </fields>
141
  </sacconfg>
142
  <saclink translate="label">
app/code/community/Fianet/Sac/sql/sac_setup/mysql4-install-0.0.1.php CHANGED
@@ -12,7 +12,7 @@
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2012 FIA-NET
15
- * @version Release: $Revision: 1.0.3 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  ?>
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2012 FIA-NET
15
+ * @version Release: $Revision: 1.0.4 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  ?>
app/code/community/Fianet/Sac/sql/sac_setup/mysql4-upgrade-0.0.1-0.0.2.php CHANGED
@@ -12,7 +12,7 @@
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2012 FIA-NET
15
- * @version Release: $Revision: 1.0.3 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  ?>
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2012 FIA-NET
15
+ * @version Release: $Revision: 1.0.4 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  ?>
app/code/community/Fianet/Sac/sql/sac_setup/mysql4-upgrade-0.0.10-0.0.11.php CHANGED
@@ -12,7 +12,7 @@
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2012 FIA-NET
15
- * @version Release: $Revision: 1.0.3 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  ?>
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2012 FIA-NET
15
+ * @version Release: $Revision: 1.0.4 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  ?>
app/code/community/Fianet/Sac/sql/sac_setup/mysql4-upgrade-0.0.11-0.0.12.php CHANGED
@@ -12,7 +12,7 @@
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2012 FIA-NET
15
- * @version Release: $Revision: 1.0.3 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  ?>
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2012 FIA-NET
15
+ * @version Release: $Revision: 1.0.4 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  ?>
app/code/community/Fianet/Sac/sql/sac_setup/mysql4-upgrade-0.0.12-0.0.13.php CHANGED
@@ -12,7 +12,7 @@
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2012 FIA-NET
15
- * @version Release: $Revision: 1.0.3 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  ?>
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2012 FIA-NET
15
+ * @version Release: $Revision: 1.0.4 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  ?>
app/code/community/Fianet/Sac/sql/sac_setup/mysql4-upgrade-0.0.13-1.0.0.php CHANGED
@@ -12,7 +12,7 @@
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2012 FIA-NET
15
- * @version Release: $Revision: 1.0.3 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  ?>
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2012 FIA-NET
15
+ * @version Release: $Revision: 1.0.4 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  ?>
app/code/community/Fianet/Sac/sql/sac_setup/mysql4-upgrade-0.0.2-0.0.3.php CHANGED
@@ -12,7 +12,7 @@
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2012 FIA-NET
15
- * @version Release: $Revision: 1.0.3 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  ?>
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2012 FIA-NET
15
+ * @version Release: $Revision: 1.0.4 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  ?>
app/code/community/Fianet/Sac/sql/sac_setup/mysql4-upgrade-0.0.3-0.0.4.php CHANGED
@@ -12,7 +12,7 @@
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2012 FIA-NET
15
- * @version Release: $Revision: 1.0.3 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  ?>
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2012 FIA-NET
15
+ * @version Release: $Revision: 1.0.4 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  ?>
app/code/community/Fianet/Sac/sql/sac_setup/mysql4-upgrade-0.0.4-0.0.5.php CHANGED
@@ -12,7 +12,7 @@
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2012 FIA-NET
15
- * @version Release: $Revision: 1.0.3 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  ?>
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2012 FIA-NET
15
+ * @version Release: $Revision: 1.0.4 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  ?>
app/code/community/Fianet/Sac/sql/sac_setup/mysql4-upgrade-1.0.0-1.0.1.php CHANGED
@@ -12,7 +12,7 @@
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2012 FIA-NET
15
- * @version Release: $Revision: 1.0.3 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  ?>
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2012 FIA-NET
15
+ * @version Release: $Revision: 1.0.4 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  ?>
app/code/community/Fianet/Sac/sql/sac_setup/mysql4-upgrade-1.0.3-1.0.4.php ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * 2000-2012 FIA-NET
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Open Software License (OSL 3.0) that is available
9
+ * through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
10
+ * If you are unable to obtain it through the world-wide-web, please contact us
11
+ * via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
12
+ *
13
+ * @author FIA-NET <support-boutique@fia-net.com>
14
+ * @copyright 2000-2012 FIA-NET
15
+ * @version Release: $Revision: 1.0.4 $
16
+ * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
+ */
18
+ ?>
19
+ <?php
20
+ $installer = $this;
21
+ $installer->startSetup();
22
+ //suppression de la colonne fianet_sac_classement_id et ajout de la colonne fianet_sac_statutcoex suite � l'�volution du produit Certissim
23
+ $installer->removeAttribute('order','fianet_sac_classement_id');
24
+ $installer->addAttribute('order', 'fianet_sac_statutcoex', array('type' => 'varchar', 'visible' => false, 'required' => false));
25
+
26
+ if (!(Mage::helper('fianet')->getMagentoVersion() < 140)) {
27
+ $installer->getConnection()->addColumn($installer->getTable('sales_flat_order_grid'), 'fianet_sac_statutcoex', 'varchar(255) default NULL');
28
+ $installer->getConnection()->dropColumn($installer->getTable('sales_flat_order_grid'), 'fianet_sac_classement_id');
29
+ }
30
+
31
+ $installer->endSetup();
app/design/adminhtml/default/default/layout/sac.xml CHANGED
@@ -12,7 +12,7 @@
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2012 FIA-NET
15
- * @version Release: $Revision: 1.0.3 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  -->
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2012 FIA-NET
15
+ * @version Release: $Revision: 1.0.4 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  -->
app/design/adminhtml/default/default/template/sac/categoriestree.phtml DELETED
@@ -1,562 +0,0 @@
1
- <?php
2
- /**
3
- * 2000-2012 FIA-NET
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the Open Software License (OSL 3.0) that is available
8
- * through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
9
- * If you are unable to obtain it through the world-wide-web, please contact us
10
- * via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
11
- *
12
- * @author FIA-NET <support-boutique@fia-net.com>
13
- * @copyright 2000-2012 FIA-NET
14
- * @version Release: $Revision: 1.0.3 $
15
- * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
16
- */
17
- ?>
18
- <div class="categories-side-col">
19
- <div class="content-header">
20
- <h3 class="icon-head head-categories"><?php echo Mage::helper('catalog')->__('Categories') ?></h3>
21
- </div>
22
- <?php echo $this->getStoreSwitcherHtml() ?>
23
- <div class="tree-actions">
24
- <?php if ($this->getRoot()): ?>
25
- <a href="#" onclick="tree.collapseTree(); return false;"><?php echo Mage::helper('catalog')->__('Collapse All'); ?></a> <span class="separator">|</span> <a href="#" onclick="tree.expandTree(); return false;"><?php echo Mage::helper('catalog')->__('Expand All'); ?></a>
26
- <?php endif; ?>
27
- </div>
28
- <?php if ($this->getRoot()): ?>
29
- <div class="tree-holder">
30
- <div id="tree-div" style="width:100%; overflow:auto;"></div>
31
- </div>
32
-
33
- </div>
34
-
35
- <script type="text/javascript">
36
- //<![CDATA[
37
- var tree;
38
-
39
- /**
40
- * Fix ext compatibility with prototype 1.6
41
- */
42
- Ext.lib.Event.getTarget = function(e) {
43
- var ee = e.browserEvent || e;
44
- return ee.target ? Event.element(ee) : null;
45
- };
46
-
47
- Ext.tree.TreePanel.Enhanced = function(el, config) {
48
- Ext.tree.TreePanel.Enhanced.superclass.constructor.call(this, el, config);
49
- };
50
-
51
- Ext.extend(Ext.tree.TreePanel.Enhanced, Ext.tree.TreePanel, {
52
-
53
- loadTree : function(config, firstLoad) {
54
- var parameters = config['parameters'];
55
- var data = config['data'];
56
-
57
- this.storeId = parameters['store_id'];
58
-
59
- if ( this.storeId != 0 && $('add_root_category_button')) {
60
- $('add_root_category_button').hide();
61
- }
62
-
63
- if ((typeof parameters['root_visible']) != 'undefined') {
64
- this.rootVisible = parameters['root_visible']*1;
65
- }
66
-
67
- var root = new Ext.tree.TreeNode(parameters);
68
-
69
- this.nodeHash = {};
70
- this.setRootNode(root);
71
-
72
- if (firstLoad) {
73
- this.addListener('click', this.categoryClick);
74
- this.addListener('beforenodedrop', categoryMove.createDelegate(this));
75
- }
76
-
77
- this.loader.buildCategoryTree(root, data);
78
- this.el.dom.innerHTML = '';
79
- // render the tree
80
- this.render();
81
- if (parameters['expanded']) {
82
- this.expandAll();
83
- } else {
84
- root.expand();
85
- }
86
-
87
- var selectedNode = this.getNodeById(parameters['category_id']);
88
- if (selectedNode) {
89
- this.currentNodeId = parameters['category_id'];
90
- }
91
- this.selectCurrentNode();
92
- },
93
-
94
- request : function(url, params) {
95
- var params = {};
96
- if (!params.form_key) {
97
- params.form_key = FORM_KEY;
98
- }
99
- var result = new Ajax.Request(
100
- url + (url.match(new RegExp('\\?')) ? '&isAjax=true' : '?isAjax=true' ),
101
- {
102
- parameters: params,
103
- method: 'post'
104
- }
105
- );
106
-
107
- return result;
108
- },
109
-
110
- selectCurrentNode : function() {
111
- if (this.currentNodeId) {
112
- var selectedNode = this.getNodeById(this.currentNodeId);
113
- if ((typeof selectedNode.attributes.path)!='undefined') {
114
- var path = selectedNode.attributes.path;
115
- if (!this.storeId) {
116
- path = '0/'+path;
117
- }
118
- this.selectPath(path);
119
- } else {
120
- this.getSelectionModel().select(selectedNode);
121
- }
122
- }
123
- },
124
-
125
- collapseTree : function() {
126
- this.collapseAll();
127
- this.selectCurrentNode();
128
-
129
- if (!this.collapsed) {
130
- this.collapsed = true;
131
- this.loader.dataUrl = '<?php echo $this->getLoadTreeUrl(false) ?>';
132
- this.request(this.loader.dataUrl, false);
133
- }
134
- },
135
-
136
- expandTree : function() {
137
- this.expandAll();
138
- if (this.collapsed) {
139
- this.collapsed = false;
140
- this.loader.dataUrl = '<?php echo $this->getLoadTreeUrl(true) ?>';
141
- this.request(this.loader.dataUrl, false);
142
- }
143
- },
144
-
145
- categoryClick : function(node, e) {
146
- var baseUrl = '<?php echo $this->getEditUrl() ?>';
147
- var urlExt = (this.storeId?'store/'+this.storeId+'/':'')+'id/'+node.id+'/';
148
- var url = parseSidUrl(baseUrl, urlExt);
149
- var params = {};
150
-
151
- this.currentNodeId = node.id;
152
- this.addNodeTo = false;
153
- if (!this.useAjax) {
154
- setLocation(url);
155
- return;
156
- }
157
-
158
- updateContent(url, params);
159
- }
160
- });
161
-
162
- function reRenderTree(event, switcher) {
163
- // re-render tree by store switcher
164
- if (tree && event) {
165
- var obj = event.target;
166
- var newStoreId = obj.value * 1;
167
- var storeParam = newStoreId ? 'store/'+newStoreId + '/' : '';
168
-
169
- if (obj.switchParams) {
170
- storeParam += obj.switchParams;
171
- }
172
- if (switcher.useConfirm) {
173
- if (!confirm("<?php echo $this->__('Please confirm site switching. All data that hasn\'t been saved will be lost.') ?>")){
174
- obj.value = '<?php echo (int) $this->getStoreId() ?>';
175
- return false;
176
- }
177
- }
178
-
179
- // retain current selected category id
180
- storeParam = storeParam + 'id/' + tree.currentNodeId + '/';
181
- var url = tree.switchTreeUrl + storeParam;
182
-
183
- // load from cache
184
- // load from ajax
185
- new Ajax.Request(url + (url.match(new RegExp('\\?')) ? '&isAjax=true' : '?isAjax=true' ), {
186
- parameters : {store: newStoreId, form_key: FORM_KEY},
187
- method : 'post',
188
- onComplete : function(transport) {
189
- var response = eval('(' + transport.responseText + ')');
190
- if (!response['parameters']) {
191
- return false;
192
- }
193
-
194
- _renderNewTree(response, storeParam);
195
- }
196
- });
197
- }
198
- // render default tree
199
- else {
200
- _renderNewTree();
201
- }
202
- }
203
-
204
- function _renderNewTree(config, storeParam) {
205
- if (!config) {
206
- var config = defaultLoadTreeParams;
207
- }
208
- if (tree) {
209
- tree.purgeListeners();
210
- tree.el.dom.innerHTML = '';
211
- }
212
- tree = new Ext.tree.TreePanel.Enhanced('tree-div', newTreeParams);
213
- tree.loadTree(config, true);
214
-
215
- // try to select current category
216
- var selectedNode = tree.getNodeById(config.parameters.category_id);
217
- if (selectedNode)
218
- {
219
- tree.currentNodeId = config.parameters.category_id;
220
- }
221
- tree.selectCurrentNode();
222
-
223
- // update content area
224
- var url = tree.editUrl;
225
- if (storeParam) {
226
- url = url + storeParam;
227
- }
228
- }
229
-
230
-
231
- Ext.onReady(function() {
232
- categoryLoader = new Ext.tree.TreeLoader({
233
- dataUrl: '<?php echo $this->getLoadTreeUrl() ?>'
234
- });
235
-
236
- categoryLoader.createNode = function(config) {
237
- var node;
238
- var _node = Object.clone(config);
239
- if (config.children && !config.children.length) {
240
- delete(config.children);
241
- node = new Ext.tree.AsyncTreeNode(config);
242
- } else {
243
- node = new Ext.tree.TreeNode(config);
244
- }
245
-
246
- return node;
247
- };
248
-
249
- categoryLoader.buildCategoryTree = function(parent, config) {
250
- if (!config) return null;
251
-
252
- if (parent && config && config.length){
253
- for (var i = 0; i < config.length; i++) {
254
- var node;
255
- var _node = Object.clone(config[i]);
256
- if (_node.children && !_node.children.length) {
257
- delete(_node.children);
258
- node = new Ext.tree.AsyncTreeNode(_node);
259
- } else {
260
- node = new Ext.tree.TreeNode(config[i]);
261
- }
262
- parent.appendChild(node);
263
- node.loader = node.getOwnerTree().loader;
264
- if (_node.children) {
265
- this.buildCategoryTree(node, _node.children);
266
- }
267
- }
268
- }
269
- };
270
-
271
- categoryLoader.buildHash = function(node) {
272
- var hash = {};
273
-
274
- hash = this.toArray(node.attributes);
275
-
276
- if (node.childNodes.length>0 || (node.loaded==false && node.loading==false)) {
277
- hash['children'] = new Array;
278
-
279
- for (var i = 0, len = node.childNodes.length; i < len; i++) {
280
- if (!hash['children']) {
281
- hash['children'] = new Array;
282
- }
283
- hash['children'].push(this.buildHash(node.childNodes[i]));
284
- }
285
- }
286
-
287
- return hash;
288
- };
289
-
290
- categoryLoader.toArray = function(attributes) {
291
- var data = {form_key: FORM_KEY};
292
- for (var key in attributes) {
293
- var value = attributes[key];
294
- data[key] = value;
295
- }
296
-
297
- return data;
298
- };
299
-
300
- categoryLoader.on("beforeload", function(treeLoader, node) {
301
- treeLoader.baseParams.id = node.attributes.id;
302
- treeLoader.baseParams.store = node.attributes.store;
303
- treeLoader.baseParams.form_key = FORM_KEY;
304
- });
305
-
306
- categoryLoader.on("load", function(treeLoader, node, config) {
307
- varienWindowOnload();
308
- });
309
-
310
- if ((typeof varienStoreSwitcher)!='undefined') {
311
- varienStoreSwitcher.storeSelectorClickCallback = reRenderTree;
312
- }
313
-
314
- newTreeParams = {
315
- animate : false,
316
- loader : categoryLoader,
317
- enableDD : true,
318
- containerScroll : true,
319
- selModel : new Ext.tree.CheckNodeMultiSelectionModel(),
320
- rootVisible : '<?php echo $this->getRoot()->getIsVisible() ?>',
321
- useAjax : <?php echo $this->getUseAjax() ?>,
322
- switchTreeUrl : '<?php echo $this->getSwitchTreeUrl() ?>',
323
- editUrl : '<?php echo $this->getEditUrl() ?>',
324
- currentNodeId : <?php echo (int) $this->getCategoryId() ?>,
325
- addNodeTo : false//,
326
- };
327
-
328
- defaultLoadTreeParams = {
329
- parameters : {
330
- text : '<?php echo htmlentities($this->getRoot()->getName()) ?>',
331
- draggable : false,
332
- allowDrop : '<?php if ($this->getRoot()->getIsVisible()): ?>true<?php else : ?>false<?php endif; ?>',
333
- id : '<?php echo (int) $this->getRoot()->getId() ?>',
334
- expanded : '<?php echo (int) $this->getIsWasExpanded() ?>',
335
- store_id : '<?php echo (int) $this->getStore()->getId() ?>',
336
- category_id : '<?php echo (int) $this->getCategoryId() ?>'
337
- },
338
- data : <?php echo $this->getTreeJson() ?>
339
- };
340
-
341
- reRenderTree();
342
- });
343
-
344
- function addNew(url, isRoot) {
345
- if (isRoot) {
346
- tree.currentNodeId = tree.root.id;
347
- }
348
- tree.addNodeTo = tree.currentNodeId;
349
-
350
- if (/store\/\d+/.test(url)) {
351
- url = url.replace(/store\/\d+/, "store/" + tree.storeId);
352
- }
353
- else {
354
- url+= "store/" + tree.storeId + "/";
355
- }
356
-
357
- url+= 'parent/'+tree.currentNodeId;
358
- updateContent(url);
359
- }
360
-
361
- function categoryMove(obj) {
362
- var data = {id: obj.dropNode.id, form_key: FORM_KEY};
363
-
364
- data.point = obj.point;
365
- switch (obj.point) {
366
- case 'above' :
367
- data.pid = obj.target.parentNode.id;
368
- data.paid = obj.dropNode.parentNode.id;
369
- if (obj.target.previousSibling) {
370
- data.aid = obj.target.previousSibling.id;
371
- } else {
372
- data.aid = 0;
373
- }
374
- break;
375
- case 'below' :
376
- data.pid = obj.target.parentNode.id;
377
- data.aid = obj.target.id;
378
- break;
379
- case 'append' :
380
- data.pid = obj.target.id;
381
- data.paid = obj.dropNode.parentNode.id;
382
- if (obj.target.lastChild) {
383
- data.aid = obj.target.lastChild.id;
384
- } else {
385
- data.aid = 0;
386
- }
387
- break;
388
- default :
389
- obj.cancel = true;
390
- return obj;
391
- }
392
-
393
- var success = function(o) {
394
- try {
395
- if(o.responseText){
396
- if(o.responseText==='SUCCESS'){
397
- categoryForm.refreshPath();
398
- } else {
399
- alert(o.responseText);
400
- location.reload();
401
- }
402
- }
403
- }
404
- catch(e) {
405
- }
406
- };
407
-
408
- var failure = function(o) {
409
- try {
410
- console.log(o.statusText);
411
- } catch (e2) {
412
- alert(o.statusText);
413
- }
414
- location.reload();
415
- };
416
-
417
- var pd = [];
418
- for(var key in data) {
419
- pd.push(encodeURIComponent(key), "=", encodeURIComponent(data[key]), "&");
420
- }
421
- pd.splice(pd.length-1,1);
422
- new Ajax.Request(
423
- '<?php echo $this->getMoveUrl() ?>',
424
- {
425
- method: 'POST',
426
- parameters: pd.join(""),
427
- onSuccess : success,
428
- onFailure : failure
429
- }
430
- );
431
- }
432
-
433
- function categoryReset(url,useAjax) {
434
- if (useAjax) {
435
- var params = {active_tab_id:false};
436
- updateContent('<?php echo $this->getResetUrl() ?>', params);
437
- } else {
438
- location.href = '<?php echo $this->getResetUrl() ?>'
439
- }
440
- }
441
-
442
- function categoryDelete(url, useAjax) {
443
- if (confirm('<?php echo Mage::helper('catalog')->__('Are you sure you want to delete this category?') ?>')) {
444
- if (useAjax) {
445
- tree.nodeForDelete = tree.currentNodeId;
446
- updateContent(url, {}, true);
447
- } else {
448
- location.href = url;
449
- }
450
- }
451
- }
452
-
453
- /**
454
- * Update category content area
455
- */
456
- function updateContent(url, params, refreshTree) {
457
- if (!params) {
458
- params = {};
459
- }
460
- if (!params.form_key) {
461
- params.form_key = FORM_KEY;
462
- }
463
-
464
- var categoryContainer = $('category-edit-container');
465
- var messagesContainer = $('messages');
466
- new Ajax.Request(url + (url.match(new RegExp('\\?')) ? '&isAjax=true' : '?isAjax=true' ), {
467
- parameters: params,
468
- evalScripts: true,
469
- onComplete: refreshTree ? refreshTreeArea.bind(this) : false,
470
- onSuccess: function(transport) {
471
- try {
472
- if (transport.responseText.isJSON()) {
473
- var response = transport.responseText.evalJSON();
474
- var needUpdate = true;
475
- if (response.error) {
476
- alert(response.message);
477
- needUpdate = false;
478
- }
479
- if(response.ajaxExpired && response.ajaxRedirect) {
480
- setLocation(response.ajaxRedirect);
481
- needUpdate = false;
482
- }
483
- if (needUpdate) {
484
- if (response.content) {
485
- $(categoryContainer).update(response.content);
486
- }
487
- if (response.messages){
488
- $(messagesContainer).update(response.messages);
489
- }
490
- }
491
- } else {
492
- $(categoryContainer).update(transport.responseText);
493
- }
494
- }
495
- catch (e) {
496
- $(categoryContainer).update(transport.responseText);
497
- }
498
- }
499
- });
500
- var headers = $$('div.content-header-floating');
501
- for(var i=0; i<headers.length;i++) {
502
- if (headers[i].down('div.content-header')) {
503
- headers[i].down('div.content-header').remove();
504
- }
505
- }
506
- }
507
-
508
- /**
509
- * Refresh tree nodes after saving or deleting a category
510
- */
511
- function refreshTreeArea(transport) {
512
- if (tree && editingCategoryBreadcrumbs) {
513
- // category deleted - delete its node
514
- if (tree.nodeForDelete) {
515
- var parentNode = tree.getNodeById(tree.nodeForDelete).parentNode;
516
- parentNode.removeChild(tree.getNodeById(tree.nodeForDelete));
517
- tree.nodeForDelete = false;
518
- tree.currentNodeId = false;
519
- }
520
- // category created - add its node
521
- else if (tree.addNodeTo) {
522
- var parent = tree.getNodeById(tree.currentNodeId);
523
- var node = new Ext.tree.AsyncTreeNode(editingCategoryBreadcrumbs[editingCategoryBreadcrumbs.length - 1]);
524
- node.loaded = true;
525
- tree.addNodeTo = false;
526
- tree.currentNodeId = node.id;
527
- parent.appendChild(node);
528
-
529
- if (parent.expanded) {
530
- tree.selectCurrentNode();
531
- } else {
532
- var timer;
533
- parent.expand();
534
- var f = function(){
535
- if(parent.expanded){ // done expanding
536
- clearInterval(timer);
537
- tree.selectCurrentNode();
538
- }
539
- };
540
- timer = setInterval(f, 200);
541
- }
542
- }
543
-
544
- // update all affected categories nodes names
545
- for (var i = 0; i < editingCategoryBreadcrumbs.length; i++) {
546
- var node = tree.getNodeById(editingCategoryBreadcrumbs[i].id);
547
- if (node) {
548
- node.setText(editingCategoryBreadcrumbs[i].text);
549
- }
550
- }
551
- }
552
- }
553
-
554
- function displayLoadingMask() {
555
- var loaderArea = $$('#html-body .wrapper')[0]; // Blocks all page
556
- Position.clone($(loaderArea), $('loading-mask'), {offsetLeft:-2});
557
- toggleSelectsUnderBlock($('loading-mask'), false);
558
- Element.show('loading-mask');
559
- }
560
- //]]>
561
- </script>
562
- <?php endif; ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/design/adminhtml/default/default/template/sac/categorytreeformcontainer.phtml DELETED
@@ -1,39 +0,0 @@
1
- <?php
2
- /**
3
- * 2000-2012 FIA-NET
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the Open Software License (OSL 3.0) that is available
8
- * through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
9
- * If you are unable to obtain it through the world-wide-web, please contact us
10
- * via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
11
- *
12
- * @author FIA-NET <support-boutique@fia-net.com>
13
- * @copyright 2000-2012 FIA-NET
14
- * @version Release: $Revision: 1.0.3 $
15
- * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
16
- */
17
- ?>
18
- <div id="category-edit-container" class="category-content">
19
- <?php echo $this->getFormInitScripts() ?>
20
- <div class="content-header">
21
- <?php echo $this->getHeaderHtml() ?>
22
- <p class="content-buttons form-buttons"><?php echo $this->getButtonsHtml('header') ?></p>
23
- </div>
24
-
25
- <form action="<?php echo $this->getFormActionUrl() ?>" method="post" id="edit_form">
26
- <?php echo $this->getChildHtml('form') ?>
27
- </form>
28
-
29
- <?php if ($this->hasFooterButtons()): ?>
30
- <div class="content-footer">
31
- <p class="content-buttons form-buttons"><?php echo $this->getButtonsHtml('footer') ?></p>
32
- </div>
33
- <?php endif; ?>
34
- <script type="text/javascript">
35
- var editForm = new varienForm('edit_form', '<?php echo $this->getValidationUrl() ?>');
36
- </script>
37
- <?php echo $this->getFormScripts() ?>
38
- <?php echo $this->getChildHtml('googleoptimizer_js') ?>
39
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/design/adminhtml/default/default/template/sac/shipping.phtml DELETED
@@ -1,82 +0,0 @@
1
- <?php
2
- /**
3
- * 2000-2012 FIA-NET
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the Open Software License (OSL 3.0) that is available
8
- * through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
9
- * If you are unable to obtain it through the world-wide-web, please contact us
10
- * via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
11
- *
12
- * @author FIA-NET <support-boutique@fia-net.com>
13
- * @copyright 2000-2012 FIA-NET
14
- * @version Release: $Revision: 1.0.3 $
15
- * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
16
- */
17
- ?>
18
- <div class="content-header">
19
- <table cellspacing="0" class="grid-header">
20
- <tr>
21
- <td><h3><?php echo $this->__('Shipping type'); ?></h3></td>
22
- <td class="a-right">
23
- <button id="1021" type="button" class="scalable save" onclick="editForm.submit();" style=""><span><?php echo $this->__('Save'); ?></span></button>
24
- </td>
25
- </tr>
26
- </table>
27
- </div>
28
- <h4 class="icon-head head-edit-form fieldset-legend"><?php echo $this->__('Shipping methods list'); ?></h4>
29
- <div class="entry-edit">
30
- <form id="edit_form" name="edit_form" method="post" action="<?php echo $this->getUrl('*/*/post'); ?>">
31
- <?php echo $this->getBlockHtml('formkey') ?>
32
- <fieldset id="my-fieldset">
33
- <table cellspacing="0" class="form-list">
34
- <tr>
35
- <th><?php echo $this->__('Shipping method'); ?></th>
36
- <th><?php echo $this->__('FIA-NET Shipping type'); ?></th>
37
- <th><?php echo $this->__('Shipping speed'); ?></th>
38
- <th><?php echo $this->__('Conveyor'); ?></th>
39
- </tr>
40
- <?php
41
- $shipping_list = $this->shipping;
42
- $ShippingType = Mage::getModel("sac/source_shippingtype")->toOptionArray();
43
- $DeliveryTimes = Mage::getModel("sac/source_deliverytimes")->toOptionArray();
44
- foreach ($shipping_list as $Code => $label) {
45
- $current_shipping = Mage::getModel('fianet/shipping_association')->load($Code);
46
- echo '<tr>';
47
- echo '<td class="label">' . $label . '</td>';
48
- echo '<td class="input-ele"><select name="' . $Code . '[shippingType]">';
49
- foreach ($ShippingType as $data) {
50
- $sel = '';
51
- if ($current_shipping->shipping_code == null && $data['value'] == '4') {
52
- $sel = ' selected';
53
- } elseif ($current_shipping->shipping_code != null) {
54
- $sel = $current_shipping->fianet_shipping_type == $data['value'] ? ' selected' : '';
55
- }
56
- echo '<option value="' . $data['value'] . '"' . $sel . '>' . $data['label'] . '</option>';
57
- }
58
- echo '</select></td>';
59
- echo '<td class="input-ele"><select name="' . $Code . '[deliveryTimes]">';
60
- foreach ($DeliveryTimes as $data) {
61
- $sel = '';
62
- if ($current_shipping->shipping_code == null && $data['value'] == '2') {
63
- $sel = ' selected';
64
- } elseif ($current_shipping->shipping_code != null) {
65
- $sel = $current_shipping->delivery_times == $data['value'] ? ' selected' : '';
66
- }
67
- echo '<option value="' . $data['value'] . '"' . $sel . '>' . $data['label'] . '</option>';
68
- }
69
- echo '</select></td>';
70
- $val = $current_shipping->shipping_code == null ? $this->__('To define') : $current_shipping->conveyor_name;
71
- echo '<td class="input-ele">
72
- <input type="text" name="' . $Code . '[conveyorName]" value="' . $val . '"></td>';
73
- echo '</tr>';
74
- }
75
- ?>
76
- </table>
77
- </fieldset>
78
- </form>
79
- </div>
80
- <script type="text/javascript">
81
- var editForm = new varienForm('edit_form', '');
82
- </script>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/design/adminhtml/default/default/template/sac/storeswitcher.phtml DELETED
@@ -1,97 +0,0 @@
1
- <?php
2
- /**
3
- * 2000-2012 FIA-NET
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the Open Software License (OSL 3.0) that is available
8
- * through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
9
- * If you are unable to obtain it through the world-wide-web, please contact us
10
- * via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
11
- *
12
- * @author FIA-NET <support-boutique@fia-net.com>
13
- * @copyright 2000-2012 FIA-NET
14
- * @version Release: $Revision: 1.0.3 $
15
- * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
16
- */
17
- ?>
18
- <?php $_websiteCollection = $this->getWebsiteCollection() ?>
19
- <?php if ($_websiteCollection->getSize()): ?>
20
- <div style="margin-right:10px;">
21
- <p class="switcher">
22
- <label for="store_switcher">
23
- <?php
24
- $scope = 'group_id';
25
-
26
- if ($scope == 'group_id') {
27
- echo $this->Helper('sac')->__('Choose Store');
28
- } elseif ($scope == 'website_id') {
29
- echo $this->Helper('sac')->__('Choose Website');
30
- } elseif ($scope == 'store_id') {
31
- echo $this->Helper('sac')->__('Choose Store view');
32
- }
33
- ?>:
34
- </label>
35
- <select name="store_switcher" id="store_switcher" class="left-col-block" onchange="return switchStore(this);">
36
- <option value=""><?php echo $this->getDefaultStoreName() ?></option>
37
- <?php if ($scope == 'group_id') {
38
- foreach ($_websiteCollection as $_website) {
39
- echo '<optgroup label="' . $_website->getName() . '">';
40
- foreach ($this->getGroupCollection($_website) as $_group) {
41
- $sel = $this->getStoreId() == $_group->getId() ? ' selected' : '';
42
- echo '<option value="' . $_group->getId() . '"' . $sel . '>' . $_group->getName() . '</option>';
43
- }
44
- echo '</optgroup>';
45
- }
46
- } elseif ($scope == 'website_id') {
47
- foreach ($_websiteCollection as $_website) {
48
- $sel = $this->getStoreId() == $_website->getId() ? ' selected' : '';
49
- echo '<option value="' . $_website->getId() . '"' . $sel . '>' . $_website->getName() . '</option>';
50
- }
51
- } elseif ($scope == 'store_id') {
52
- foreach ($_websiteCollection as $_website) {
53
- $showWebsite = false;
54
- foreach ($this->getGroupCollection($_website) as $_group) {
55
- $showGroup = false;
56
- foreach ($this->getStoreCollection($_group) as $_store) {
57
- if ($showWebsite == false) {
58
- $showWebsite = true;
59
- echo '<optgroup label="' . $_website->getName() . '"></optgroup>';
60
- }
61
- if ($showGroup == false) {
62
- $showGroup = true;
63
- echo '<optgroup label="&nbsp;&nbsp;&nbsp;' . $_group->getName() . '">';
64
- }
65
- $sel = $this->getStoreId() == $_store->getId() ? ' selected' : '';
66
- echo '<option value="' . $_store->getId() . '"' . $sel . '>&nbsp;&nbsp;&nbsp;&nbsp;' . $_store->getName() . '</option>';
67
- }
68
- if ($showGroup) {
69
- echo '</optgroup>';
70
- }
71
- }
72
- }
73
- } ?>
74
- </select>
75
- </p>
76
- </div>
77
- <script type="text/javascript">
78
- function switchStore(obj){
79
- var storeParam = obj.value ? 'store/'+obj.value + '/' : '';
80
- if(obj.switchParams){
81
- storeParam+= obj.switchParams;
82
- }
83
- <?php if ($this->getUseConfirm()): ?>
84
- if(confirm("<?php echo $this->__('Please confirm site switching. All data that hasn\'t been saved will be lost.') ?>")){
85
- setLocation('<?php echo $this->getSwitchUrl() ?>'+storeParam);
86
- return true;
87
- }
88
- else {
89
- obj.value = '<?php echo $this->getStoreId() ?>';
90
- }
91
- return false;
92
- <?php else: ?>
93
- setLocation('<?php echo $this->getSwitchUrl() ?>'+storeParam);
94
- <?php endif; ?>
95
- }
96
- </script>
97
- <?php endif; ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/etc/modules/Fianet_Sac.xml CHANGED
@@ -12,7 +12,7 @@
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2012 FIA-NET
15
- * @version Release: $Revision: 1.0.3 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  -->
@@ -24,7 +24,7 @@
24
  <depends>
25
  <Fianet_Core />
26
  </depends>
27
- <version>1.0.3</version>
28
  </Fianet_Sac>
29
  </modules>
30
  </config>
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2012 FIA-NET
15
+ * @version Release: $Revision: 1.0.4 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  -->
24
  <depends>
25
  <Fianet_Core />
26
  </depends>
27
+ <version>1.0.4</version>
28
  </Fianet_Sac>
29
  </modules>
30
  </config>
app/locale/fr_FR/Fianet_Sac.csv CHANGED
@@ -10,7 +10,7 @@
10
  "The site ID is provided in your Certissim account","Le Site ID est fourni dans votre compte Certissim"
11
  "The Login is provided in your Certissim account","Le Login est fourni dans votre compte Certissim"
12
  "The Password is provided in your Certissim account","Le Mot de passe est fourni dans votre compte Certissim"
13
- "Maximum delay to sending commands (in day)","Délai maximum d'envoi des commandes en jour"
14
  "Orders placed before this time will not be sent to CERTISSIM","Les commandes passées il y a plus de X jours ne seront pas soumises au système Certissim"
15
  "List of Magento's Statuses","Liste des Statuts Magento"
16
  "Select the status for which the transaction will be sent to CERTISSIM system (multiple selections possible)","Selectionnez le statut pour lequel la transaction sera soumise au système Certissim (multisélection possible)"
@@ -18,10 +18,12 @@
18
  "Test URL","URL de Test"
19
  "Sending script's orders","Script d'envoi des commandes"
20
  "Recovery script's evaluations","Script de récupération des évaluations"
21
- "Recovery script's reevaluations","Script de r&écupération des réévaluations"
22
- "CERTISSIM Interface","Interface CERTISSIM"
23
  "Check XML","Page de vérification du flux XML"
 
24
 
 
25
  "Certissim: invalid form data.","Certissim : données de formulaire invalides."
26
  "Certissim: invalid order #%s.","Certissim : commande #%s invalide."
27
  "Certissim: module disabled, order #%s not sent.","Certissim : module désactivé, commande #%s non envoyée."
@@ -32,7 +34,7 @@
32
  "Certissim: order #%s not sent - state: %s.","Certissim : commande #%s non envoyée - state : %s."
33
  "Certissim: order #%s not sent - paymentMethod: %s.","Certissim : commande #%s non envoyée - Méthode de paiement : %s."
34
  "Certissim: order #%s not sent - billing country: %s - shipping country: %s.","Certissim : commande #%s non envoyée - Pays de facturation : %s - Pays de livraison : %s."
35
- "Certissim: order %s sent and is currently in state: %s.","Certissim : commande #%s envoyée et actuellement dans l'état : %s."
36
  "Certissim: new send evaluation request.","Certissim : nouvel envoi de commandes."
37
  "Certissim: sending request ended. %s order(s) sent.","Certissim : demande d'envoi terminé. %s commande(s) envoyée(s)."
38
  "Certissim: sending missing order #%s, payment type is %s.","Certissim : envoi des commandes absentes #%s, type de paiement %s."
@@ -52,5 +54,5 @@
52
  "Certissim: automatic sending order #%s, payment type is %s.","Certissim : envoi automatique de la commande #%s, type de paiement %s."
53
  "Certissim: evaluation of the order #%s has been received ","Certissim : l'évaluation de la commande #%s a été reçue "
54
  "(status: \'%s\').","(statut : \'%s\')."
55
- "(score: \'%s\' - ClassementID: \'%s\').","(score : \'%s\' - ClassementID : \'%s\')."
56
  "Certissim: %s.","Certissim : %s."
10
  "The site ID is provided in your Certissim account","Le Site ID est fourni dans votre compte Certissim"
11
  "The Login is provided in your Certissim account","Le Login est fourni dans votre compte Certissim"
12
  "The Password is provided in your Certissim account","Le Mot de passe est fourni dans votre compte Certissim"
13
+ "Maximum delay to sending commands (in day)","Délai maximum d'envoi des commandes (en jours)"
14
  "Orders placed before this time will not be sent to CERTISSIM","Les commandes passées il y a plus de X jours ne seront pas soumises au système Certissim"
15
  "List of Magento's Statuses","Liste des Statuts Magento"
16
  "Select the status for which the transaction will be sent to CERTISSIM system (multiple selections possible)","Selectionnez le statut pour lequel la transaction sera soumise au système Certissim (multisélection possible)"
18
  "Test URL","URL de Test"
19
  "Sending script's orders","Script d'envoi des commandes"
20
  "Recovery script's evaluations","Script de récupération des évaluations"
21
+ "Recovery script's reevaluations","Script de récupération des réévaluations"
22
+ "CERTISSIM Interface","URL de visualisation des évaluations"
23
  "Check XML","Page de vérification du flux XML"
24
+ "Activate management of downloadable/virtual products","Activer la gestion des produits téléchargeables/virtuels"
25
 
26
+ "Certissim: order #%s. Error with SoColissimo's return. Product Code %s was not recognized.","Certissim : commande #%s. Erreur de retour SoColissimo. Le Code Product %s n'a pas été reconnu."
27
  "Certissim: invalid form data.","Certissim : données de formulaire invalides."
28
  "Certissim: invalid order #%s.","Certissim : commande #%s invalide."
29
  "Certissim: module disabled, order #%s not sent.","Certissim : module désactivé, commande #%s non envoyée."
34
  "Certissim: order #%s not sent - state: %s.","Certissim : commande #%s non envoyée - state : %s."
35
  "Certissim: order #%s not sent - paymentMethod: %s.","Certissim : commande #%s non envoyée - Méthode de paiement : %s."
36
  "Certissim: order #%s not sent - billing country: %s - shipping country: %s.","Certissim : commande #%s non envoyée - Pays de facturation : %s - Pays de livraison : %s."
37
+ "Certissim: order #%s sent and is currently in state: %s.","Certissim : commande #%s envoyée et actuellement dans l'état : %s."
38
  "Certissim: new send evaluation request.","Certissim : nouvel envoi de commandes."
39
  "Certissim: sending request ended. %s order(s) sent.","Certissim : demande d'envoi terminé. %s commande(s) envoyée(s)."
40
  "Certissim: sending missing order #%s, payment type is %s.","Certissim : envoi des commandes absentes #%s, type de paiement %s."
54
  "Certissim: automatic sending order #%s, payment type is %s.","Certissim : envoi automatique de la commande #%s, type de paiement %s."
55
  "Certissim: evaluation of the order #%s has been received ","Certissim : l'évaluation de la commande #%s a été reçue "
56
  "(status: \'%s\').","(statut : \'%s\')."
57
+ "(score: \'%s\' - statutCoEx: \'%s\').","(score : \'%s\' - statutCoEx : \'%s\')."
58
  "Certissim: %s.","Certissim : %s."
package.xml CHANGED
@@ -1,18 +1,18 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Fianet_Sac</name>
4
- <version>1.0.3</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.opensource.org/licenses/OSL-3.0">Open Software License (OSL 3.0)</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>FIA-NET Certissim</summary>
10
  <description>Anti-Fraud System</description>
11
- <notes>fourth official commit</notes>
12
  <authors><author><name>FIA-NET</name><user>auto-converted</user><email>support-boutique@fia-net.com</email></author></authors>
13
- <date>2013-08-05</date>
14
- <time>13:39:22</time>
15
- <contents><target name="magecommunity"><dir name="Fianet"><dir name="Sac"><dir name="Block"><dir name="Adminhtml"><dir name="Payment"><dir name="Edit"><file name="Form.php" hash="38a614ed3c538fc44ac0d184b9251a6a"/></dir><file name="Configuration.php" hash="6eefe707e06e9d7326c233caf566902a"/></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="e06001e21c705fd493c9f8d326eec60d"/><file name="Order.php" hash="50f26b0abf717cbdd282051425e2ad12"/></dir><dir name="Model"><dir name="Fianet"><dir name="Order"><dir name="Info"><file name="Sac.php" hash="340eac385dc048412024a4c24f0f1e14"/></dir><file name="Sac.php" hash="c8acd007d1b9d4270d6f7cd4f61b79ef"/></dir></dir><dir name="Mysql4"><dir name="Payment"><dir name="Association"><file name="Collection.php" hash="ec99106bccaa408c14843ed637b387a3"/></dir><file name="Association.php" hash="902064bb1799026a56b8b3c4493ecfa8"/></dir></dir><dir name="Payment"><file name="Association.php" hash="6a297c6dfb06d7b41464d2606b12c540"/></dir><dir name="Source"><file name="Statut.php" hash="e573a44afce483edf0147722b3564dc1"/><file name="Type.php" hash="1cdcfc699eeef7e8dc2c07f246eb6076"/></dir><file name="Action.php" hash="2230f1df5ff9e169001e8028af3d8ddc"/><file name="Observer.php" hash="26e66a31815e3fc7f2cb23669755b08b"/><file name="Product.php" hash="de63f45eb49ad8d4c4249674f92c7c70"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="PaymentController.php" hash="587018396432bb0f424b9fb970f61deb"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="3c02ab9b5bafb581aa4e64f990598897"/><file name="config.xml" hash="47a8c7d1ad5742d6168ff7e4e652fb4a"/><file name="system.xml" hash="457c1673205bfd500b7319bbf6843796"/></dir><dir name="sql"><dir name="sac_setup"><file name="mysql4-install-0.0.1.php" hash="11cea9c591db840d3731cb768eaf532c"/><file name="mysql4-upgrade-0.0.1-0.0.2.php" hash="09ed6674356ae7c88eea38267c301cb1"/><file name="mysql4-upgrade-0.0.10-0.0.11.php" hash="c608d3b33e36988932ad953045d28f96"/><file name="mysql4-upgrade-0.0.11-0.0.12.php" hash="8e70097ac584522e4c7110fdf942734f"/><file name="mysql4-upgrade-0.0.12-0.0.13.php" hash="bcdb7908ebebf187183be88cee6c1829"/><file name="mysql4-upgrade-0.0.13-1.0.0.php" hash="3ca1cab02490d492e589b35fb10c7e76"/><file name="mysql4-upgrade-0.0.2-0.0.3.php" hash="541bbc1c6f9dd4767e3d4f933ab63204"/><file name="mysql4-upgrade-0.0.3-0.0.4.php" hash="e92c5808f8c7258044e623c532f69a75"/><file name="mysql4-upgrade-0.0.4-0.0.5.php" hash="32913cbdd797a5d1ef1f113efaf112a7"/><file name="mysql4-upgrade-1.0.0-1.0.1.php" hash="d2dc6542003443f1c701eb448b5033f1"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="sac.xml" hash="7604c1e4e4030a7ce235eed50b86aed3"/></dir><dir name="template"><dir name="sac"><file name="categoriestree.phtml" hash="14c4500510ddeb72857b6227ff21f46e"/><file name="categorytreeformcontainer.phtml" hash="03bfc3f2d8e7597f57d5c76dbbbfa888"/><file name="shipping.phtml" hash="d38ec3340844fb26d388c34941f11fb1"/><file name="storeswitcher.phtml" hash="90d65a84e5d2e46a89f908d87010a7bf"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Fianet_Sac.xml" hash="fe5d24afe7128a3e8cc01cd5b81ca9ee"/></dir></target><target name="magelocale"><dir name="fr_FR"><file name="Fianet_Sac.csv" hash="ec2b838d09b4579366af859a071a528a"/></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="images"><dir name="fianet"><file name="attention.gif" hash="d85cab75ed2cba677829db26b1f0a6c2"/><file name="CE_picto_orange.gif" hash="6805aa75f9bb9e85d9b71e525852c515"/><file name="CE_picto_rouge.gif" hash="9d0b3298b2f18db90db27a870bff1c1e"/><file name="CE_picto_vert.gif" hash="335dd69b814bfe155117126b65ddb303"/><file name="fianet_SAC_icon.gif" hash="be9ce72c9a2bd81611a9e82537a8e15a"/><file name="rond_rouge.gif" hash="c605401e88cd234a31691dc9e4a38b05"/><file name="rond_vert.gif" hash="ce704184ee159f7008f81af51a747e71"/><file name="rond_vertclair.gif" hash="b0310ca593cd539b88463d720df3cd60"/></dir></dir></dir></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><package><name>Fianet_Core</name><channel>community</channel><min></min><max></max></package></required></dependencies>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Fianet_Sac</name>
4
+ <version>1.0.4</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.opensource.org/licenses/OSL-3.0">Open Software License (OSL 3.0)</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>FIA-NET Certissim</summary>
10
  <description>Anti-Fraud System</description>
11
+ <notes>fifth official commit</notes>
12
  <authors><author><name>FIA-NET</name><user>auto-converted</user><email>support-boutique@fia-net.com</email></author></authors>
13
+ <date>2013-12-09</date>
14
+ <time>15:02:34</time>
15
+ <contents><target name="magecommunity"><dir name="Fianet"><dir name="Sac"><dir name="Block"><dir name="Adminhtml"><dir name="Payment"><dir name="Edit"><file name="Form.php" hash="897d11c9c36e3d329521c2d1b0fd9c61"/></dir><file name="Configuration.php" hash="8fc1cc8c21abb2b90c452e279418e128"/></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="15937bea26b6bce2dd2a347d17c715eb"/><file name="Order.php" hash="43a0dfe91aec820ec6e2d9f4c20e5505"/></dir><dir name="Model"><dir name="Fianet"><dir name="Order"><dir name="Info"><file name="Sac.php" hash="e395c18c8c2c682faf7b0b05d44c7cbd"/></dir><file name="Sac.php" hash="3a28f3b435d9b3b5d46f5e78c0b109de"/></dir></dir><dir name="Mysql4"><dir name="Payment"><dir name="Association"><file name="Collection.php" hash="1602acc70becb02beee59bfe2f68a710"/></dir><file name="Association.php" hash="c6a4eb992034b559c0cfbc836fa0e7bc"/></dir></dir><dir name="Payment"><file name="Association.php" hash="45ffb2ab35f7e1840a3a22f1e2f9d572"/></dir><dir name="Source"><file name="Statut.php" hash="524930842dc10330dbfddb8c374c7b91"/><file name="Type.php" hash="2f67cb5832d9b17002665bb4706d97c2"/></dir><file name="Action.php" hash="1170f3cec87fa9f6b6b70b4d72f9f1da"/><file name="Observer.php" hash="99292753535923f6e21a890166360d77"/><file name="Product.php" hash="8586bfe8a5f52b337c2c4adc80441764"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="PaymentController.php" hash="9d9dcec37e3ff5be94b89aefbc6ce2dc"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="4687fff593f3dda552f9471befe57d4e"/><file name="config.xml" hash="71fef7cb74e1c2f31ae839bb1f79cb6a"/><file name="system.xml" hash="69ad9190e0c6c8d8eca40de0a4c81fb6"/></dir><dir name="sql"><dir name="sac_setup"><file name="mysql4-install-0.0.1.php" hash="e14a1514fb9664bb726e16d8904a345d"/><file name="mysql4-upgrade-0.0.1-0.0.2.php" hash="0f00a02477516c373c912f358e78cc6b"/><file name="mysql4-upgrade-0.0.10-0.0.11.php" hash="69e89e6a35b0ef66e9588c1f29382084"/><file name="mysql4-upgrade-0.0.11-0.0.12.php" hash="bd5e3c93ce9ea99c98403c91234ecb36"/><file name="mysql4-upgrade-0.0.12-0.0.13.php" hash="73a9fd5f50852b779c65e89814ea9e12"/><file name="mysql4-upgrade-0.0.13-1.0.0.php" hash="93804c41b6393d5eca918134d80d8d1e"/><file name="mysql4-upgrade-0.0.2-0.0.3.php" hash="faa99cc41841aa90e90a9ee3d137230e"/><file name="mysql4-upgrade-0.0.3-0.0.4.php" hash="bde3874ee37f1c57725588adc6b76f0d"/><file name="mysql4-upgrade-0.0.4-0.0.5.php" hash="a96a22e56613d75613735a81c7f1393a"/><file name="mysql4-upgrade-1.0.0-1.0.1.php" hash="929f498e594e7e4bf3ad8c2f89b04e12"/><file name="mysql4-upgrade-1.0.3-1.0.4.php" hash="5efcc2255f662ac464ecd1f453eff003"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="sac.xml" hash="8995af2e3e667c30b4af8c32a1bdf191"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Fianet_Sac.xml" hash="369db69e13a6528699be9ec8f5edc89e"/></dir></target><target name="magelocale"><dir name="fr_FR"><file name="Fianet_Sac.csv" hash="2d38ebfce19c7e6476dde62360226c6a"/></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="images"><dir name="fianet"><file name="attention.gif" hash="d85cab75ed2cba677829db26b1f0a6c2"/><file name="fianet_SAC_icon.gif" hash="be9ce72c9a2bd81611a9e82537a8e15a"/><file name="rond_rouge.gif" hash="c605401e88cd234a31691dc9e4a38b05"/><file name="rond_vert.gif" hash="ce704184ee159f7008f81af51a747e71"/><file name="rond_vertclair.gif" hash="b0310ca593cd539b88463d720df3cd60"/><file name="rond_orange.gif" hash="b97b309b0b0dc155ee07b0198209d21e"/></dir></dir></dir></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><package><name>Fianet_Core</name><channel>community</channel><min></min><max></max></package></required></dependencies>
18
  </package>
skin/adminhtml/default/default/images/fianet/CE_picto_orange.gif DELETED
Binary file
skin/adminhtml/default/default/images/fianet/CE_picto_rouge.gif DELETED
Binary file
skin/adminhtml/default/default/images/fianet/CE_picto_vert.gif DELETED
Binary file
skin/adminhtml/default/default/images/fianet/rond_orange.gif ADDED
Binary file