Skip to content

Commit

Permalink
Merge pull request #77 from PrestaShop/dev
Browse files Browse the repository at this point in the history
Release 4.4.2
  • Loading branch information
nicosomb committed Jan 12, 2024
2 parents acacee4 + 15587b7 commit 98886a8
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 5 deletions.
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,18 @@

Help your customers get in touch when they need, add a contact form on your store.

## Compatibility

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].
Expand All @@ -26,6 +38,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
2 changes: 1 addition & 1 deletion config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<module>
<name>contactform</name>
<displayName><![CDATA[Contact form]]></displayName>
<version><![CDATA[4.4.1]]></version>
<version><![CDATA[4.4.2]]></version>
<description><![CDATA[Adds a contact form to the "Contact us" page.]]></description>
<author><![CDATA[PrestaShop]]></author>
<tab><![CDATA[front_office_features]]></tab>
Expand Down
7 changes: 4 additions & 3 deletions contactform.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -331,7 +331,7 @@ public function getTemplateVarContact()
$contacts[$one_contact['id_contact']] = $one_contact;
}

if (isset($this->customer_thread['id_contact'])) {
if (!empty($this->customer_thread['id_contact'])) {
return [
$contacts[$this->customer_thread['id_contact']],
];
Expand Down Expand Up @@ -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}' => '',
];
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit 98886a8

Please sign in to comment.