From 64a03cc360f10e4e1bda4cf73f7cc4ae17d446c0 Mon Sep 17 00:00:00 2001 From: justeen35 Date: Fri, 26 May 2023 16:58:52 +0200 Subject: [PATCH 01/11] Update README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8fbd50d..520c639 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,6 @@ Just make sure to follow our [contribution guidelines][contribution-guidelines]. This module is released under the [Academic Free License 3.0][AFL-3.0] [report-issue]: https://github.com/PrestaShop/PrestaShop/issues/new/choose -[prestashop]: https://www.prestashop.com/ +[prestashop]: https://www.prestashop-project.org/ [contribution-guidelines]: https://devdocs.prestashop.com/1.7/contribute/contribution-guidelines/project-modules/ [AFL-3.0]: https://opensource.org/licenses/AFL-3.0 From 004d0b70f471964412b28d3feeb7ac548a4a7611 Mon Sep 17 00:00:00 2001 From: florine2623 <16019289+florine2623@users.noreply.github.com> Date: Thu, 6 Jul 2023 16:11:20 +0200 Subject: [PATCH 02/11] Update README.md --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 520c639..f5f775d 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,10 @@ Help your customers get in touch when they need, add a contact form on your store. +## Compatibility + +PrestaShop: `1.7.2.0` or later + ## Reporting issues You can report issues with this module in the main PrestaShop repository. [Click here to report an issue][report-issue]. From b37be1a2056c167af9bd75a709e6d1d0c14da395 Mon Sep 17 00:00:00 2001 From: florine2623 <16019289+florine2623@users.noreply.github.com> Date: Thu, 3 Aug 2023 16:36:48 +0200 Subject: [PATCH 03/11] Update README.md --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index f5f775d..d101197 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,14 @@ Help your customers get in touch when they need, add a contact form on your stor PrestaShop: `1.7.2.0` or later +## How to test + +Link to specs : https://docs.prestashop-project.org/functional-documentation/functional-documentation/ux-ui/back-office/improve/modules/contact-form + +In BO, enable the sending email options. Make sure that the emails are well received +In FO, use contact form to send a message. +Check with logged in/logged out customer with/out order made + ## Reporting issues You can report issues with this module in the main PrestaShop repository. [Click here to report an issue][report-issue]. From e6406dd8a698378466ce55297d3c92d58dc4f042 Mon Sep 17 00:00:00 2001 From: Nicolas CADOR <96910631+NicolasCador@users.noreply.github.com> Date: Fri, 24 Nov 2023 16:13:08 +0100 Subject: [PATCH 04/11] Undefined array key 0 in Subject select input --- contactform.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contactform.php b/contactform.php index 5611496..be1dd9e 100644 --- a/contactform.php +++ b/contactform.php @@ -331,7 +331,7 @@ public function getTemplateVarContact() $contacts[$one_contact['id_contact']] = $one_contact; } - if (isset($this->customer_thread['id_contact'])) { + if (isset($this->customer_thread['id_contact']) && $this->customer_thread['id_contact'] != 0) { return [ $contacts[$this->customer_thread['id_contact']], ]; From c3fcbdbd506ebc1ee84d8c5298bfd469324298d6 Mon Sep 17 00:00:00 2001 From: Nicolas CADOR <96910631+NicolasCador@users.noreply.github.com> Date: Sat, 25 Nov 2023 18:05:06 +0100 Subject: [PATCH 05/11] Update contactform.php Co-authored-by: Maxime Flasquin --- contactform.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contactform.php b/contactform.php index be1dd9e..1cc00e7 100644 --- a/contactform.php +++ b/contactform.php @@ -331,7 +331,7 @@ public function getTemplateVarContact() $contacts[$one_contact['id_contact']] = $one_contact; } - if (isset($this->customer_thread['id_contact']) && $this->customer_thread['id_contact'] != 0) { + if (isset($this->customer_thread['id_contact']) && $this->customer_thread['id_contact'] !== 0) { return [ $contacts[$this->customer_thread['id_contact']], ]; From 56a35f246a558153105ed1430ebfc7c2cb5d4951 Mon Sep 17 00:00:00 2001 From: Nicolas CADOR <96910631+NicolasCador@users.noreply.github.com> Date: Sun, 26 Nov 2023 19:09:50 +0100 Subject: [PATCH 06/11] Update contactform.php Co-authored-by: Tom Zajac --- contactform.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contactform.php b/contactform.php index 1cc00e7..55f5643 100644 --- a/contactform.php +++ b/contactform.php @@ -331,7 +331,7 @@ public function getTemplateVarContact() $contacts[$one_contact['id_contact']] = $one_contact; } - if (isset($this->customer_thread['id_contact']) && $this->customer_thread['id_contact'] !== 0) { + if (!empty($this->customer_thread['id_contact'])) { return [ $contacts[$this->customer_thread['id_contact']], ]; From deaa49d21b5fe69eb6845b4eeb8a12995ac3b5ad Mon Sep 17 00:00:00 2001 From: leemyong pakvn <3759923+leemyongpakvn@users.noreply.github.com> Date: Fri, 15 Dec 2023 15:08:55 +0700 Subject: [PATCH 07/11] use PHP built-in stripslashes since 8.0.0 --- contactform.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contactform.php b/contactform.php index 5611496..61169b5 100644 --- a/contactform.php +++ b/contactform.php @@ -567,12 +567,13 @@ public function sendMessage() && empty($mailAlreadySend) && ($sendConfirmationEmail || $sendNotificationEmail) ) { + $message = version_compare(_PS_VERSION_, '8.0.0', '>=') ? stripslashes($message) : Tools::stripslashes($message); $var_list = [ '{firstname}' => '', '{lastname}' => '', '{order_name}' => '-', '{attached_file}' => '-', - '{message}' => Tools::nl2br(Tools::htmlentitiesUTF8(Tools::stripslashes($message))), + '{message}' => Tools::nl2br(Tools::htmlentitiesUTF8($message)), '{email}' => $from, '{product_name}' => '', ]; From 82ac8d66278e7d42f303b8fdbe78a53fe3ecefe2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Hlav=C3=A1=C4=8Dek?= Date: Thu, 11 Jan 2024 13:14:06 +0100 Subject: [PATCH 08/11] Rename Upgrade-4.1.0.php to upgrade-4.1.0.php --- upgrade/{Upgrade-4.1.0.php => upgrade-4.1.0.php} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename upgrade/{Upgrade-4.1.0.php => upgrade-4.1.0.php} (100%) diff --git a/upgrade/Upgrade-4.1.0.php b/upgrade/upgrade-4.1.0.php similarity index 100% rename from upgrade/Upgrade-4.1.0.php rename to upgrade/upgrade-4.1.0.php From a5cb38117aa62baed8a074c555c285a4571806eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Hlav=C3=A1=C4=8Dek?= Date: Thu, 11 Jan 2024 13:14:11 +0100 Subject: [PATCH 09/11] Rename Upgrade-4.4.1.php to upgrade-4.4.1.php --- upgrade/{Upgrade-4.4.1.php => upgrade-4.4.1.php} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename upgrade/{Upgrade-4.4.1.php => upgrade-4.4.1.php} (100%) diff --git a/upgrade/Upgrade-4.4.1.php b/upgrade/upgrade-4.4.1.php similarity index 100% rename from upgrade/Upgrade-4.4.1.php rename to upgrade/upgrade-4.4.1.php From efb1819dadfad072075e7fb4b499b82865bd2681 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Hlav=C3=A1=C4=8Dek?= Date: Thu, 11 Jan 2024 13:37:03 +0100 Subject: [PATCH 10/11] Update contactform.php --- contactform.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contactform.php b/contactform.php index d77f389..2740ed3 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.1'; + $this->version = '4.4.2'; $this->bootstrap = true; parent::__construct(); From 995a8f094fd6d0311e3681fa70392b4586b5122a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Hlav=C3=A1=C4=8Dek?= Date: Thu, 11 Jan 2024 13:38:05 +0100 Subject: [PATCH 11/11] Update config.xml --- config.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.xml b/config.xml index 49e29da..3aef71b 100644 --- a/config.xml +++ b/config.xml @@ -2,7 +2,7 @@ contactform - +