diff --git a/config.xml b/config.xml index 3aef71b..1d29563 100644 --- a/config.xml +++ b/config.xml @@ -2,7 +2,7 @@ contactform - + diff --git a/contactform.php b/contactform.php index 2740ed3..8866693 100644 --- a/contactform.php +++ b/contactform.php @@ -54,7 +54,7 @@ public function __construct() $this->name = 'contactform'; $this->author = 'PrestaShop'; $this->tab = 'front_office_features'; - $this->version = '4.4.2'; + $this->version = '4.4.3'; $this->bootstrap = true; parent::__construct(); @@ -406,8 +406,6 @@ public function sendMessage() [], 'Shop.Notifications.Error' ); - - return; } if (empty($message)) { $this->context->controller->errors[] = $this->trans( @@ -415,8 +413,6 @@ public function sendMessage() [], 'Shop.Notifications.Error' ); - - return; } if (!Validate::isCleanHtml($message)) { $this->context->controller->errors[] = $this->trans( @@ -424,8 +420,6 @@ public function sendMessage() [], 'Shop.Notifications.Error' ); - - return; } $id_contact = (int) Tools::getValue('id_contact'); @@ -437,8 +431,6 @@ public function sendMessage() [], 'Modules.Contactform.Shop' ); - - return; } if (!empty($file_attachment['name']) && $file_attachment['error'] != 0) { @@ -447,8 +439,6 @@ public function sendMessage() [], 'Modules.Contactform.Shop' ); - - return; } if (!empty($file_attachment['name']) && !in_array(Tools::strtolower(Tools::substr($file_attachment['name'], -4)), $extension) && @@ -459,8 +449,6 @@ public function sendMessage() [], 'Modules.Contactform.Shop' ); - - return; } if ($url !== '' || empty($serverToken) @@ -473,7 +461,9 @@ public function sendMessage() 'Modules.Contactform.Shop' ); $this->createNewToken(); + } + if (!empty($this->context->controller->errors)) { return; } diff --git a/views/templates/hook/contactform.tpl b/views/templates/widget/contactform.tpl similarity index 100% rename from views/templates/hook/contactform.tpl rename to views/templates/widget/contactform.tpl diff --git a/views/templates/hook/index.php b/views/templates/widget/index.php similarity index 100% rename from views/templates/hook/index.php rename to views/templates/widget/index.php