Skip to content
This repository has been archived by the owner on Oct 4, 2024. It is now read-only.

Commit

Permalink
Correction du support WPML pour les produits traduits synchronisés vi…
Browse files Browse the repository at this point in the history
…a les crochets WEB
  • Loading branch information
kkhelifa-opendsi committed Aug 20, 2024
1 parent 73ce352 commit dedd9b7
Show file tree
Hide file tree
Showing 21 changed files with 6,879 additions and 7,172 deletions.
6 changes: 5 additions & 1 deletion ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# ChangeLog

## [14.0.9] - 20-08-2024
- Correction du support WPML pour les produits traduits synchronisés via les crochets WEB

## [14.0.8] - 14-08-2024
- Correction du nettoyage des id distants en doublons par site
- Precision lors d'un message d'erreur lors de la synchro des categories
Expand Down Expand Up @@ -921,7 +924,8 @@
- Initial version.


[Non Distribué]: https://github.com/OPEN-DSI/ecommerceng_woosync/compare/14.0.8...HEAD
[Non Distribué]: https://github.com/OPEN-DSI/ecommerceng_woosync/compare/14.0.9...HEAD
[14.0.9]: https://github.com/OPEN-DSI/ecommerceng_woosync/commits/14.0.9
[14.0.8]: https://github.com/OPEN-DSI/ecommerceng_woosync/commits/14.0.8
[14.0.7]: https://github.com/OPEN-DSI/ecommerceng_woosync/commits/14.0.7
[14.0.6]: https://github.com/OPEN-DSI/ecommerceng_woosync/commits/14.0.6
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
14.0.8
14.0.9
54 changes: 26 additions & 28 deletions class/business/eCommercePendingWebHook.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,17 @@ class eCommercePendingWebHook
public $element = 'ecommercependingwebhook';

/**
* @var DoliDB Database handler.
*/
public $db;
/**
* @var string Error
*/
public $error = '';
/**
* @var array Errors
*/
public $errors = array();
* @var DoliDB Database handler.
*/
public $db;
/**
* @var string Error
*/
public $error = '';
/**
* @var array Errors
*/
public $errors = array();
/**
* @var array Warnings
*/
Expand Down Expand Up @@ -131,13 +131,13 @@ class eCommercePendingWebHook
const STATUS_WARNING = 3;

/**
* Constructor
*
* @param DoliDB $db Database handler
*/
public function __construct($db)
{
$this->db = $db;
* Constructor
*
* @param DoliDB $db Database handler
*/
public function __construct($db)
{
$this->db = $db;

// List of long language codes for bank record status
$this->labelStatus = array(
Expand All @@ -154,7 +154,7 @@ public function __construct($db)
self::STATUS_ERROR => 'ECommerceWebHooksStatusShortError',
self::STATUS_WARNING => 'ECommerceWebHooksStatusShortWarning',
);
}
}

/**
* Check if the data is OK
Expand Down Expand Up @@ -264,7 +264,7 @@ public function create()
* @param int $row_id WebHook line ID
* @return int <0 if KO, >0 if OK
*/
public function delete($row_id = 0)
public function delete($row_id = 0)
{
dol_syslog(__METHOD__ . " row_id=$row_id", LOG_DEBUG);

Expand Down Expand Up @@ -354,7 +354,7 @@ public function setStatusProcessed($row_id)
", datep = '" . $this->db->idate($now) . "'" .
", error_msg = NULL" .
" WHERE rowid = " . $row_id .
" AND status IN (" . self::STATUS_ERROR . "," .self::STATUS_NOT_PROCESSED . "," . self::STATUS_WARNING . ")";
" AND status IN (" . self::STATUS_ERROR . "," . self::STATUS_NOT_PROCESSED . "," . self::STATUS_WARNING . ")";

$this->db->begin();

Expand Down Expand Up @@ -519,9 +519,7 @@ public function synchronize($site_id = 0, $webhook_topic = '', $webhook_resource
return -2;
}
}
}

// Order
} // Order
elseif ($webhook_resource == 'order') {
if ($webhook_event == 'created' || $webhook_event == 'updated') {
$result = $synchro->synchronizeOrderFromData($data);
Expand Down Expand Up @@ -846,7 +844,7 @@ private function _formatEmail($name, $email)
* @param string $sendcontext 'standard', 'emailing', ...
* @return int|string <0 if KO, result message if OK
*/
public function _sendEmail($subject, $sendto, $from, $body, $filename_list=array(), $mimetype_list=array(), $mimefilename_list=array(), $sendtocc="", $sendtobcc="", $deliveryreceipt=0, $msgishtml=1, $errors_to='', $css='', $moreinheader='', $sendcontext='standard')
public function _sendEmail($subject, $sendto, $from, $body, $filename_list = array(), $mimetype_list = array(), $mimefilename_list = array(), $sendtocc = "", $sendtobcc = "", $deliveryreceipt = 0, $msgishtml = 1, $errors_to = '', $css = '', $moreinheader = '', $sendcontext = 'standard')
{
global $langs, $dolibarr_main_url_root;
dol_syslog(__METHOD__ . " subject=$subject, sendto=$sendto, from=$from, body=$body, filename_list=".json_encode($filename_list).", mimetype_list=".json_encode($mimetype_list).", mimefilename_list=".json_encode($mimefilename_list).", sendtocc=$sendtocc, sendtobcc=$sendtobcc, deliveryreceipt=$deliveryreceipt, msgishtml=$msgishtml, errors_to=$errors_to, css=$css, moreinheader=$moreinheader, sendcontext=$sendcontext", LOG_DEBUG);
Expand Down Expand Up @@ -1058,9 +1056,9 @@ public function archive()
* @param int $mode 0=Long label, 1=Short label, 2=Picto + Short label, 3=Picto, 4=Picto + Long label, 5=Short label + Picto
* @return string Libelle du statut
*/
function getLibStatut($mode=0)
function getLibStatut($mode = 0)
{
return $this->LibStatut($this->statut,$mode);
return $this->LibStatut($this->statut, $mode);
}

/**
Expand All @@ -1070,7 +1068,7 @@ function getLibStatut($mode=0)
* @param int $mode 0=Long label, 1=Short label, 2=Picto + Short label, 3=Picto, 4=Picto + Long label, 5=Short label + Picto, 6=Long label + Picto
* @return string Libelle du statut
*/
public function LibStatut($statut, $mode=0)
public function LibStatut($statut, $mode = 0)
{
global $langs;

Expand Down
Loading

0 comments on commit dedd9b7

Please sign in to comment.