From 09b2b775a4d2f483276d4c9bee54ad8f7dd79eef Mon Sep 17 00:00:00 2001 From: nghiatt Date: Wed, 21 Feb 2024 16:00:01 +0700 Subject: [PATCH 1/3] fix: Compatible m2.4.6-p3 --- Mail/Rse/Mail.php | 16 ++++++---------- Mail/Transport.php | 2 +- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/Mail/Rse/Mail.php b/Mail/Rse/Mail.php index 8110bf7..5f01a12 100644 --- a/Mail/Rse/Mail.php +++ b/Mail/Rse/Mail.php @@ -22,11 +22,10 @@ namespace Mageplaza\Smtp\Mail\Rse; use Mageplaza\Smtp\Helper\Data; -use Zend\Mail\Message; -use Zend\Mail\Transport\Smtp; -use Zend\Mail\Transport\SmtpOptions; +use Laminas\Mail\Message; +use Laminas\Mail\Transport\Smtp; +use Laminas\Mail\Transport\SmtpOptions; use Zend_Exception; -use Zend_Mail_Transport_Smtp; /** * Class Mail @@ -70,7 +69,7 @@ class Mail protected $_returnPath = []; /** - * @var Zend_Mail_Transport_Smtp + * @var Smtp */ protected $_transport; @@ -122,7 +121,7 @@ public function setSmtpOptions($storeId, $options = []) /** * @param $storeId * - * @return Zend_Mail_Transport_Smtp | Smtp + * @return Smtp * @throws Zend_Exception */ public function getTransport($storeId) @@ -174,10 +173,7 @@ public function getTransport($storeId) $this->_transport = new Smtp($options); } else { - $this->_transport = new Zend_Mail_Transport_Smtp( - $this->_smtpOptions[$storeId]['host'], - $this->_smtpOptions[$storeId] - ); + $this->_transport = new Smtp(); } } diff --git a/Mail/Transport.php b/Mail/Transport.php index afd1048..e3a8761 100644 --- a/Mail/Transport.php +++ b/Mail/Transport.php @@ -34,7 +34,7 @@ use Mageplaza\Smtp\Model\LogFactory; use Psr\Log\LoggerInterface; use ReflectionClass; -use Zend\Mail\Message; +use Laminas\Mail\Message; use Zend_Exception; /** From 3627945c13ee8f4fbdce82ad34386a93b7f02884 Mon Sep 17 00:00:00 2001 From: nghiatt Date: Thu, 22 Feb 2024 09:46:37 +0700 Subject: [PATCH 2/3] fix: fix eqp --- view/adminhtml/templates/marketing.phtml | 2 +- .../templates/system/config/button.phtml | 2 +- view/adminhtml/templates/view.phtml | 22 +++++++++---------- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/view/adminhtml/templates/marketing.phtml b/view/adminhtml/templates/marketing.phtml index b5683a7..86b8e1d 100644 --- a/view/adminhtml/templates/marketing.phtml +++ b/view/adminhtml/templates/marketing.phtml @@ -37,4 +37,4 @@ switch ($type) { return; } ?> - + diff --git a/view/adminhtml/templates/system/config/button.phtml b/view/adminhtml/templates/system/config/button.phtml index b2ad6ff..e1ad829 100644 --- a/view/adminhtml/templates/system/config/button.phtml +++ b/view/adminhtml/templates/system/config/button.phtml @@ -30,7 +30,7 @@ { "#smtp_configuration_option_test_email_to": { "mageplaza/testemail": { - "ajaxUrl": "getButtonUrl() ?>" + "ajaxUrl": "getButtonUrl() ?>" } } } diff --git a/view/adminhtml/templates/view.phtml b/view/adminhtml/templates/view.phtml index 36e168b..e25c33f 100644 --- a/view/adminhtml/templates/view.phtml +++ b/view/adminhtml/templates/view.phtml @@ -111,7 +111,7 @@ $sendUrl = $block->getUrl('adminhtml/smtp_abandonedcart/send', ['id' => $quote-> ?>
@@ -124,16 +124,16 @@ $sendUrl = $block->getUrl('adminhtml/smtp_abandonedcart/send', ['id' => $quote-> ?>
-
+
-
+
@@ -165,7 +165,7 @@ $sendUrl = $block->getUrl('adminhtml/smtp_abandonedcart/send', ['id' => $quote->
- getFormattedAddress($quote->getShippingAddress(), $quote->getStoreId()) ?> + getFormattedAddress($quote->getShippingAddress(), $quote->getStoreId()) ?>
@@ -178,7 +178,7 @@ $sendUrl = $block->getUrl('adminhtml/smtp_abandonedcart/send', ['id' => $quote->
- getFormattedAddress($quote->getBillingAddress(), $quote->getStoreId()) ?> + getFormattedAddress($quote->getBillingAddress(), $quote->getStoreId()) ?>
@@ -292,7 +292,7 @@ $sendUrl = $block->getUrl('adminhtml/smtp_abandonedcart/send', ['id' => $quote->