From 8f7c01cda6a9b19c035d648c222754489656f37c Mon Sep 17 00:00:00 2001
From: kyrena <78410399+kyrena@users.noreply.github.com>
Date: Fri, 27 Oct 2023 11:22:40 +0200
Subject: [PATCH 01/23] Add email template
---
.../en_US/template/email/contact_form_auto_reply.html | 10 ++++++++++
1 file changed, 10 insertions(+)
create mode 100644 app/locale/en_US/template/email/contact_form_auto_reply.html
diff --git a/app/locale/en_US/template/email/contact_form_auto_reply.html b/app/locale/en_US/template/email/contact_form_auto_reply.html
new file mode 100644
index 00000000000..4f2d0545c58
--- /dev/null
+++ b/app/locale/en_US/template/email/contact_form_auto_reply.html
@@ -0,0 +1,10 @@
+
+
+
+We have received your message!
+ We will answer you shortly.
From 4e543d7160f25040d6185bdd0195679549aa5c71 Mon Sep 17 00:00:00 2001
From: kyrena <78410399+kyrena@users.noreply.github.com>
Date: Fri, 27 Oct 2023 11:24:11 +0200
Subject: [PATCH 02/23] Add configuration
---
app/code/core/Mage/Contacts/etc/system.xml | 44 +++++++++++++++++-----
1 file changed, 35 insertions(+), 9 deletions(-)
diff --git a/app/code/core/Mage/Contacts/etc/system.xml b/app/code/core/Mage/Contacts/etc/system.xml
index 9b0c674f17b..5f2631862ee 100644
--- a/app/code/core/Mage/Contacts/etc/system.xml
+++ b/app/code/core/Mage/Contacts/etc/system.xml
@@ -50,23 +50,23 @@
11
-
-
- validate-email required-entry
- 10
- 1
- 1
- 1
- selectadminhtml/system_config_source_email_identity
- 20
+ 10111
+
+
+ validate-email required-entry
+ 20
+ 1
+ 1
+ 1
+ select
@@ -76,6 +76,32 @@
11
+
+
+ adminhtml/system_config_form_field_heading
+ 90
+ 1
+ 1
+ 1
+
+
+
+ select
+ adminhtml/system_config_source_yesno
+ 91
+ 1
+ 1
+ 1
+
+
+
+ select
+ adminhtml/system_config_source_email_template
+ 92
+ 1
+ 1
+ 1
+
From 86bce4d1a53c0573c0e75992abded39874d38829 Mon Sep 17 00:00:00 2001
From: kyrena <78410399+kyrena@users.noreply.github.com>
Date: Fri, 27 Oct 2023 11:25:10 +0200
Subject: [PATCH 03/23] Add email declaration
---
app/code/core/Mage/Contacts/etc/config.xml | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/app/code/core/Mage/Contacts/etc/config.xml b/app/code/core/Mage/Contacts/etc/config.xml
index 951dbaa6d24..acd4230905b 100644
--- a/app/code/core/Mage/Contacts/etc/config.xml
+++ b/app/code/core/Mage/Contacts/etc/config.xml
@@ -62,10 +62,14 @@
contact_form.htmltext
+
+
+ contact_form_auto_reply.html
+ html
+
-
@@ -77,7 +81,6 @@
-
From eada26dad2ebb0cbcb21729ba6b8d34c2e868beb Mon Sep 17 00:00:00 2001
From: kyrena <78410399+kyrena@users.noreply.github.com>
Date: Fri, 27 Oct 2023 11:26:36 +0200
Subject: [PATCH 04/23] Send an email confirmation to the customer
---
.../Contacts/controllers/IndexController.php | 69 ++++++++++++-------
1 file changed, 43 insertions(+), 26 deletions(-)
diff --git a/app/code/core/Mage/Contacts/controllers/IndexController.php b/app/code/core/Mage/Contacts/controllers/IndexController.php
index 12f9ba6739a..f7a96709ad2 100644
--- a/app/code/core/Mage/Contacts/controllers/IndexController.php
+++ b/app/code/core/Mage/Contacts/controllers/IndexController.php
@@ -9,7 +9,7 @@
* @category Mage
* @package Mage_Contacts
* @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com)
- * @copyright Copyright (c) 2020-2023 The OpenMage Contributors (https://www.openmage.org)
+ * @copyright Copyright (c) 2020-2022 The OpenMage Contributors (https://www.openmage.org)
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/
@@ -21,10 +21,12 @@
*/
class Mage_Contacts_IndexController extends Mage_Core_Controller_Front_Action
{
- public const XML_PATH_EMAIL_RECIPIENT = 'contacts/email/recipient_email';
- public const XML_PATH_EMAIL_SENDER = 'contacts/email/sender_email_identity';
- public const XML_PATH_EMAIL_TEMPLATE = 'contacts/email/email_template';
- public const XML_PATH_ENABLED = 'contacts/contacts/enabled';
+ public const XML_PATH_ENABLED = 'contacts/contacts/enabled';
+ public const XML_PATH_EMAIL_SENDER = 'contacts/email/sender_email_identity';
+ public const XML_PATH_EMAIL_RECIPIENT = 'contacts/email/recipient_email';
+ public const XML_PATH_EMAIL_TEMPLATE = 'contacts/email/email_template';
+ public const XML_PATH_NOTIFY_CUSTOMER = 'contacts/email/customer_enabled';
+ public const XML_PATH_EMAIL_CUSTOMER = 'contacts/email/customer_email_template';
/**
* @return $this
@@ -58,26 +60,28 @@ public function postAction()
/** @var Mage_Core_Model_Translate $translate */
$translate->setTranslateInline(false);
try {
+ if (!$this->_validateFormKey()) {
+ Mage::throwException($this->__('Invalid Form Key. Please submit your request again.'));
+ }
+
$postObject = new Varien_Object();
$postObject->setData($post);
+ // check data
$error = false;
-
if (!Zend_Validate::is(trim($post['name']), 'NotEmpty')) {
$error = true;
- }
-
- if (!Zend_Validate::is(trim($post['comment']), 'NotEmpty')) {
+ } elseif (!Zend_Validate::is(trim($post['comment']), 'NotEmpty')) {
$error = true;
- }
-
- if (!Zend_Validate::is(trim($post['email']), 'EmailAddress')) {
+ } elseif (!Zend_Validate::is(trim($post['email']), 'EmailAddress')) {
$error = true;
}
if ($error) {
- throw new Exception();
+ Mage::throwException($this->__('Unable to submit your request. Please try again later'));
}
+
+ // send email
$mailTemplate = Mage::getModel('core/email_template');
/** @var Mage_Core_Model_Email_Template $mailTemplate */
$mailTemplate->setDesignConfig(['area' => 'frontend'])
@@ -91,24 +95,37 @@ public function postAction()
);
if (!$mailTemplate->getSentSuccess()) {
- throw new Exception();
+ Mage::throwException($this->__('Unable to submit your request. Please try again later'));
}
- $translate->setTranslateInline(true);
-
- Mage::getSingleton('customer/session')->addSuccess(Mage::helper('contacts')->__('Your inquiry was submitted and will be responded to as soon as possible. Thank you for contacting us.'));
- $this->_redirect('*/*/');
+ // send customer email
+ if (Mage::getStoreConfigFlag(self::XML_PATH_NOTIFY_CUSTOMER)) {
+ $mailTemplateCustomer = Mage::getModel('core/email_template');
+ /** @var Mage_Core_Model_Email_Template $mailTemplateCustomer */
+ $mailTemplateCustomer->setDesignConfig(['area' => 'frontend'])
+ ->setReplyTo(Mage::getStoreConfig(self::XML_PATH_EMAIL_RECIPIENT))
+ ->sendTransactional(
+ Mage::getStoreConfig(self::XML_PATH_EMAIL_CUSTOMER),
+ Mage::getStoreConfig(self::XML_PATH_EMAIL_SENDER),
+ $post['email'],
+ null,
+ ['data' => $postObject]
+ );
+ // ignore getSentSuccess
+ }
- return;
- } catch (Exception $e) {
$translate->setTranslateInline(true);
-
- Mage::getSingleton('customer/session')->addError(Mage::helper('contacts')->__('Unable to submit your request. Please, try again later'));
- $this->_redirect('*/*/');
- return;
+ Mage::getSingleton('customer/session')->addSuccess($this->__('Your inquiry was submitted and will be responded to as soon as possible. Thank you for contacting us.'));
+ } catch (Mage_Core_Exception $e) {
+ $translate->setTranslateInline(true);
+ Mage::logException($e);
+ Mage::getSingleton('customer/session')->addError($e->getMessage());
+ } catch (Exception $e) {
+ Mage::logException($e);
+ Mage::getSingleton('customer/session')->addError($this->__('Unable to submit your request. Please try again later'));
}
- } else {
- $this->_redirect('*/*/');
}
+
+ $this->_redirect('*/*/');
}
}
From dc5159a4f61e5481f0342f635bd7056098bdf449 Mon Sep 17 00:00:00 2001
From: kyrena <78410399+kyrena@users.noreply.github.com>
Date: Fri, 27 Oct 2023 11:28:54 +0200
Subject: [PATCH 05/23] Remove next change
---
app/code/core/Mage/Contacts/controllers/IndexController.php | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/app/code/core/Mage/Contacts/controllers/IndexController.php b/app/code/core/Mage/Contacts/controllers/IndexController.php
index f7a96709ad2..f6e04f0ecb6 100644
--- a/app/code/core/Mage/Contacts/controllers/IndexController.php
+++ b/app/code/core/Mage/Contacts/controllers/IndexController.php
@@ -9,7 +9,7 @@
* @category Mage
* @package Mage_Contacts
* @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com)
- * @copyright Copyright (c) 2020-2022 The OpenMage Contributors (https://www.openmage.org)
+ * @copyright Copyright (c) 2020-2023 The OpenMage Contributors (https://www.openmage.org)
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/
@@ -60,10 +60,6 @@ public function postAction()
/** @var Mage_Core_Model_Translate $translate */
$translate->setTranslateInline(false);
try {
- if (!$this->_validateFormKey()) {
- Mage::throwException($this->__('Invalid Form Key. Please submit your request again.'));
- }
-
$postObject = new Varien_Object();
$postObject->setData($post);
From 260377a3ff73158848177cfeb45b728ec7cdc41d Mon Sep 17 00:00:00 2001
From: kyrena <78410399+kyrena@users.noreply.github.com>
Date: Fri, 27 Oct 2023 11:33:06 +0200
Subject: [PATCH 06/23] Update translations
---
app/locale/en_US/Mage_Contacts.csv | 2 ++
1 file changed, 2 insertions(+)
diff --git a/app/locale/en_US/Mage_Contacts.csv b/app/locale/en_US/Mage_Contacts.csv
index 277333d7e51..f27d4d3f976 100644
--- a/app/locale/en_US/Mage_Contacts.csv
+++ b/app/locale/en_US/Mage_Contacts.csv
@@ -1,6 +1,7 @@
"* Required Fields","* Required Fields"
"Comment","Comment"
"Contact Form","Contact Form"
+"Contact Form Auto Reply","Contact Form Auto Reply"
"Contact Information","Contact Information"
"Contact Us","Contact Us"
"Contact Us Form","Contact Us Form"
@@ -12,6 +13,7 @@
"Enable Contact Us","Enable Contact Us"
"Name","Name"
"Send Emails To","Send Emails To"
+"Auto Reply to Customer",""
"Submit","Submit"
"Telephone","Telephone"
"Unable to submit your request. Please, try again later","Unable to submit your request. Please, try again later"
From 56b5a6050620b0225654b0e0e055e55f057e2d59 Mon Sep 17 00:00:00 2001
From: kyrena <78410399+kyrena@users.noreply.github.com>
Date: Fri, 27 Oct 2023 11:34:58 +0200
Subject: [PATCH 07/23] Cancel text change
---
app/code/core/Mage/Contacts/controllers/IndexController.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/code/core/Mage/Contacts/controllers/IndexController.php b/app/code/core/Mage/Contacts/controllers/IndexController.php
index f6e04f0ecb6..6248e945042 100644
--- a/app/code/core/Mage/Contacts/controllers/IndexController.php
+++ b/app/code/core/Mage/Contacts/controllers/IndexController.php
@@ -118,7 +118,7 @@ public function postAction()
Mage::getSingleton('customer/session')->addError($e->getMessage());
} catch (Exception $e) {
Mage::logException($e);
- Mage::getSingleton('customer/session')->addError($this->__('Unable to submit your request. Please try again later'));
+ Mage::getSingleton('customer/session')->addError($this->__('Unable to submit your request. Please, try again later'));
}
}
From a05bc182c739cfb938c7bbe3b4c67569b42832e8 Mon Sep 17 00:00:00 2001
From: kyrena <78410399+kyrena@users.noreply.github.com>
Date: Fri, 27 Oct 2023 11:36:59 +0200
Subject: [PATCH 08/23] Same text everywhere
---
app/code/core/Mage/Contacts/controllers/IndexController.php | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/app/code/core/Mage/Contacts/controllers/IndexController.php b/app/code/core/Mage/Contacts/controllers/IndexController.php
index 6248e945042..14aa30ea308 100644
--- a/app/code/core/Mage/Contacts/controllers/IndexController.php
+++ b/app/code/core/Mage/Contacts/controllers/IndexController.php
@@ -74,7 +74,7 @@ public function postAction()
}
if ($error) {
- Mage::throwException($this->__('Unable to submit your request. Please try again later'));
+ Mage::throwException($this->__('Unable to submit your request. Please, try again later'));
}
// send email
@@ -91,7 +91,7 @@ public function postAction()
);
if (!$mailTemplate->getSentSuccess()) {
- Mage::throwException($this->__('Unable to submit your request. Please try again later'));
+ Mage::throwException($this->__('Unable to submit your request. Please, try again later'));
}
// send customer email
From 236230fa78b1255ef630aaad19d46e49c41aa4ba Mon Sep 17 00:00:00 2001
From: kyrena <78410399+kyrena@users.noreply.github.com>
Date: Fri, 27 Oct 2023 11:40:17 +0200
Subject: [PATCH 09/23] Fix translation
---
app/locale/en_US/Mage_Contacts.csv | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/locale/en_US/Mage_Contacts.csv b/app/locale/en_US/Mage_Contacts.csv
index f27d4d3f976..6c6f428fcfe 100644
--- a/app/locale/en_US/Mage_Contacts.csv
+++ b/app/locale/en_US/Mage_Contacts.csv
@@ -13,7 +13,7 @@
"Enable Contact Us","Enable Contact Us"
"Name","Name"
"Send Emails To","Send Emails To"
-"Auto Reply to Customer",""
+"Auto Reply to Customer","Auto Reply to Customer"
"Submit","Submit"
"Telephone","Telephone"
"Unable to submit your request. Please, try again later","Unable to submit your request. Please, try again later"
From a33eed493f1a923bd7fd564477da86106f02560f Mon Sep 17 00:00:00 2001
From: Fabrizio Balliano
Date: Fri, 16 Feb 2024 11:03:28 +0000
Subject: [PATCH 10/23] Reworked the whole PR
---
.../Contacts/controllers/IndexController.php | 25 +++++++++--------
app/code/core/Mage/Contacts/etc/config.xml | 4 +--
app/code/core/Mage/Contacts/etc/system.xml | 27 ++++++++++---------
.../email/contact_form_auto_reply.html | 7 ++---
4 files changed, 32 insertions(+), 31 deletions(-)
diff --git a/app/code/core/Mage/Contacts/controllers/IndexController.php b/app/code/core/Mage/Contacts/controllers/IndexController.php
index 14aa30ea308..ce26302a4fe 100644
--- a/app/code/core/Mage/Contacts/controllers/IndexController.php
+++ b/app/code/core/Mage/Contacts/controllers/IndexController.php
@@ -21,12 +21,12 @@
*/
class Mage_Contacts_IndexController extends Mage_Core_Controller_Front_Action
{
- public const XML_PATH_ENABLED = 'contacts/contacts/enabled';
- public const XML_PATH_EMAIL_SENDER = 'contacts/email/sender_email_identity';
- public const XML_PATH_EMAIL_RECIPIENT = 'contacts/email/recipient_email';
- public const XML_PATH_EMAIL_TEMPLATE = 'contacts/email/email_template';
- public const XML_PATH_NOTIFY_CUSTOMER = 'contacts/email/customer_enabled';
- public const XML_PATH_EMAIL_CUSTOMER = 'contacts/email/customer_email_template';
+ public const XML_PATH_ENABLED = 'contacts/contacts/enabled';
+ public const XML_PATH_EMAIL_SENDER = 'contacts/email/sender_email_identity';
+ public const XML_PATH_EMAIL_RECIPIENT = 'contacts/email/recipient_email';
+ public const XML_PATH_EMAIL_TEMPLATE = 'contacts/email/email_template';
+ public const XML_PATH_AUTO_REPLY_ENABLED = 'contacts/auto_reply_to_customer/enabled';
+ public const XML_PATH_AUTO_REPLY_EMAIL_TEMPLATE = 'contacts/auto_reply_to_customer/email_template';
/**
* @return $this
@@ -94,20 +94,19 @@ public function postAction()
Mage::throwException($this->__('Unable to submit your request. Please, try again later'));
}
- // send customer email
- if (Mage::getStoreConfigFlag(self::XML_PATH_NOTIFY_CUSTOMER)) {
- $mailTemplateCustomer = Mage::getModel('core/email_template');
- /** @var Mage_Core_Model_Email_Template $mailTemplateCustomer */
- $mailTemplateCustomer->setDesignConfig(['area' => 'frontend'])
+ // send auto reply email to customer
+ if (Mage::getStoreConfigFlag(self::XML_PATH_AUTO_REPLY_ENABLED)) {
+ $mailTemplate = Mage::getModel('core/email_template');
+ /** @var Mage_Core_Model_Email_Template $mailTemplate */
+ $mailTemplate->setDesignConfig(['area' => 'frontend'])
->setReplyTo(Mage::getStoreConfig(self::XML_PATH_EMAIL_RECIPIENT))
->sendTransactional(
- Mage::getStoreConfig(self::XML_PATH_EMAIL_CUSTOMER),
+ Mage::getStoreConfig(self::XML_PATH_AUTO_REPLY_EMAIL_TEMPLATE),
Mage::getStoreConfig(self::XML_PATH_EMAIL_SENDER),
$post['email'],
null,
['data' => $postObject]
);
- // ignore getSentSuccess
}
$translate->setTranslateInline(true);
diff --git a/app/code/core/Mage/Contacts/etc/config.xml b/app/code/core/Mage/Contacts/etc/config.xml
index acd4230905b..30e13560d3e 100644
--- a/app/code/core/Mage/Contacts/etc/config.xml
+++ b/app/code/core/Mage/Contacts/etc/config.xml
@@ -62,11 +62,11 @@
contact_form.htmltext
-
+ contact_form_auto_reply.htmlhtml
-
+
diff --git a/app/code/core/Mage/Contacts/etc/system.xml b/app/code/core/Mage/Contacts/etc/system.xml
index 5f2631862ee..d547fd97994 100644
--- a/app/code/core/Mage/Contacts/etc/system.xml
+++ b/app/code/core/Mage/Contacts/etc/system.xml
@@ -76,15 +76,16 @@
11
-
-
- adminhtml/system_config_form_field_heading
- 90
- 1
- 1
- 1
-
-
+
+
+
+
+ 50
+ 1
+ 1
+ 1
+
+ selectadminhtml/system_config_source_yesno
@@ -92,8 +93,8 @@
111
-
-
+
+ selectadminhtml/system_config_source_email_template
@@ -101,9 +102,9 @@
111
-
+
-
+
diff --git a/app/locale/en_US/template/email/contact_form_auto_reply.html b/app/locale/en_US/template/email/contact_form_auto_reply.html
index 4f2d0545c58..71a99ec9cbd 100644
--- a/app/locale/en_US/template/email/contact_form_auto_reply.html
+++ b/app/locale/en_US/template/email/contact_form_auto_reply.html
@@ -1,4 +1,4 @@
-
+
-We have received your message!
- We will answer you shortly.
+Thank you for contacting us, we will reply you shortly.
+
+Have a nice day.
From 5f3990fb86a7100f9dd502eb6a83239cde2d7a02 Mon Sep 17 00:00:00 2001
From: Fabrizio Balliano
Date: Fri, 16 Feb 2024 12:15:22 +0000
Subject: [PATCH 11/23] Added warning message
---
app/code/core/Mage/Contacts/etc/system.xml | 3 ++-
app/locale/en_US/Mage_Contacts.csv | 7 ++++---
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/app/code/core/Mage/Contacts/etc/system.xml b/app/code/core/Mage/Contacts/etc/system.xml
index d547fd97994..7819323e2a0 100644
--- a/app/code/core/Mage/Contacts/etc/system.xml
+++ b/app/code/core/Mage/Contacts/etc/system.xml
@@ -85,8 +85,9 @@
11
-
+
+ Caution: auto reply can be abused to spam, ensure you have implemented necessary security measures (eg: enabling captcha) before proceeding.selectadminhtml/system_config_source_yesno91
diff --git a/app/locale/en_US/Mage_Contacts.csv b/app/locale/en_US/Mage_Contacts.csv
index 6c6f428fcfe..42f1fd64bb1 100644
--- a/app/locale/en_US/Mage_Contacts.csv
+++ b/app/locale/en_US/Mage_Contacts.csv
@@ -1,4 +1,6 @@
"* Required Fields","* Required Fields"
+"Auto Reply to Customer","Auto Reply to Customer"
+"Caution: auto reply can be abused to spam, ensure you have implemented necessary security measures (eg: enabling captcha) before proceeding.","Caution: auto reply can be abused to spam, ensure you have implemented necessary security measures (eg: enabling captcha) before proceeding."
"Comment","Comment"
"Contact Form","Contact Form"
"Contact Form Auto Reply","Contact Form Auto Reply"
@@ -11,10 +13,9 @@
"Email Sender","Email Sender"
"Email Template","Email Template"
"Enable Contact Us","Enable Contact Us"
+"Your inquiry was submitted and will be responded to as soon as possible. Thank you for contacting us.","Your inquiry was submitted and will be responded to as soon as possible. Thank you for contacting us."
"Name","Name"
"Send Emails To","Send Emails To"
-"Auto Reply to Customer","Auto Reply to Customer"
"Submit","Submit"
"Telephone","Telephone"
-"Unable to submit your request. Please, try again later","Unable to submit your request. Please, try again later"
-"Your inquiry was submitted and will be responded to as soon as possible. Thank you for contacting us.","Your inquiry was submitted and will be responded to as soon as possible. Thank you for contacting us."
+"Unable to submit your request. Please, try again later","Unable to submit your request. Please, try again later"
\ No newline at end of file
From 8065fe0694d8a9c7578d6d2da3829f0a33a14267 Mon Sep 17 00:00:00 2001
From: Fabrizio Balliano
Date: Fri, 16 Feb 2024 16:59:40 +0000
Subject: [PATCH 12/23]
https://github.com/OpenMage/magento-lts/pull/3615#discussion_r1492412261
---
.../en_US/template/email/contact_form_auto_reply.html | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/app/locale/en_US/template/email/contact_form_auto_reply.html b/app/locale/en_US/template/email/contact_form_auto_reply.html
index 71a99ec9cbd..0cc4b78b724 100644
--- a/app/locale/en_US/template/email/contact_form_auto_reply.html
+++ b/app/locale/en_US/template/email/contact_form_auto_reply.html
@@ -6,6 +6,8 @@
"var data.comment":"Comment"}
@-->
-Thank you for contacting us, we will reply you shortly.
-
+Thank you for contacting us, we will reply you shortly.
Have a nice day.
+
+In case you received this message without using the contact form on our website, please ignore it.
+Thank you for your understanding.
\ No newline at end of file
From e718922de6e2f48339d9f74a00c30fed0274c575 Mon Sep 17 00:00:00 2001
From: Fabrizio Balliano
Date: Tue, 20 Feb 2024 10:11:06 +0000
Subject: [PATCH 13/23] new warning message
---
app/code/core/Mage/Contacts/etc/system.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/code/core/Mage/Contacts/etc/system.xml b/app/code/core/Mage/Contacts/etc/system.xml
index 7819323e2a0..2735a572641 100644
--- a/app/code/core/Mage/Contacts/etc/system.xml
+++ b/app/code/core/Mage/Contacts/etc/system.xml
@@ -87,7 +87,7 @@
- Caution: auto reply can be abused to spam, ensure you have implemented necessary security measures (eg: enabling captcha) before proceeding.
+ Warning! Enabling this feature may cause unwanted messages to be sent to people whose email address is used abusively. Please make sure that you have implemented security measures before activation (e.g. CAPTCHA, HoneySpam).]]>selectadminhtml/system_config_source_yesno91
From 7cc543f760c2ef7901e011dcedd90fa0834c061c Mon Sep 17 00:00:00 2001
From: ADDISON <8360474+ADDISON74@users.noreply.github.com>
Date: Tue, 20 Feb 2024 13:44:17 +0200
Subject: [PATCH 14/23] warning-message
---
app/code/core/Mage/Contacts/etc/system.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/code/core/Mage/Contacts/etc/system.xml b/app/code/core/Mage/Contacts/etc/system.xml
index 2735a572641..10e844e7a75 100644
--- a/app/code/core/Mage/Contacts/etc/system.xml
+++ b/app/code/core/Mage/Contacts/etc/system.xml
@@ -87,7 +87,7 @@
- Warning! Enabling this feature may cause unwanted messages to be sent to people whose email address is used abusively. Please make sure that you have implemented security measures before activation (e.g. CAPTCHA, HoneySpam).]]>
+ Warning! Enabling this feature may cause unwanted messages to be sent to people whose email addresses are being used abusively. Please make sure that you have implemented security measures before enabling (e.g. CAPTCHA, HoneySpam).]]>selectadminhtml/system_config_source_yesno91
From 6341fe02bfd62bb03ca23a3f0813711999018afa Mon Sep 17 00:00:00 2001
From: ADDISON <8360474+ADDISON74@users.noreply.github.com>
Date: Wed, 21 Feb 2024 01:16:07 +0300
Subject: [PATCH 15/23] update warning in language
---
app/locale/en_US/Mage_Contacts.csv | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/app/locale/en_US/Mage_Contacts.csv b/app/locale/en_US/Mage_Contacts.csv
index 42f1fd64bb1..57eebb784a6 100644
--- a/app/locale/en_US/Mage_Contacts.csv
+++ b/app/locale/en_US/Mage_Contacts.csv
@@ -1,6 +1,6 @@
"* Required Fields","* Required Fields"
"Auto Reply to Customer","Auto Reply to Customer"
-"Caution: auto reply can be abused to spam, ensure you have implemented necessary security measures (eg: enabling captcha) before proceeding.","Caution: auto reply can be abused to spam, ensure you have implemented necessary security measures (eg: enabling captcha) before proceeding."
+"Warning! Enabling this feature may cause unwanted messages to be sent to people whose email addresses are being used abusively. Please make sure that you have implemented security measures before enabling (e.g. CAPTCHA, HoneySpam).","Warning! Enabling this feature may cause unwanted messages to be sent to people whose email addresses are being used abusively. Please make sure that you have implemented security measures before enabling (e.g. CAPTCHA, HoneySpam).
"Comment","Comment"
"Contact Form","Contact Form"
"Contact Form Auto Reply","Contact Form Auto Reply"
@@ -18,4 +18,4 @@
"Send Emails To","Send Emails To"
"Submit","Submit"
"Telephone","Telephone"
-"Unable to submit your request. Please, try again later","Unable to submit your request. Please, try again later"
\ No newline at end of file
+"Unable to submit your request. Please, try again later","Unable to submit your request. Please, try again later"
From c7dab3408af00b83187eadc1ccbf59b42644d37c Mon Sep 17 00:00:00 2001
From: ADDISON <8360474+ADDISON74@users.noreply.github.com>
Date: Wed, 21 Feb 2024 01:16:56 +0300
Subject: [PATCH 16/23] Update Mage_Contacts.csv
---
app/locale/en_US/Mage_Contacts.csv | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/locale/en_US/Mage_Contacts.csv b/app/locale/en_US/Mage_Contacts.csv
index 57eebb784a6..9b87168515a 100644
--- a/app/locale/en_US/Mage_Contacts.csv
+++ b/app/locale/en_US/Mage_Contacts.csv
@@ -1,6 +1,6 @@
"* Required Fields","* Required Fields"
"Auto Reply to Customer","Auto Reply to Customer"
-"Warning! Enabling this feature may cause unwanted messages to be sent to people whose email addresses are being used abusively. Please make sure that you have implemented security measures before enabling (e.g. CAPTCHA, HoneySpam).","Warning! Enabling this feature may cause unwanted messages to be sent to people whose email addresses are being used abusively. Please make sure that you have implemented security measures before enabling (e.g. CAPTCHA, HoneySpam).
+"Warning! Enabling this feature may cause unwanted messages to be sent to people whose email addresses are being used abusively. Please make sure that you have implemented security measures before enabling (e.g. CAPTCHA, HoneySpam).","Warning! Enabling this feature may cause unwanted messages to be sent to people whose email addresses are being used abusively. Please make sure that you have implemented security measures before enabling (e.g. CAPTCHA, HoneySpam)."
"Comment","Comment"
"Contact Form","Contact Form"
"Contact Form Auto Reply","Contact Form Auto Reply"
From d56b008c24f2326c8c59f1b6d615cc6905d2508c Mon Sep 17 00:00:00 2001
From: ADDISON <8360474+ADDISON74@users.noreply.github.com>
Date: Wed, 21 Feb 2024 01:21:30 +0300
Subject: [PATCH 17/23] enable-auto-reply-csv
---
app/locale/en_US/Mage_Contacts.csv | 1 +
1 file changed, 1 insertion(+)
diff --git a/app/locale/en_US/Mage_Contacts.csv b/app/locale/en_US/Mage_Contacts.csv
index 9b87168515a..c351eda64bd 100644
--- a/app/locale/en_US/Mage_Contacts.csv
+++ b/app/locale/en_US/Mage_Contacts.csv
@@ -13,6 +13,7 @@
"Email Sender","Email Sender"
"Email Template","Email Template"
"Enable Contact Us","Enable Contact Us"
+"Enable Auto Reply","Enable Auto Reply"
"Your inquiry was submitted and will be responded to as soon as possible. Thank you for contacting us.","Your inquiry was submitted and will be responded to as soon as possible. Thank you for contacting us."
"Name","Name"
"Send Emails To","Send Emails To"
From fbf94ba965fac98cf92e46c46fb108892fc081fb Mon Sep 17 00:00:00 2001
From: ADDISON <8360474+ADDISON74@users.noreply.github.com>
Date: Wed, 21 Feb 2024 01:22:21 +0300
Subject: [PATCH 18/23] Update system.xml
---
app/code/core/Mage/Contacts/etc/system.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/code/core/Mage/Contacts/etc/system.xml b/app/code/core/Mage/Contacts/etc/system.xml
index 10e844e7a75..880a951d14c 100644
--- a/app/code/core/Mage/Contacts/etc/system.xml
+++ b/app/code/core/Mage/Contacts/etc/system.xml
@@ -86,7 +86,7 @@
1
-
+
Warning! Enabling this feature may cause unwanted messages to be sent to people whose email addresses are being used abusively. Please make sure that you have implemented security measures before enabling (e.g. CAPTCHA, HoneySpam).]]>selectadminhtml/system_config_source_yesno
From e8e79475443c34a9c6ee2053c745721e0524872e Mon Sep 17 00:00:00 2001
From: ADDISON <8360474+ADDISON74@users.noreply.github.com>
Date: Wed, 21 Feb 2024 01:26:04 +0300
Subject: [PATCH 19/23] Update IndexController.php
---
app/code/core/Mage/Contacts/controllers/IndexController.php | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/app/code/core/Mage/Contacts/controllers/IndexController.php b/app/code/core/Mage/Contacts/controllers/IndexController.php
index ce26302a4fe..42cf817ed77 100644
--- a/app/code/core/Mage/Contacts/controllers/IndexController.php
+++ b/app/code/core/Mage/Contacts/controllers/IndexController.php
@@ -25,8 +25,8 @@ class Mage_Contacts_IndexController extends Mage_Core_Controller_Front_Action
public const XML_PATH_EMAIL_SENDER = 'contacts/email/sender_email_identity';
public const XML_PATH_EMAIL_RECIPIENT = 'contacts/email/recipient_email';
public const XML_PATH_EMAIL_TEMPLATE = 'contacts/email/email_template';
- public const XML_PATH_AUTO_REPLY_ENABLED = 'contacts/auto_reply_to_customer/enabled';
- public const XML_PATH_AUTO_REPLY_EMAIL_TEMPLATE = 'contacts/auto_reply_to_customer/email_template';
+ public const XML_PATH_AUTO_REPLY_ENABLED = 'contacts/auto_reply/enabled';
+ public const XML_PATH_AUTO_REPLY_EMAIL_TEMPLATE = 'contacts/auto_reply/email_template';
/**
* @return $this
From 638b49302911c70a23d5a369dc57c67d1bdd1f34 Mon Sep 17 00:00:00 2001
From: ADDISON <8360474+ADDISON74@users.noreply.github.com>
Date: Wed, 21 Feb 2024 01:26:50 +0300
Subject: [PATCH 20/23] Update config.xml
---
app/code/core/Mage/Contacts/etc/config.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/app/code/core/Mage/Contacts/etc/config.xml b/app/code/core/Mage/Contacts/etc/config.xml
index 30e13560d3e..0234162fc4e 100644
--- a/app/code/core/Mage/Contacts/etc/config.xml
+++ b/app/code/core/Mage/Contacts/etc/config.xml
@@ -62,11 +62,11 @@
contact_form.htmltext
-
+ contact_form_auto_reply.htmlhtml
-
+
From 8833fe859b502cd851b31ade90118fe3cd14ccb9 Mon Sep 17 00:00:00 2001
From: ADDISON <8360474+ADDISON74@users.noreply.github.com>
Date: Wed, 21 Feb 2024 01:27:48 +0300
Subject: [PATCH 21/23] Update system.xml
---
app/code/core/Mage/Contacts/etc/system.xml | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/app/code/core/Mage/Contacts/etc/system.xml b/app/code/core/Mage/Contacts/etc/system.xml
index 880a951d14c..dfdcaffcb49 100644
--- a/app/code/core/Mage/Contacts/etc/system.xml
+++ b/app/code/core/Mage/Contacts/etc/system.xml
@@ -78,8 +78,8 @@
-
-
+
+
5011
@@ -105,7 +105,7 @@
1
-
+
From 4255dcf5860fb0a8600bb7d1ad0cf86401cd9df4 Mon Sep 17 00:00:00 2001
From: ADDISON <8360474+ADDISON74@users.noreply.github.com>
Date: Wed, 21 Feb 2024 01:28:16 +0300
Subject: [PATCH 22/23] Update Mage_Contacts.csv
---
app/locale/en_US/Mage_Contacts.csv | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/locale/en_US/Mage_Contacts.csv b/app/locale/en_US/Mage_Contacts.csv
index c351eda64bd..8daacc3586f 100644
--- a/app/locale/en_US/Mage_Contacts.csv
+++ b/app/locale/en_US/Mage_Contacts.csv
@@ -1,5 +1,5 @@
"* Required Fields","* Required Fields"
-"Auto Reply to Customer","Auto Reply to Customer"
+"Auto Reply","Auto Reply"
"Warning! Enabling this feature may cause unwanted messages to be sent to people whose email addresses are being used abusively. Please make sure that you have implemented security measures before enabling (e.g. CAPTCHA, HoneySpam).","Warning! Enabling this feature may cause unwanted messages to be sent to people whose email addresses are being used abusively. Please make sure that you have implemented security measures before enabling (e.g. CAPTCHA, HoneySpam)."
"Comment","Comment"
"Contact Form","Contact Form"
From a104dbce5d0df8143b486737d9192aebb455fcab Mon Sep 17 00:00:00 2001
From: ADDISON <8360474+ADDISON74@users.noreply.github.com>
Date: Wed, 21 Feb 2024 01:33:29 +0300
Subject: [PATCH 23/23] Update contact_form_auto_reply.html
---
.../en_US/template/email/contact_form_auto_reply.html | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/app/locale/en_US/template/email/contact_form_auto_reply.html b/app/locale/en_US/template/email/contact_form_auto_reply.html
index 0cc4b78b724..39f0da615ad 100644
--- a/app/locale/en_US/template/email/contact_form_auto_reply.html
+++ b/app/locale/en_US/template/email/contact_form_auto_reply.html
@@ -6,8 +6,6 @@
"var data.comment":"Comment"}
@-->
-Thank you for contacting us, we will reply you shortly.
-Have a nice day.
+Thank you for contacting us. We will reply you shortly.
-In case you received this message without using the contact form on our website, please ignore it.
-Thank you for your understanding.
\ No newline at end of file
+If you received this message without using the contact form on our website, please ignore it.