Version Notes
Corrected tables' prefix bug
Added
Added some configuration properties
Download this release
Release Info
Developer | Magento Core Team |
Extension | Secuvad_Official |
Version | 1.2.5 |
Comparing to | |
See all releases |
Code changes from version 1.2.4 to 1.2.5
- app/code/community/Secuvad/Core/Model/Api.php +26 -11
- app/code/community/Secuvad/Core/Model/Config.php +10 -0
- app/code/community/Secuvad/Core/Model/Configuration/Config.php +0 -10
- app/code/community/Secuvad/Core/Model/Functions.php +29 -23
- app/code/community/Secuvad/Core/Model/Logs.php +32 -26
- app/code/community/Secuvad/Core/Model/Mysql4/Config.php +9 -0
- app/code/community/Secuvad/Core/Model/Mysql4/Config/Collection.php +10 -0
- app/code/community/Secuvad/Core/Model/Mysql4/Configuration/Config.php +0 -9
- app/code/community/Secuvad/Core/Model/Mysql4/Configuration/Config/Collection.php +0 -10
- app/code/community/Secuvad/Core/Model/Mysql4/Logs/Collection.php +18 -9
- app/code/community/Secuvad/Core/Model/Orders.php +20 -20
- app/code/community/Secuvad/Core/etc/config.xml +3 -3
- app/code/community/Secuvad/Core/sql/secuvad_setup/mysql4-install-1.2.0.php +24 -24
- app/code/community/Secuvad/Core/sql/secuvad_setup/mysql4-uninstall-1.2.0.php +9 -9
- app/code/community/Secuvad/Core/sql/secuvad_setup/mysql4-uninstall-1.2.5.php +23 -0
- app/code/community/Secuvad/Core/sql/secuvad_setup/mysql4-upgrade-1.2.4-1.2.5.php +22 -0
- package.xml +9 -7
app/code/community/Secuvad/Core/Model/Api.php
CHANGED
@@ -25,18 +25,33 @@ class Secuvad_Core_Model_Api extends Secuvad_Core_Model_Api_Resource
|
|
25 |
}
|
26 |
else
|
27 |
{
|
28 |
-
$
|
29 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
{
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
}
|
41 |
}
|
42 |
else
|
25 |
}
|
26 |
else
|
27 |
{
|
28 |
+
$website_id = (isset($website_id) && ! empty($website_id) ? $website_id : 0);
|
29 |
+
|
30 |
+
$current_config = Mage::getModel('secuvad/config')
|
31 |
+
->getCollection()
|
32 |
+
->addFieldToFilter('config_id', $key)
|
33 |
+
->addFieldToFilter('website_id', $website_id)
|
34 |
+
->getData();
|
35 |
+
|
36 |
+
if ($current_config)
|
37 |
{
|
38 |
+
Mage::getModel('secuvad/config')
|
39 |
+
->load($current_config[0]["id"])
|
40 |
+
->setValue($value)
|
41 |
+
->save();
|
42 |
+
|
43 |
+
return("OK");
|
44 |
+
}
|
45 |
+
else
|
46 |
+
{
|
47 |
+
Mage::getModel('secuvad/config')
|
48 |
+
->setConfigId($key)
|
49 |
+
->setWebsiteId($website_id)
|
50 |
+
->setValue($value)
|
51 |
+
->save();
|
52 |
+
|
53 |
+
return("OK");
|
54 |
+
}
|
55 |
}
|
56 |
}
|
57 |
else
|
app/code/community/Secuvad/Core/Model/Config.php
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Secuvad_Core_Model_Config extends Mage_Core_Model_Abstract
|
4 |
+
{
|
5 |
+
protected function _construct()
|
6 |
+
{
|
7 |
+
parent::_construct();
|
8 |
+
$this->_init('secuvad/config');
|
9 |
+
}
|
10 |
+
}
|
app/code/community/Secuvad/Core/Model/Configuration/Config.php
DELETED
@@ -1,10 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Secuvad_Core_Model_Configuration_Config extends Mage_Core_Model_Abstract
|
4 |
-
{
|
5 |
-
protected function _construct()
|
6 |
-
{
|
7 |
-
parent::_construct();
|
8 |
-
$this->_init('secuvad/configuration_config');
|
9 |
-
}
|
10 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Secuvad/Core/Model/Functions.php
CHANGED
@@ -5,17 +5,23 @@ class Secuvad_Core_Model_Functions
|
|
5 |
/* Envoi du rapport d'erreur */
|
6 |
public function send_error_report($probleme,$email)
|
7 |
{
|
|
|
8 |
$report = "idsecuvad=".$this->get_secuvad_id(-1)."\n\n";
|
9 |
$report .= "Mail : $email\n\n";
|
10 |
-
$report .= "Description du
|
11 |
$report .= "Fichier log :\n";
|
12 |
-
|
13 |
-
$
|
14 |
-
|
|
|
|
|
|
|
|
|
|
|
15 |
{
|
16 |
-
$report .= $
|
17 |
}
|
18 |
-
mail($this->get_secuvad_contact(),'Rapport d\'erreur
|
19 |
}
|
20 |
|
21 |
/* Envoi d'un flux xml vers secuvad */
|
@@ -49,10 +55,10 @@ class Secuvad_Core_Model_Functions
|
|
49 |
}
|
50 |
catch (Exception $e)
|
51 |
{
|
52 |
-
Mage::getModel('secuvad/logs')->
|
53 |
}
|
54 |
|
55 |
-
Mage::getModel('secuvad/logs')->
|
56 |
|
57 |
return ($response);
|
58 |
}
|
@@ -263,13 +269,13 @@ class Secuvad_Core_Model_Functions
|
|
263 |
$secuvad_mode = $this->get_secuvad_mode();
|
264 |
if($secuvad_mode == 'TEST')
|
265 |
{
|
266 |
-
$data = Mage::getResourceModel('secuvad/
|
267 |
->addFieldToFilter('config_id','SECUVAD_IP_TEST')
|
268 |
->getData();
|
269 |
}
|
270 |
else
|
271 |
{
|
272 |
-
$data = Mage::getResourceModel('secuvad/
|
273 |
->addFieldToFilter('config_id','SECUVAD_IP')
|
274 |
->getData();
|
275 |
}
|
@@ -287,13 +293,13 @@ class Secuvad_Core_Model_Functions
|
|
287 |
$secuvad_mode = $this->get_secuvad_mode();
|
288 |
if($secuvad_mode == 'TEST')
|
289 |
{
|
290 |
-
$data = Mage::getResourceModel('secuvad/
|
291 |
->addFieldToFilter('config_id','SECUVAD_URL_TEST')
|
292 |
->getData();
|
293 |
}
|
294 |
else
|
295 |
{
|
296 |
-
$data = Mage::getResourceModel('secuvad/
|
297 |
->addFieldToFilter('config_id','SECUVAD_URL_PROD')
|
298 |
->getData();
|
299 |
}
|
@@ -309,7 +315,7 @@ class Secuvad_Core_Model_Functions
|
|
309 |
|
310 |
public function get_secuvad_contact()
|
311 |
{
|
312 |
-
$data = Mage::getResourceModel('secuvad/
|
313 |
->addFieldToFilter('config_id','SECUVAD_CONTACT')
|
314 |
->getData();
|
315 |
if(isset($data[0]['value']))
|
@@ -323,7 +329,7 @@ class Secuvad_Core_Model_Functions
|
|
323 |
}
|
324 |
public function get_secuvad_mode()
|
325 |
{
|
326 |
-
$data = Mage::getResourceModel('secuvad/
|
327 |
->addFieldToFilter('config_id','SECUVAD_MODE')
|
328 |
->getData();
|
329 |
if(isset($data[0]['value']))
|
@@ -337,7 +343,7 @@ class Secuvad_Core_Model_Functions
|
|
337 |
}
|
338 |
public function get_secuvad_ip_config()
|
339 |
{
|
340 |
-
$data = Mage::getResourceModel('secuvad/
|
341 |
->addFieldToFilter('config_id','SECUVAD_IP_CONFIG')
|
342 |
->getData();
|
343 |
if(isset($data[0]['value']))
|
@@ -351,7 +357,7 @@ class Secuvad_Core_Model_Functions
|
|
351 |
}
|
352 |
public function get_secuvad_activation($website_id)
|
353 |
{
|
354 |
-
$data = Mage::getResourceModel('secuvad/
|
355 |
->addFieldToFilter('config_id','SECUVAD_ACTIVATION')
|
356 |
->addFieldToFilter('website_id',$website_id)
|
357 |
->getData();
|
@@ -366,7 +372,7 @@ class Secuvad_Core_Model_Functions
|
|
366 |
}
|
367 |
public function get_secuvad_login($website_id)
|
368 |
{
|
369 |
-
$data = Mage::getResourceModel('secuvad/
|
370 |
->addFieldToFilter('config_id','SECUVAD_LOGIN')
|
371 |
->addFieldToFilter('website_id',$website_id)
|
372 |
->getData();
|
@@ -381,7 +387,7 @@ class Secuvad_Core_Model_Functions
|
|
381 |
}
|
382 |
public function get_secuvad_mdp($website_id)
|
383 |
{
|
384 |
-
$data = Mage::getResourceModel('secuvad/
|
385 |
->addFieldToFilter('config_id','SECUVAD_MDP')
|
386 |
->addFieldToFilter('website_id',$website_id)
|
387 |
->getData();
|
@@ -396,7 +402,7 @@ class Secuvad_Core_Model_Functions
|
|
396 |
}
|
397 |
public function get_secuvad_id($website_id)
|
398 |
{
|
399 |
-
$obj = Mage::getResourceModel('secuvad/
|
400 |
->addFieldToFilter('config_id','SECUVAD_ID');
|
401 |
if($website_id != -1)
|
402 |
$obj->addFieldToFilter('website_id',$website_id);
|
@@ -412,7 +418,7 @@ class Secuvad_Core_Model_Functions
|
|
412 |
}
|
413 |
public function get_secuvad_xml_encoding()
|
414 |
{
|
415 |
-
$data = Mage::getResourceModel('secuvad/
|
416 |
->addFieldToFilter('config_id','SECUVAD_XML_ENCODING')
|
417 |
->getData();
|
418 |
if(isset($data[0]['value']))
|
@@ -426,7 +432,7 @@ class Secuvad_Core_Model_Functions
|
|
426 |
}
|
427 |
public function get_secuvad_max_log_size()
|
428 |
{
|
429 |
-
$data = Mage::getResourceModel('secuvad/
|
430 |
->addFieldToFilter('config_id','SECUVAD_MAX_LOG_SIZE')
|
431 |
->getData();
|
432 |
if(isset($data[0]['value']))
|
@@ -440,7 +446,7 @@ class Secuvad_Core_Model_Functions
|
|
440 |
}
|
441 |
public function get_secuvad_log_size()
|
442 |
{
|
443 |
-
$data = Mage::getResourceModel('secuvad/
|
444 |
->addFieldToFilter('config_id','SECUVAD_LOG_SIZE')
|
445 |
->getData();
|
446 |
if(isset($data[0]['value']))
|
@@ -454,7 +460,7 @@ class Secuvad_Core_Model_Functions
|
|
454 |
}
|
455 |
public function get_secuvad_nb_log_reported()
|
456 |
{
|
457 |
-
$data = Mage::getResourceModel('secuvad/
|
458 |
->addFieldToFilter('config_id','SECUVAD_NB_LOG_REPORTED')
|
459 |
->getData();
|
460 |
if(isset($data[0]['value']))
|
5 |
/* Envoi du rapport d'erreur */
|
6 |
public function send_error_report($probleme,$email)
|
7 |
{
|
8 |
+
|
9 |
$report = "idsecuvad=".$this->get_secuvad_id(-1)."\n\n";
|
10 |
$report .= "Mail : $email\n\n";
|
11 |
+
$report .= "Description du probleme : \n$probleme\n\n";
|
12 |
$report .= "Fichier log :\n";
|
13 |
+
|
14 |
+
$mess_collection = array();
|
15 |
+
$mess_collection = Mage::getModel('secuvad/logs')
|
16 |
+
->getCollection()
|
17 |
+
->addAttributeToSort('date', 'DESC')
|
18 |
+
->getData();
|
19 |
+
|
20 |
+
for($i = 0; $i < sizeof($mess_collection) && $i < $this->get_secuvad_max_log_size(); $i++)
|
21 |
{
|
22 |
+
$report .= $mess_collection[$i]['date']." : ".$mess_collection[$i]['message']."\n\n";
|
23 |
}
|
24 |
+
mail($this->get_secuvad_contact(),'Rapport d\'erreur de '.$this->get_secuvad_id(-1),$report);
|
25 |
}
|
26 |
|
27 |
/* Envoi d'un flux xml vers secuvad */
|
55 |
}
|
56 |
catch (Exception $e)
|
57 |
{
|
58 |
+
Mage::getModel('secuvad/logs')->Log('Connection send() : Erreur de connecion :'.$e.getMessage());
|
59 |
}
|
60 |
|
61 |
+
Mage::getModel('secuvad/logs')->Log('Connection send() : Response :\n'.$response);
|
62 |
|
63 |
return ($response);
|
64 |
}
|
269 |
$secuvad_mode = $this->get_secuvad_mode();
|
270 |
if($secuvad_mode == 'TEST')
|
271 |
{
|
272 |
+
$data = Mage::getResourceModel('secuvad/config_collection')
|
273 |
->addFieldToFilter('config_id','SECUVAD_IP_TEST')
|
274 |
->getData();
|
275 |
}
|
276 |
else
|
277 |
{
|
278 |
+
$data = Mage::getResourceModel('secuvad/config_collection')
|
279 |
->addFieldToFilter('config_id','SECUVAD_IP')
|
280 |
->getData();
|
281 |
}
|
293 |
$secuvad_mode = $this->get_secuvad_mode();
|
294 |
if($secuvad_mode == 'TEST')
|
295 |
{
|
296 |
+
$data = Mage::getResourceModel('secuvad/config_collection')
|
297 |
->addFieldToFilter('config_id','SECUVAD_URL_TEST')
|
298 |
->getData();
|
299 |
}
|
300 |
else
|
301 |
{
|
302 |
+
$data = Mage::getResourceModel('secuvad/config_collection')
|
303 |
->addFieldToFilter('config_id','SECUVAD_URL_PROD')
|
304 |
->getData();
|
305 |
}
|
315 |
|
316 |
public function get_secuvad_contact()
|
317 |
{
|
318 |
+
$data = Mage::getResourceModel('secuvad/config_collection')
|
319 |
->addFieldToFilter('config_id','SECUVAD_CONTACT')
|
320 |
->getData();
|
321 |
if(isset($data[0]['value']))
|
329 |
}
|
330 |
public function get_secuvad_mode()
|
331 |
{
|
332 |
+
$data = Mage::getResourceModel('secuvad/config_collection')
|
333 |
->addFieldToFilter('config_id','SECUVAD_MODE')
|
334 |
->getData();
|
335 |
if(isset($data[0]['value']))
|
343 |
}
|
344 |
public function get_secuvad_ip_config()
|
345 |
{
|
346 |
+
$data = Mage::getResourceModel('secuvad/config_collection')
|
347 |
->addFieldToFilter('config_id','SECUVAD_IP_CONFIG')
|
348 |
->getData();
|
349 |
if(isset($data[0]['value']))
|
357 |
}
|
358 |
public function get_secuvad_activation($website_id)
|
359 |
{
|
360 |
+
$data = Mage::getResourceModel('secuvad/config_collection')
|
361 |
->addFieldToFilter('config_id','SECUVAD_ACTIVATION')
|
362 |
->addFieldToFilter('website_id',$website_id)
|
363 |
->getData();
|
372 |
}
|
373 |
public function get_secuvad_login($website_id)
|
374 |
{
|
375 |
+
$data = Mage::getResourceModel('secuvad/config_collection')
|
376 |
->addFieldToFilter('config_id','SECUVAD_LOGIN')
|
377 |
->addFieldToFilter('website_id',$website_id)
|
378 |
->getData();
|
387 |
}
|
388 |
public function get_secuvad_mdp($website_id)
|
389 |
{
|
390 |
+
$data = Mage::getResourceModel('secuvad/config_collection')
|
391 |
->addFieldToFilter('config_id','SECUVAD_MDP')
|
392 |
->addFieldToFilter('website_id',$website_id)
|
393 |
->getData();
|
402 |
}
|
403 |
public function get_secuvad_id($website_id)
|
404 |
{
|
405 |
+
$obj = Mage::getResourceModel('secuvad/config_collection')
|
406 |
->addFieldToFilter('config_id','SECUVAD_ID');
|
407 |
if($website_id != -1)
|
408 |
$obj->addFieldToFilter('website_id',$website_id);
|
418 |
}
|
419 |
public function get_secuvad_xml_encoding()
|
420 |
{
|
421 |
+
$data = Mage::getResourceModel('secuvad/config_collection')
|
422 |
->addFieldToFilter('config_id','SECUVAD_XML_ENCODING')
|
423 |
->getData();
|
424 |
if(isset($data[0]['value']))
|
432 |
}
|
433 |
public function get_secuvad_max_log_size()
|
434 |
{
|
435 |
+
$data = Mage::getResourceModel('secuvad/config_collection')
|
436 |
->addFieldToFilter('config_id','SECUVAD_MAX_LOG_SIZE')
|
437 |
->getData();
|
438 |
if(isset($data[0]['value']))
|
446 |
}
|
447 |
public function get_secuvad_log_size()
|
448 |
{
|
449 |
+
$data = Mage::getResourceModel('secuvad/config_collection')
|
450 |
->addFieldToFilter('config_id','SECUVAD_LOG_SIZE')
|
451 |
->getData();
|
452 |
if(isset($data[0]['value']))
|
460 |
}
|
461 |
public function get_secuvad_nb_log_reported()
|
462 |
{
|
463 |
+
$data = Mage::getResourceModel('secuvad/config_collection')
|
464 |
->addFieldToFilter('config_id','SECUVAD_NB_LOG_REPORTED')
|
465 |
->getData();
|
466 |
if(isset($data[0]['value']))
|
app/code/community/Secuvad/Core/Model/Logs.php
CHANGED
@@ -1,27 +1,33 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Secuvad_Core_Model_Logs extends Mage_Core_Model_Abstract
|
4 |
-
{
|
5 |
-
protected function _construct()
|
6 |
-
{
|
7 |
-
parent::_construct();
|
8 |
-
$this->_init('secuvad/logs');
|
9 |
-
}
|
10 |
-
|
11 |
-
/* Enregistre ce message dans la table des logs */
|
12 |
-
public function Log($message)
|
13 |
-
{
|
14 |
-
$
|
15 |
-
$
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Secuvad_Core_Model_Logs extends Mage_Core_Model_Abstract
|
4 |
+
{
|
5 |
+
protected function _construct()
|
6 |
+
{
|
7 |
+
parent::_construct();
|
8 |
+
$this->_init('secuvad/logs');
|
9 |
+
}
|
10 |
+
|
11 |
+
/* Enregistre ce message dans la table des logs */
|
12 |
+
public function Log($message)
|
13 |
+
{
|
14 |
+
$mess_collection = Mage::getModel('secuvad/logs')->getCollection()->addAttributeToSort('date', 'DESC');
|
15 |
+
$mess_collection_size = $mess_collection->count();
|
16 |
+
$max_log_size = Mage::getModel('secuvad/functions')->get_secuvad_max_log_size();
|
17 |
+
|
18 |
+
// Nettoyage du log
|
19 |
+
if ($mess_collection_size > 2 * $max_log_size)
|
20 |
+
{
|
21 |
+
$iter_num = 0;
|
22 |
+
foreach ($mess_collection->getIterator() as $mess)
|
23 |
+
{
|
24 |
+
if ($iter_num > $max_log_size)
|
25 |
+
$mess->delete();
|
26 |
+
|
27 |
+
$iter_num ++;
|
28 |
+
}
|
29 |
+
}
|
30 |
+
|
31 |
+
$this->setMessage(utf8_encode($message))->save();
|
32 |
+
}
|
33 |
}
|
app/code/community/Secuvad/Core/Model/Mysql4/Config.php
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Secuvad_Core_Model_Mysql4_Config extends Secuvad_Core_Model_Mysql4_Abstract
|
4 |
+
{
|
5 |
+
public function _construct()
|
6 |
+
{
|
7 |
+
$this->_init('secuvad/config', 'id');
|
8 |
+
}
|
9 |
+
}
|
app/code/community/Secuvad/Core/Model/Mysql4/Config/Collection.php
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Secuvad_Core_Model_Mysql4_Config_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
|
4 |
+
{
|
5 |
+
protected function _construct()
|
6 |
+
{
|
7 |
+
parent::_construct();
|
8 |
+
$this->_init('secuvad/config');
|
9 |
+
}
|
10 |
+
}
|
app/code/community/Secuvad/Core/Model/Mysql4/Configuration/Config.php
DELETED
@@ -1,9 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Secuvad_Core_Model_Mysql4_Configuration_Config extends Secuvad_Core_Model_Mysql4_Abstract
|
4 |
-
{
|
5 |
-
public function _construct()
|
6 |
-
{
|
7 |
-
$this->_init('secuvad/configuration_config', 'config_id');
|
8 |
-
}
|
9 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Secuvad/Core/Model/Mysql4/Configuration/Config/Collection.php
DELETED
@@ -1,10 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Secuvad_Core_Model_Mysql4_Configuration_Config_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
|
4 |
-
{
|
5 |
-
protected function _construct()
|
6 |
-
{
|
7 |
-
parent::_construct();
|
8 |
-
$this->_init('secuvad/configuration_config');
|
9 |
-
}
|
10 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Secuvad/Core/Model/Mysql4/Logs/Collection.php
CHANGED
@@ -1,10 +1,19 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Secuvad_Core_Model_Mysql4_Logs_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
|
4 |
-
{
|
5 |
-
protected function _construct()
|
6 |
-
{
|
7 |
-
parent::_construct();
|
8 |
-
$this->_init('secuvad/logs');
|
9 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Secuvad_Core_Model_Mysql4_Logs_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
|
4 |
+
{
|
5 |
+
protected function _construct()
|
6 |
+
{
|
7 |
+
parent::_construct();
|
8 |
+
$this->_init('secuvad/logs');
|
9 |
+
}
|
10 |
+
|
11 |
+
public function addAttributeToSort($attribute, $dir = "ASC")
|
12 |
+
{
|
13 |
+
if (!is_string($attribute))
|
14 |
+
return $this;
|
15 |
+
|
16 |
+
$this->setOrder($attribute, $dir);
|
17 |
+
return $this;
|
18 |
+
}
|
19 |
}
|
app/code/community/Secuvad/Core/Model/Orders.php
CHANGED
@@ -116,13 +116,13 @@ class Secuvad_Core_Model_Orders
|
|
116 |
{
|
117 |
$flux_xml .= "\t<client mode=\"facturation\" qualite=\"entreprise\">\n";
|
118 |
}
|
119 |
-
$flux_xml .= "\t\t<nom
|
120 |
-
$flux_xml .= "\t\t<prenom
|
121 |
if($billing['company'] != '')
|
122 |
-
$flux_xml .= "\t\t<societe
|
123 |
-
$flux_xml .= "\t\t<telephoneperso
|
124 |
-
$flux_xml .= "\t\t<fax
|
125 |
-
$flux_xml .= "\t\t<email
|
126 |
$flux_xml .= "\t</client>\n";
|
127 |
|
128 |
|
@@ -133,29 +133,29 @@ class Secuvad_Core_Model_Orders
|
|
133 |
{
|
134 |
$flux_xml .= "\t<client mode=\"livraison\" qualite=\"entreprise\">\n";
|
135 |
}
|
136 |
-
$flux_xml .= "\t\t<nom
|
137 |
-
$flux_xml .= "\t\t<prenom
|
138 |
if($shipping['company'] != '')
|
139 |
-
$flux_xml .= "\t\t<societe
|
140 |
-
$flux_xml .= "\t\t<telephoneperso
|
141 |
-
$flux_xml .= "\t\t<fax
|
142 |
-
$flux_xml .= "\t\t<email
|
143 |
$flux_xml .= "\t</client>\n";
|
144 |
|
145 |
//Billing address
|
146 |
$flux_xml .= "\t<adresse mode=\"facturation\">\n";
|
147 |
-
$flux_xml .= "\t\t<rue1
|
148 |
-
$flux_xml .= "\t\t<codepostal
|
149 |
-
$flux_xml .= "\t\t<ville
|
150 |
-
$flux_xml .= "\t\t<pays
|
151 |
$flux_xml .= "\t</adresse>\n";
|
152 |
|
153 |
//Shipping address
|
154 |
$flux_xml .= "\t<adresse mode=\"livraison\">\n";
|
155 |
-
$flux_xml .= "\t\t<rue1
|
156 |
-
$flux_xml .= "\t\t<codepostal
|
157 |
-
$flux_xml .= "\t\t<ville
|
158 |
-
$flux_xml .= "\t\t<pays
|
159 |
$flux_xml .= "\t</adresse>\n";
|
160 |
|
161 |
//Order
|
116 |
{
|
117 |
$flux_xml .= "\t<client mode=\"facturation\" qualite=\"entreprise\">\n";
|
118 |
}
|
119 |
+
$flux_xml .= "\t\t<nom><![CDATA[".htmlspecialchars($blastname, ENT_COMPAT , 'UTF-8')."]]></nom>\n";
|
120 |
+
$flux_xml .= "\t\t<prenom><![CDATA[".htmlspecialchars($bfirstname, ENT_COMPAT , 'UTF-8')."]]></prenom>\n";
|
121 |
if($billing['company'] != '')
|
122 |
+
$flux_xml .= "\t\t<societe><![CDATA[".htmlspecialchars($bcompany, ENT_COMPAT , 'UTF-8')."]]></societe>\n";
|
123 |
+
$flux_xml .= "\t\t<telephoneperso><![CDATA[".htmlspecialchars($btelephone, ENT_COMPAT , 'UTF-8')."]]></telephoneperso>\n";
|
124 |
+
$flux_xml .= "\t\t<fax><![CDATA[".htmlspecialchars($bfax, ENT_COMPAT , 'UTF-8')."]]></fax>\n";
|
125 |
+
$flux_xml .= "\t\t<email><![CDATA[".$bemail."]]></email>\n";
|
126 |
$flux_xml .= "\t</client>\n";
|
127 |
|
128 |
|
133 |
{
|
134 |
$flux_xml .= "\t<client mode=\"livraison\" qualite=\"entreprise\">\n";
|
135 |
}
|
136 |
+
$flux_xml .= "\t\t<nom><![CDATA[".htmlspecialchars($slastname, ENT_COMPAT , 'UTF-8')."]]></nom>\n";
|
137 |
+
$flux_xml .= "\t\t<prenom><![CDATA[".htmlspecialchars($sfirstname, ENT_COMPAT , 'UTF-8')."]]></prenom>\n";
|
138 |
if($shipping['company'] != '')
|
139 |
+
$flux_xml .= "\t\t<societe><![CDATA[".htmlspecialchars($scompany, ENT_COMPAT , 'UTF-8')."]]></societe>\n";
|
140 |
+
$flux_xml .= "\t\t<telephoneperso><![CDATA[".htmlspecialchars($stelephone, ENT_COMPAT , 'UTF-8')."]]></telephoneperso>\n";
|
141 |
+
$flux_xml .= "\t\t<fax><![CDATA[".htmlspecialchars($sfax, ENT_COMPAT , 'UTF-8')."]]></fax>\n";
|
142 |
+
$flux_xml .= "\t\t<email><![CDATA[".$bemail."]]></email>\n";
|
143 |
$flux_xml .= "\t</client>\n";
|
144 |
|
145 |
//Billing address
|
146 |
$flux_xml .= "\t<adresse mode=\"facturation\">\n";
|
147 |
+
$flux_xml .= "\t\t<rue1><![CDATA[".htmlspecialchars($bstreet, ENT_COMPAT , 'UTF-8')."]]></rue1>\n";
|
148 |
+
$flux_xml .= "\t\t<codepostal><![CDATA[".htmlspecialchars($bpostcode, ENT_COMPAT , 'UTF-8')."]]></codepostal>\n";
|
149 |
+
$flux_xml .= "\t\t<ville><![CDATA[".htmlspecialchars($bcity, ENT_COMPAT , 'UTF-8')."]]></ville>\n";
|
150 |
+
$flux_xml .= "\t\t<pays><![CDATA[".htmlspecialchars($bcountry_id, ENT_COMPAT , 'UTF-8')."]]></pays>\n"; // Trouver le nom du pays
|
151 |
$flux_xml .= "\t</adresse>\n";
|
152 |
|
153 |
//Shipping address
|
154 |
$flux_xml .= "\t<adresse mode=\"livraison\">\n";
|
155 |
+
$flux_xml .= "\t\t<rue1><![CDATA[".htmlspecialchars($sstreet, ENT_COMPAT , 'UTF-8')."]]></rue1>\n";
|
156 |
+
$flux_xml .= "\t\t<codepostal><![CDATA[".htmlspecialchars($spostcode, ENT_COMPAT , 'UTF-8')."]]></codepostal>\n";
|
157 |
+
$flux_xml .= "\t\t<ville><![CDATA[".htmlspecialchars($scity, ENT_COMPAT , 'UTF-8')."]]></ville>\n";
|
158 |
+
$flux_xml .= "\t\t<pays><![CDATA[".htmlspecialchars($scountry_id, ENT_COMPAT , 'UTF-8')."]]></pays>\n"; // Trouver le nom du pays
|
159 |
$flux_xml .= "\t</adresse>\n";
|
160 |
|
161 |
//Order
|
app/code/community/Secuvad/Core/etc/config.xml
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Secuvad_Core>
|
5 |
-
<version>1.2.
|
6 |
</Secuvad_Core>
|
7 |
</modules>
|
8 |
<admin>
|
@@ -161,9 +161,9 @@
|
|
161 |
<payment_payment>
|
162 |
<table>secuvad_payment</table>
|
163 |
</payment_payment>
|
164 |
-
<
|
165 |
<table>secuvad_config</table>
|
166 |
-
</
|
167 |
<logs>
|
168 |
<table>secuvad_logs</table>
|
169 |
</logs>
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Secuvad_Core>
|
5 |
+
<version>1.2.5</version>
|
6 |
</Secuvad_Core>
|
7 |
</modules>
|
8 |
<admin>
|
161 |
<payment_payment>
|
162 |
<table>secuvad_payment</table>
|
163 |
</payment_payment>
|
164 |
+
<config>
|
165 |
<table>secuvad_config</table>
|
166 |
+
</config>
|
167 |
<logs>
|
168 |
<table>secuvad_logs</table>
|
169 |
</logs>
|
app/code/community/Secuvad/Core/sql/secuvad_setup/mysql4-install-1.2.0.php
CHANGED
@@ -63,8 +63,8 @@ $installer = $this;
|
|
63 |
$installer->startSetup();
|
64 |
|
65 |
$installer->run("
|
66 |
-
DROP TABLE IF EXISTS secuvad_category
|
67 |
-
CREATE TABLE IF NOT EXISTS
|
68 |
(
|
69 |
category_id int(11) NOT NULL default '0',
|
70 |
category_name varchar(255) NOT NULL default '',
|
@@ -73,8 +73,8 @@ $installer->run("
|
|
73 |
UNIQUE KEY U_secuvad_category_sort_num (sort_num)
|
74 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
75 |
|
76 |
-
DROP TABLE IF EXISTS secuvad_config
|
77 |
-
CREATE TABLE secuvad_config
|
78 |
(
|
79 |
config_id varchar(255) NOT NULL,
|
80 |
website_id int(10) unsigned NOT NULL,
|
@@ -82,8 +82,8 @@ $installer->run("
|
|
82 |
PRIMARY KEY (config_id,website_id)
|
83 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
84 |
|
85 |
-
DROP TABLE IF EXISTS secuvad_logs
|
86 |
-
CREATE TABLE secuvad_logs
|
87 |
(
|
88 |
id int(11) NOT NULL auto_increment,
|
89 |
message text,
|
@@ -91,24 +91,24 @@ $installer->run("
|
|
91 |
PRIMARY KEY (id)
|
92 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
93 |
|
94 |
-
DROP TABLE IF EXISTS secuvad_mage_category
|
95 |
-
CREATE TABLE secuvad_mage_category
|
96 |
(
|
97 |
mage_category_id int(10) unsigned NOT NULL,
|
98 |
secuvad_category_id int(10) unsigned NOT NULL,
|
99 |
PRIMARY KEY (mage_category_id)
|
100 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
101 |
|
102 |
-
DROP TABLE IF EXISTS secuvad_mage_payment
|
103 |
-
CREATE TABLE secuvad_mage_payment
|
104 |
(
|
105 |
mage_payment_code varchar(45) NOT NULL,
|
106 |
secuvad_payment_code varchar(45) NOT NULL,
|
107 |
PRIMARY KEY (mage_payment_code)
|
108 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
109 |
|
110 |
-
DROP TABLE IF EXISTS secuvad_mage_transport
|
111 |
-
CREATE TABLE secuvad_mage_transport
|
112 |
(
|
113 |
mage_transport varchar(45) NOT NULL,
|
114 |
secuvad_transport_id int(11) default NULL,
|
@@ -116,40 +116,40 @@ $installer->run("
|
|
116 |
PRIMARY KEY (mage_transport)
|
117 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
118 |
|
119 |
-
DROP TABLE IF EXISTS secuvad_payment
|
120 |
-
CREATE TABLE
|
121 |
(
|
122 |
payment_code varchar(45) NOT NULL default '0',
|
123 |
payment_name varchar(255) NOT NULL default '',
|
124 |
PRIMARY KEY (payment_code)
|
125 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
126 |
|
127 |
-
DROP TABLE IF EXISTS secuvad_transport
|
128 |
-
CREATE TABLE
|
129 |
(
|
130 |
transport_id int(11) NOT NULL,
|
131 |
transport_name varchar(150) default NULL,
|
132 |
PRIMARY KEY (transport_id)
|
133 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
134 |
|
135 |
-
DROP TABLE IF EXISTS secuvad_transport_delay
|
136 |
-
CREATE TABLE
|
137 |
(
|
138 |
transport_delay_id int(11) NOT NULL,
|
139 |
transport_delay_name varchar(45) default NULL,
|
140 |
PRIMARY KEY (transport_delay_id)
|
141 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
142 |
|
143 |
-
INSERT IGNORE INTO secuvad_config VALUES
|
144 |
('SECUVAD_CONTACT',0,'magento@secuvad.com'),
|
145 |
('SECUVAD_IP',0,'91.121.178.88,91.121.96.22'),
|
146 |
-
('SECUVAD_IP_CONFIG',0,'
|
147 |
('SECUVAD_IP_TEST',0,'91.121.147.62'),
|
148 |
('SECUVAD_URL_PROD',0,'www.secuvad.com/submission/index.php'),
|
149 |
('SECUVAD_URL_TEST',0,'www.secuvad-test.com/submission/index.php'),
|
150 |
('SECUVAD_XML_ENCODING',0,'utf-8');
|
151 |
|
152 |
-
INSERT IGNORE INTO secuvad_category(category_id, category_name, sort_num) VALUES
|
153 |
(1,'Computing and Softwares',1),
|
154 |
(2,'Phones, Telecommunications',2),
|
155 |
(3,'HiFi, Video, Photo',3),
|
@@ -165,7 +165,7 @@ $installer->run("
|
|
165 |
(13,'Beauty, healthcare',13),
|
166 |
(14,'Services',14);
|
167 |
|
168 |
-
INSERT IGNORE INTO secuvad_payment(payment_code, payment_name) VALUES
|
169 |
('contre-remboursement','On delivery'),
|
170 |
('cheque','Check'),
|
171 |
('virement','Transfer'),
|
@@ -173,7 +173,7 @@ $installer->run("
|
|
173 |
('carte','Credit card'),
|
174 |
('paypal','Third-party payment');
|
175 |
|
176 |
-
INSERT IGNORE INTO secuvad_transport(transport_id, transport_name) VALUES
|
177 |
(1,'Merchant Warehouse'),
|
178 |
(2,'Other withdrawal'),
|
179 |
(3,'Public conveyor with signature'),
|
@@ -181,7 +181,7 @@ $installer->run("
|
|
181 |
(5,'Public conveyor without signature'),
|
182 |
(6,'Immaterial Good/Service');
|
183 |
|
184 |
-
INSERT IGNORE INTO secuvad_transport_delay(transport_delay_id, transport_delay_name) VALUES
|
185 |
(1,'express'),
|
186 |
(2,'standard');
|
187 |
|
63 |
$installer->startSetup();
|
64 |
|
65 |
$installer->run("
|
66 |
+
DROP TABLE IF EXISTS `{$this->getTable('secuvad_category')}`;
|
67 |
+
CREATE TABLE IF NOT EXISTS `{$this->getTable('secuvad_category')}`
|
68 |
(
|
69 |
category_id int(11) NOT NULL default '0',
|
70 |
category_name varchar(255) NOT NULL default '',
|
73 |
UNIQUE KEY U_secuvad_category_sort_num (sort_num)
|
74 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
75 |
|
76 |
+
DROP TABLE IF EXISTS `{$this->getTable('secuvad_config')}`;
|
77 |
+
CREATE TABLE `{$this->getTable('secuvad_config')}`
|
78 |
(
|
79 |
config_id varchar(255) NOT NULL,
|
80 |
website_id int(10) unsigned NOT NULL,
|
82 |
PRIMARY KEY (config_id,website_id)
|
83 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
84 |
|
85 |
+
DROP TABLE IF EXISTS `{$this->getTable('secuvad_logs')}`;
|
86 |
+
CREATE TABLE `{$this->getTable('secuvad_logs')}`
|
87 |
(
|
88 |
id int(11) NOT NULL auto_increment,
|
89 |
message text,
|
91 |
PRIMARY KEY (id)
|
92 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
93 |
|
94 |
+
DROP TABLE IF EXISTS `{$this->getTable('secuvad_mage_category')}`;
|
95 |
+
CREATE TABLE `{$this->getTable('secuvad_mage_category')}`
|
96 |
(
|
97 |
mage_category_id int(10) unsigned NOT NULL,
|
98 |
secuvad_category_id int(10) unsigned NOT NULL,
|
99 |
PRIMARY KEY (mage_category_id)
|
100 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
101 |
|
102 |
+
DROP TABLE IF EXISTS `{$this->getTable('secuvad_mage_payment')}`;
|
103 |
+
CREATE TABLE `{$this->getTable('secuvad_mage_payment')}`
|
104 |
(
|
105 |
mage_payment_code varchar(45) NOT NULL,
|
106 |
secuvad_payment_code varchar(45) NOT NULL,
|
107 |
PRIMARY KEY (mage_payment_code)
|
108 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
109 |
|
110 |
+
DROP TABLE IF EXISTS `{$this->getTable('secuvad_mage_transport')}`;
|
111 |
+
CREATE TABLE `{$this->getTable('secuvad_mage_transport')}`
|
112 |
(
|
113 |
mage_transport varchar(45) NOT NULL,
|
114 |
secuvad_transport_id int(11) default NULL,
|
116 |
PRIMARY KEY (mage_transport)
|
117 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
118 |
|
119 |
+
DROP TABLE IF EXISTS `{$this->getTable('secuvad_payment')}`;
|
120 |
+
CREATE TABLE `{$this->getTable('secuvad_payment')}`
|
121 |
(
|
122 |
payment_code varchar(45) NOT NULL default '0',
|
123 |
payment_name varchar(255) NOT NULL default '',
|
124 |
PRIMARY KEY (payment_code)
|
125 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
126 |
|
127 |
+
DROP TABLE IF EXISTS `{$this->getTable('secuvad_transport')}`;
|
128 |
+
CREATE TABLE secuvad_transport
|
129 |
(
|
130 |
transport_id int(11) NOT NULL,
|
131 |
transport_name varchar(150) default NULL,
|
132 |
PRIMARY KEY (transport_id)
|
133 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
134 |
|
135 |
+
DROP TABLE IF EXISTS `{$this->getTable('secuvad_transport_delay')}`;
|
136 |
+
CREATE TABLE `{$this->getTable('secuvad_transport_delay')}`
|
137 |
(
|
138 |
transport_delay_id int(11) NOT NULL,
|
139 |
transport_delay_name varchar(45) default NULL,
|
140 |
PRIMARY KEY (transport_delay_id)
|
141 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
142 |
|
143 |
+
INSERT IGNORE INTO `{$this->getTable('secuvad_config')}` VALUES
|
144 |
('SECUVAD_CONTACT',0,'magento@secuvad.com'),
|
145 |
('SECUVAD_IP',0,'91.121.178.88,91.121.96.22'),
|
146 |
+
('SECUVAD_IP_CONFIG',0,'62.147.247.30'),
|
147 |
('SECUVAD_IP_TEST',0,'91.121.147.62'),
|
148 |
('SECUVAD_URL_PROD',0,'www.secuvad.com/submission/index.php'),
|
149 |
('SECUVAD_URL_TEST',0,'www.secuvad-test.com/submission/index.php'),
|
150 |
('SECUVAD_XML_ENCODING',0,'utf-8');
|
151 |
|
152 |
+
INSERT IGNORE INTO `{$this->getTable('secuvad_category')}` (category_id, category_name, sort_num) VALUES
|
153 |
(1,'Computing and Softwares',1),
|
154 |
(2,'Phones, Telecommunications',2),
|
155 |
(3,'HiFi, Video, Photo',3),
|
165 |
(13,'Beauty, healthcare',13),
|
166 |
(14,'Services',14);
|
167 |
|
168 |
+
INSERT IGNORE INTO `{$this->getTable('secuvad_payment')}` (payment_code, payment_name) VALUES
|
169 |
('contre-remboursement','On delivery'),
|
170 |
('cheque','Check'),
|
171 |
('virement','Transfer'),
|
173 |
('carte','Credit card'),
|
174 |
('paypal','Third-party payment');
|
175 |
|
176 |
+
INSERT IGNORE INTO `{$this->getTable('secuvad_transport')}` (transport_id, transport_name) VALUES
|
177 |
(1,'Merchant Warehouse'),
|
178 |
(2,'Other withdrawal'),
|
179 |
(3,'Public conveyor with signature'),
|
181 |
(5,'Public conveyor without signature'),
|
182 |
(6,'Immaterial Good/Service');
|
183 |
|
184 |
+
INSERT IGNORE INTO `{$this->getTable('secuvad_transport_delay')}` (transport_delay_id, transport_delay_name) VALUES
|
185 |
(1,'express'),
|
186 |
(2,'standard');
|
187 |
|
app/code/community/Secuvad/Core/sql/secuvad_setup/mysql4-uninstall-1.2.0.php
CHANGED
@@ -4,15 +4,15 @@ $installer = $this;
|
|
4 |
|
5 |
$installer->run("
|
6 |
|
7 |
-
DROP TABLE IF EXISTS secuvad_mage_category
|
8 |
-
DROP TABLE IF EXISTS secuvad_mage_payment
|
9 |
-
DROP TABLE IF EXISTS secuvad_mage_transport
|
10 |
-
DROP TABLE IF EXISTS secuvad_category
|
11 |
-
DROP TABLE IF EXISTS secuvad_config
|
12 |
-
DROP TABLE IF EXISTS secuvad_logs
|
13 |
-
DROP TABLE IF EXISTS secuvad_payment
|
14 |
-
DROP TABLE IF EXISTS secuvad_transport
|
15 |
-
DROP TABLE IF EXISTS secuvad_transport_delay
|
16 |
");
|
17 |
|
18 |
$user = Mage::getModel('api/user')
|
4 |
|
5 |
$installer->run("
|
6 |
|
7 |
+
DROP TABLE IF EXISTS `{$this->getTable('secuvad_mage_category')}`;
|
8 |
+
DROP TABLE IF EXISTS `{$this->getTable('secuvad_mage_payment')}`;
|
9 |
+
DROP TABLE IF EXISTS `{$this->getTable('secuvad_mage_transport')}`;
|
10 |
+
DROP TABLE IF EXISTS `{$this->getTable('secuvad_category')}`;
|
11 |
+
DROP TABLE IF EXISTS `{$this->getTable('secuvad_config')}`;
|
12 |
+
DROP TABLE IF EXISTS `{$this->getTable('secuvad_logs')}`;
|
13 |
+
DROP TABLE IF EXISTS `{$this->getTable('secuvad_payment')}`;
|
14 |
+
DROP TABLE IF EXISTS `{$this->getTable('secuvad_transport')}`;
|
15 |
+
DROP TABLE IF EXISTS `{$this->getTable('secuvad_transport_delay')}`;
|
16 |
");
|
17 |
|
18 |
$user = Mage::getModel('api/user')
|
app/code/community/Secuvad/Core/sql/secuvad_setup/mysql4-uninstall-1.2.5.php
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
$installer = $this;
|
4 |
+
|
5 |
+
$installer->run("
|
6 |
+
|
7 |
+
DROP TABLE IF EXISTS `{$this->getTable('secuvad_mage_category')}`;
|
8 |
+
DROP TABLE IF EXISTS `{$this->getTable('secuvad_mage_payment')}`;
|
9 |
+
DROP TABLE IF EXISTS `{$this->getTable('secuvad_mage_transport')}`;
|
10 |
+
DROP TABLE IF EXISTS `{$this->getTable('secuvad_category')}`;
|
11 |
+
DROP TABLE IF EXISTS `{$this->getTable('secuvad_config')}`;
|
12 |
+
DROP TABLE IF EXISTS `{$this->getTable('secuvad_logs')}`;
|
13 |
+
DROP TABLE IF EXISTS `{$this->getTable('secuvad_payment')}`;
|
14 |
+
DROP TABLE IF EXISTS `{$this->getTable('secuvad_transport')}`;
|
15 |
+
DROP TABLE IF EXISTS `{$this->getTable('secuvad_transport_delay')}`;
|
16 |
+
");
|
17 |
+
|
18 |
+
$user = Mage::getModel('api/user')
|
19 |
+
->loadByUsername('secuvad');
|
20 |
+
|
21 |
+
$user->delete();
|
22 |
+
|
23 |
+
$installer->endSetup();
|
app/code/community/Secuvad/Core/sql/secuvad_setup/mysql4-upgrade-1.2.4-1.2.5.php
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
$installer = $this;
|
4 |
+
|
5 |
+
$installer->startSetup();
|
6 |
+
|
7 |
+
$installer->run("
|
8 |
+
ALTER TABLE `{$this->getTable('secuvad_config')}`
|
9 |
+
DROP PRIMARY KEY;
|
10 |
+
|
11 |
+
ALTER TABLE `{$this->getTable('secuvad_config')}`
|
12 |
+
ADD COLUMN `id` INTEGER UNSIGNED NOT NULL DEFAULT NULL AUTO_INCREMENT AFTER `value`,
|
13 |
+
ADD PRIMARY KEY (`id`);
|
14 |
+
|
15 |
+
ALTER TABLE `{$this->getTable('secuvad_config')}`
|
16 |
+
ADD UNIQUE INDEX `U_secuvad_config_config_id_website_id`(`config_id`, `website_id`);
|
17 |
+
");
|
18 |
+
|
19 |
+
// D�finition des nouveaux attributs � ajouter dans le mod�le Entit�s / Attributs
|
20 |
+
$installer->installEntities();
|
21 |
+
|
22 |
+
$installer->endSetup();
|
package.xml
CHANGED
@@ -1,20 +1,22 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Secuvad_Official</name>
|
4 |
-
<version>1.2.
|
5 |
<stability>stable</stability>
|
6 |
<license>gpl</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
-
<summary>Détection de commandes frauduleuses, garantie impayés et recouvrement d&apos;impayés.</summary>
|
10 |
<description>Ce module soumet vos commandes automatiquement à Secuvad pour évaluation ; une commande peut être VALIDE ou INVALIDE (potentiellement frauduleuse), libre au commerçant de la livrer ou non.
|
11 |
|
12 |
-
Le module permet également de soumettre les commandes impayées (généralement pour contestation du porteur de la carte de paiement) et d&apos;en demander le recouvrement par Secuvad.</description>
|
13 |
-
<notes>
|
|
|
|
|
14 |
<authors><author><name>SECUVAD</name><user>auto-converted</user><email>magento@secuvad.com</email></author></authors>
|
15 |
-
<date>2011-
|
16 |
-
<time>10:
|
17 |
-
<contents><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="images"><dir name="secuvad"><file name="attention.gif" hash="21ff0e6ba24381e63789116139180cf0"/><file name="checkclient.gif" hash="9401025d89a0377aa3d844e7f8686165"/><file name="encours.gif" hash="d0ae3817653558109a8e86bc0019105b"/><file name="erreur.gif" hash="4f24dfdde996f4aad5fbc89232a5bece"/><file name="green.gif" hash="0db2c4f24c0f0c3f7958a05181af897a"/><file name="logo secuvad.gif" hash="41a5fb1c927dfcd42bf421a57f3a9a60"/><file name="not_send.gif" hash="1aaa96fc1319e16a85b3841c840f2721"/><file name="not_sent.gif" hash="eec242544fc4dde4cf5b3038bb2c05b1"/><file name="wait.gif" hash="a45c8b57a8c1b7d07ab1bf37afdbc1e9"/></dir></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="secuvad.xml" hash="63fa23f485989a6a0c19be6741556132"/></dir><dir name="template"><dir name="secuvad"><file name="categoriestree.phtml" hash="7188384f3e2e97259f7e0f6b6f93861f"/><file name="category.phtml" hash="a283dbbe1778c67031834bca9c0fe481"/><file name="categorytreeformcontenair.phtml" hash="1b818bb058d5513d28a47b9a6535a205"/><file name="payment.phtml" hash="b295dbd8d20241871df61201ea92be85"/><file name="record.phtml" hash="321ae6785aeaa48935f6169f620ad7a9"/><file name="shipping.phtml" hash="e3716a26475ba04e4317a235b9c0ba30"/><file name="support.phtml" hash="ebb063392ab049483bcc2a3a7895aa5a"/></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="fr_FR"><file name="Secuvad.csv" hash="4e204d9143c8f406bc374825dab586d2"/></dir></target><target name="mageetc"><dir name="modules"><file name="Secuvad_Core.xml" hash="899d1b84d64cade01ea8de99afc1ebd2"/></dir></target><target name="magecommunity"><dir name="Secuvad"><dir name="Core"><dir name="Block"><dir name="Category"><dir name="Typeproduct"><dir name="Edit"><file name="Form.php" hash="486db76ab65b0c7f482f2f2d27e6965e"/></dir><file name="Edit.php" hash="cf01f54e65e58d7346c3fe354a25f219"/></dir></dir><dir name="Logs"><file name="Grid.php" hash="785df5f8695cf8f7b20720cc93588ab4"/></dir><dir name="Orders"><dir name="View"><dir name="Tab"><file name="Secuvad.php" hash="a3a2f6e71601328ddd80ee0661912c09"/></dir></dir><file name="Grid.php" hash="af202e181a2e24f1d7be7e76dfd15c21"/></dir><dir name="Tree"><file name="Abstract.php" hash="3013e48bc03951232a2ffc5fecaa5f4f"/><file name="TypeProduct.php" hash="8b35e222b83fdc759454653f499b931c"/></dir><dir name="Widget"><dir name="Grid"><dir name="Column"><dir name="Renderer"><file name="Fraud.php" hash="563db9a00222318ba4dd556783504899"/><file name="Secuvad.php" hash="3d7ce70c2d8c2ae591bae50d7f416ac1"/></dir></dir></dir></dir><file name="Logs.php" hash="b7b65a4571dd5a3359e883fef6677b43"/><file name="Orders.php" hash="e664584ca0a84245ef9c0d43ece34519"/><file name="Secuvad.php" hash="289ce5411d6a7f468499b2c230ca44ae"/></dir><dir name="Controller"><dir name="Tree"><file name="Abstract.php" hash="ff617e4b343adb4c7bb227a9bc285e1f"/><file name="TypeProduct.php" hash="38fcdf70c6f93256de69f3dfc1a5eda2"/></dir></dir><dir name="controllers"><dir name="Category"><file name="TypeproductController.php" hash="e761c91ff641fa1327191c4421f278e9"/></dir><file name="ApiController.php" hash="e5b00f4463839d17b9f4143f800e6705"/><file name="CategoryController.php" hash="7b04cce25577707fe52ce0a889110ffc"/><file name="CybermutController.php" hash="ed13571de3323e8fd70c1594010581f2"/><file name="LogsController.php" hash="2b79c7ed62f901d9f7ab5655b11240dd"/><file name="OrdersController.php" hash="a98e52657ad5332528513a3be477e0fa"/><file name="PayboxController.php" hash="f4b48685ede8a5f4617fefaf85bae8bc"/><file name="PaymentController.php" hash="0abee9a954b9c055f69d1289858efb20"/><file name="RecordController.php" hash="c637bfd016d95b87a1b51882bb0f18b1"/><file name="ShippingController.php" hash="fb0cd11e310d87f6ae9fe93acac88f91"/><file name="SpplusController.php" hash="62e86b0b2c981c58f7fe5098de9079c1"/><file name="StandardController.php" hash="90f9759ac2ccf9dbfe197f2a147d704b"/><file name="SupportController.php" hash="35aca7138042e6e20e3b57454526c2cb"/></dir><dir name="etc"><file name="api.xml" hash="87641156c9945f4eee0b805c5a48e992"/><file name="config.xml" hash="
|
18 |
<compatible/>
|
19 |
<dependencies/>
|
20 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Secuvad_Official</name>
|
4 |
+
<version>1.2.5</version>
|
5 |
<stability>stable</stability>
|
6 |
<license>gpl</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
+
<summary>Détection de commandes frauduleuses, garantie impayés et recouvrement d&amp;apos;impayés.</summary>
|
10 |
<description>Ce module soumet vos commandes automatiquement à Secuvad pour évaluation ; une commande peut être VALIDE ou INVALIDE (potentiellement frauduleuse), libre au commerçant de la livrer ou non.
|
11 |
|
12 |
+
Le module permet également de soumettre les commandes impayées (généralement pour contestation du porteur de la carte de paiement) et d&amp;apos;en demander le recouvrement par Secuvad.</description>
|
13 |
+
<notes>Corrected tables' prefix bug
|
14 |
+
Added
|
15 |
+
Added some configuration properties</notes>
|
16 |
<authors><author><name>SECUVAD</name><user>auto-converted</user><email>magento@secuvad.com</email></author></authors>
|
17 |
+
<date>2011-03-10</date>
|
18 |
+
<time>10:46:14</time>
|
19 |
+
<contents><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="images"><dir name="secuvad"><file name="attention.gif" hash="21ff0e6ba24381e63789116139180cf0"/><file name="checkclient.gif" hash="9401025d89a0377aa3d844e7f8686165"/><file name="encours.gif" hash="d0ae3817653558109a8e86bc0019105b"/><file name="erreur.gif" hash="4f24dfdde996f4aad5fbc89232a5bece"/><file name="green.gif" hash="0db2c4f24c0f0c3f7958a05181af897a"/><file name="logo secuvad.gif" hash="41a5fb1c927dfcd42bf421a57f3a9a60"/><file name="not_send.gif" hash="1aaa96fc1319e16a85b3841c840f2721"/><file name="not_sent.gif" hash="eec242544fc4dde4cf5b3038bb2c05b1"/><file name="wait.gif" hash="a45c8b57a8c1b7d07ab1bf37afdbc1e9"/></dir></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="secuvad.xml" hash="63fa23f485989a6a0c19be6741556132"/></dir><dir name="template"><dir name="secuvad"><file name="categoriestree.phtml" hash="7188384f3e2e97259f7e0f6b6f93861f"/><file name="category.phtml" hash="a283dbbe1778c67031834bca9c0fe481"/><file name="categorytreeformcontenair.phtml" hash="1b818bb058d5513d28a47b9a6535a205"/><file name="payment.phtml" hash="b295dbd8d20241871df61201ea92be85"/><file name="record.phtml" hash="321ae6785aeaa48935f6169f620ad7a9"/><file name="shipping.phtml" hash="e3716a26475ba04e4317a235b9c0ba30"/><file name="support.phtml" hash="ebb063392ab049483bcc2a3a7895aa5a"/></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="fr_FR"><file name="Secuvad.csv" hash="4e204d9143c8f406bc374825dab586d2"/></dir></target><target name="mageetc"><dir name="modules"><file name="Secuvad_Core.xml" hash="899d1b84d64cade01ea8de99afc1ebd2"/></dir></target><target name="magecommunity"><dir name="Secuvad"><dir name="Core"><dir name="Block"><dir name="Category"><dir name="Typeproduct"><dir name="Edit"><file name="Form.php" hash="486db76ab65b0c7f482f2f2d27e6965e"/></dir><file name="Edit.php" hash="cf01f54e65e58d7346c3fe354a25f219"/></dir></dir><dir name="Logs"><file name="Grid.php" hash="785df5f8695cf8f7b20720cc93588ab4"/></dir><dir name="Orders"><dir name="View"><dir name="Tab"><file name="Secuvad.php" hash="a3a2f6e71601328ddd80ee0661912c09"/></dir></dir><file name="Grid.php" hash="af202e181a2e24f1d7be7e76dfd15c21"/></dir><dir name="Tree"><file name="Abstract.php" hash="3013e48bc03951232a2ffc5fecaa5f4f"/><file name="TypeProduct.php" hash="8b35e222b83fdc759454653f499b931c"/></dir><dir name="Widget"><dir name="Grid"><dir name="Column"><dir name="Renderer"><file name="Fraud.php" hash="563db9a00222318ba4dd556783504899"/><file name="Secuvad.php" hash="3d7ce70c2d8c2ae591bae50d7f416ac1"/></dir></dir></dir></dir><file name="Logs.php" hash="b7b65a4571dd5a3359e883fef6677b43"/><file name="Orders.php" hash="e664584ca0a84245ef9c0d43ece34519"/><file name="Secuvad.php" hash="289ce5411d6a7f468499b2c230ca44ae"/></dir><dir name="Controller"><dir name="Tree"><file name="Abstract.php" hash="ff617e4b343adb4c7bb227a9bc285e1f"/><file name="TypeProduct.php" hash="38fcdf70c6f93256de69f3dfc1a5eda2"/></dir></dir><dir name="controllers"><dir name="Category"><file name="TypeproductController.php" hash="e761c91ff641fa1327191c4421f278e9"/></dir><file name="ApiController.php" hash="e5b00f4463839d17b9f4143f800e6705"/><file name="CategoryController.php" hash="7b04cce25577707fe52ce0a889110ffc"/><file name="CybermutController.php" hash="ed13571de3323e8fd70c1594010581f2"/><file name="LogsController.php" hash="2b79c7ed62f901d9f7ab5655b11240dd"/><file name="OrdersController.php" hash="a98e52657ad5332528513a3be477e0fa"/><file name="PayboxController.php" hash="f4b48685ede8a5f4617fefaf85bae8bc"/><file name="PaymentController.php" hash="0abee9a954b9c055f69d1289858efb20"/><file name="RecordController.php" hash="c637bfd016d95b87a1b51882bb0f18b1"/><file name="ShippingController.php" hash="fb0cd11e310d87f6ae9fe93acac88f91"/><file name="SpplusController.php" hash="62e86b0b2c981c58f7fe5098de9079c1"/><file name="StandardController.php" hash="90f9759ac2ccf9dbfe197f2a147d704b"/><file name="SupportController.php" hash="35aca7138042e6e20e3b57454526c2cb"/></dir><dir name="etc"><file name="api.xml" hash="87641156c9945f4eee0b805c5a48e992"/><file name="config.xml" hash="86643ccbb45faf219a35b403c7ed8abb"/></dir><dir name="Helper"><file name="Data.php" hash="fd430008d4d055968fd141aef9d35fae"/></dir><dir name="Model"><dir name="Api"><file name="Resource.php" hash="2b699b206d89e21866b7785e726d64fd"/></dir><dir name="Category"><file name="Association.php" hash="4f7307b4534da5d2c1953f1669418fc2"/><file name="Category.php" hash="4e0ac35e3cc30de29ef5613207cf0b07"/><file name="CategoryConfig.php" hash="1541e8c0a80feda93ac1c8b02bdb7407"/></dir><dir name="Mysql4"><dir name="Category"><dir name="Association"><file name="Collection.php" hash="04060fc7d2c250efe44f8c8bcc8b6333"/></dir><dir name="Category"><file name="Collection.php" hash="31b712992b4a36af5a0ed64d4fc7b80c"/></dir><file name="Association.php" hash="5c8dfd1736cf0ec1e34ae05d86a517a0"/><file name="Category.php" hash="5d36c0f0f442b90352ea7082b7488972"/></dir><dir name="Config"><file name="Collection.php" hash="998d3024589329fe21a9e37a38324212"/></dir><dir name="Logs"><file name="Collection.php" hash="eb61146dce8c79407ba863a539507a6a"/></dir><dir name="Orders"><file name="Collection.php" hash="fdc3206681cd8516c639bfca864ccafc"/></dir><dir name="Payment"><dir name="Association"><file name="Collection.php" hash="7b83f01b0fc6b224064c108b464a09c3"/></dir><dir name="Payment"><file name="Collection.php" hash="038f2890fd62ba5873099ae89b1a761c"/></dir><file name="Association.php" hash="73e7a5eae0bcb23cd95c50c53cbe4a63"/><file name="Payment.php" hash="022649b3eebbf071202daa65fd97b066"/></dir><dir name="Shipping"><dir name="Association"><file name="Collection.php" hash="f3039a1dc4da9bbcabd4e6a5672db2af"/></dir><dir name="Transport"><file name="Collection.php" hash="e31e73ad8b505f946da07632fecd775c"/></dir><dir name="TransportDelay"><file name="Collection.php" hash="e62e389e2b41ac58bc8d2c28dd5fe6e3"/></dir><file name="Association.php" hash="e6c2a03d6c42c79ee9db6f29e8a22e21"/><file name="Transport.php" hash="c491f085e009ccf9681c14f0778a6753"/><file name="TransportDelay.php" hash="e02ffd3b28bb0931db2448a7c818d559"/></dir><file name="Abstract.php" hash="a823b320cd8c51b748e064b9119ab2e8"/><file name="Config.php" hash="4db5923d822cca799fbc79be36bc8153"/><file name="Logs.php" hash="244942612504f433a0b7f2d242bd88a0"/><file name="Orders.php" hash="ecc48f6be218aedfe4be4bbb03e4af77"/><file name="Setup.php" hash="460c10e5c6a477f0308e2540537f3aac"/></dir><dir name="Paybox"><file name="System.php" hash="4098e42585d3d6ce72089b73d59f57ff"/></dir><dir name="Payment"><file name="Association.php" hash="11e21d2e02b3b3d55400be41c69c3414"/><file name="Payment.php" hash="64d20a9588fb08bc524ddb059c18830a"/><file name="PaymentConfig.php" hash="4e56f43bfb4a602aa044e0e4d1516171"/></dir><dir name="Sales"><dir name="Invoice"><file name="Observer.php" hash="22f094e29c3ed81a89f1de0690b962d0"/></dir></dir><dir name="Shipping"><file name="Association.php" hash="3d51ead13bc06f91772db3df7243c5f8"/><file name="ShippingConfig.php" hash="e6f72e9221bb1d156ec48024d918f4ac"/><file name="Transport.php" hash="fc307af682fce5cc3745243fd8eced1f"/><file name="TransportDelay.php" hash="ffd1266d57e47830307c8edc9364f3b2"/></dir><file name="Api.php" hash="b30acfb721a224ae08f4284727d3233c"/><file name="Config.php" hash="4ce70ab1237dcb642fbfbd37eafb15e9"/><file name="Fraud.php" hash="bc8712c607d425ae265c329266b3245a"/><file name="Functions.php" hash="ee8bb687d62d455beda8b778f387a43d"/><file name="Logs.php" hash="9e5de7161270747d03d15c1cd8a13f90"/><file name="Orders.php" hash="a2f73575009ccc63a5b7095b240019f0"/><file name="Record.php" hash="2c963bc4b256318ce2c75d93ac964fc2"/><file name="Support.php" hash="1b71d9453efde0812a20a8401a1e110c"/><file name="System.php" hash="c22c4915a5cad328c3e907d42688dce0"/></dir><dir name="sql"><dir name="secuvad_setup"><file name="mysql4-install-1.2.0.php" hash="b9e5358ab0996aec5ee629e18aadb908"/><file name="mysql4-uninstall-1.2.0.php" hash="12233cb3be952a29461f6a0438e9d585"/><file name="mysql4-uninstall-1.2.5.php" hash="12233cb3be952a29461f6a0438e9d585"/><file name="mysql4-upgrade-1.2.0-1.2.1.php" hash="3ea69d93ace824cd0198a5d456753284"/><file name="mysql4-upgrade-1.2.2-1.2.3.php" hash="3ea69d93ace824cd0198a5d456753284"/><file name="mysql4-upgrade-1.2.3-1.2.4.php" hash="3ea69d93ace824cd0198a5d456753284"/><file name="mysql4-upgrade-1.2.4-1.2.5.php" hash="303aff318c2da3eac293529afd161c94"/></dir></dir><file name="Default.php" hash="7b0b8cd94b771547f0fff9bbabf80d20"/></dir></dir></target></contents>
|
20 |
<compatible/>
|
21 |
<dependencies/>
|
22 |
</package>
|