commentaires du code en anglais
This commit is contained in:
parent
142f242267
commit
7a22e6f339
@ -668,14 +668,14 @@ if (empty($reshook)) {
|
|||||||
setEventMessages($object->error, $object->errors, 'errors');
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
} else {
|
} else {
|
||||||
if ($object->error == 'ErrorProductAlreadyExists') {
|
if ($object->error == 'ErrorProductAlreadyExists') {
|
||||||
// permet une action personnallisée quand il y a tentative d'ajouter un produit
|
// allow to hook on ErrorProductAlreadyExists in any module
|
||||||
// avec un numéro de référence existant.
|
|
||||||
$reshook = $hookmanager->executeHooks('onProductAlreadyExists', $parameters, $object, $action);
|
$reshook = $hookmanager->executeHooks('onProductAlreadyExists', $parameters, $object, $action);
|
||||||
if ($reshook < 0) {
|
if ($reshook < 0) {
|
||||||
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||||
}
|
}
|
||||||
if ($object->error) {
|
if ($object->error) {
|
||||||
// L'erreur de l'objet a pu être effacée par la fonction
|
// check again to prevent translation issue,
|
||||||
|
// as error may have been cleared in hook function
|
||||||
setEventMessages($langs->trans($object->error), null, 'errors');
|
setEventMessages($langs->trans($object->error), null, 'errors');
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user