-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 1.0.8 release * 1.0.8 release - fixed incorrect versions * 1.0.8 release - fixed incorrect versions * 1.0.8 release - move patch into correct folder * 1.0.8 release - fixed incorrect versions * 1.0.8 release - fix a patch
- Loading branch information
Oleksandr Rykh
authored
Oct 27, 2020
1 parent
378c715
commit afe3bf7
Showing
12 changed files
with
1,248 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
patches/commerce/MDVA-29954__fixes_emails_were_sent_from_wrong_address__2.3.3.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
diff --git a/vendor/magento/module-company/Model/Email/Sender.php b/vendor/magento/module-company/Model/Email/Sender.php | ||
index fe31d20f8..18960965e 100644 | ||
--- a/vendor/magento/module-company/Model/Email/Sender.php | ||
+++ b/vendor/magento/module-company/Model/Email/Sender.php | ||
@@ -257,11 +257,6 @@ class Sender | ||
$mergedCustomerData = $this->customerData->getDataObjectByCustomer($customer, $companyId); | ||
|
||
if ($companySuperUser && $mergedCustomerData) { | ||
- $sender = [ | ||
- 'name' => $companySuperUser->getName(), | ||
- 'email' => $companySuperUser->getEmail() | ||
- ]; | ||
- | ||
$mergedCustomerData->setData('companyAdminEmail', $companySuperUser->getEmail()); | ||
$this->sendEmailTemplate( | ||
$customer->getEmail(), | ||
@@ -270,7 +265,7 @@ class Sender | ||
ScopeInterface::SCOPE_STORE, | ||
$customer->getStoreId() | ||
), | ||
- $sender, | ||
+ $this->xmlPathRegisterEmailIdentity, | ||
['customer' => $mergedCustomerData], | ||
$customer->getStoreId() | ||
); | ||
@@ -308,10 +303,7 @@ class Sender | ||
$recipient, | ||
$toName, | ||
$this->emailTemplateConfig->getCompanyCreateNotifyAdminTemplateId(), | ||
- [ | ||
- 'email' => $customer->getEmail(), | ||
- 'name' => $this->customerViewHelper->getCustomerName($customer) | ||
- ], | ||
+ $this->xmlPathRegisterEmailIdentity, | ||
[ | ||
'customer' => $customer->getFirstname(), | ||
'company' => $companyName, |
232 changes: 232 additions & 0 deletions
232
...ce/MDVA-31150__fixes_issue_when_store_credit_and_gift_card_are_not_return__2.3.5-p2.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,232 @@ | ||
diff --git a/vendor/magento/module-customer-balance/Model/Plugin/InvoiceRepository.php b/vendor/magento/module-customer-balance/Model/Plugin/InvoiceRepository.php | ||
index b88514d7f78..21a1c82ff0f 100644 | ||
--- a/vendor/magento/module-customer-balance/Model/Plugin/InvoiceRepository.php | ||
+++ b/vendor/magento/module-customer-balance/Model/Plugin/InvoiceRepository.php | ||
@@ -5,22 +5,29 @@ | ||
*/ | ||
namespace Magento\CustomerBalance\Model\Plugin; | ||
|
||
+use Magento\Sales\Api\Data\InvoiceExtension; | ||
+use Magento\Sales\Api\Data\InvoiceExtensionFactory; | ||
use Magento\Sales\Api\Data\InvoiceInterface; | ||
+use Magento\Sales\Api\Data\InvoiceSearchResultInterface; | ||
+use Magento\Sales\Api\InvoiceRepositoryInterface; | ||
|
||
+/** | ||
+ * Plugin for Invoice repository | ||
+ */ | ||
class InvoiceRepository | ||
{ | ||
/** | ||
- * @var \Magento\Sales\Api\Data\InvoiceExtensionFactory | ||
+ * @var InvoiceExtensionFactory | ||
*/ | ||
private $extensionFactory; | ||
|
||
/** | ||
* Init plugin | ||
* | ||
- * @param \Magento\Sales\Api\Data\InvoiceExtensionFactory $invoiceExtensionFactory | ||
+ * @param InvoiceExtensionFactory $invoiceExtensionFactory | ||
*/ | ||
public function __construct( | ||
- \Magento\Sales\Api\Data\InvoiceExtensionFactory $invoiceExtensionFactory | ||
+ InvoiceExtensionFactory $invoiceExtensionFactory | ||
) { | ||
$this->extensionFactory = $invoiceExtensionFactory; | ||
} | ||
@@ -28,16 +35,16 @@ class InvoiceRepository | ||
/** | ||
* Get invoice customer balance | ||
* | ||
- * @param \Magento\Sales\Api\InvoiceRepositoryInterface $subject | ||
- * @param \Magento\Sales\Api\Data\InvoiceInterface $resultEntity | ||
- * @return \Magento\Sales\Api\Data\InvoiceInterface | ||
+ * @param InvoiceRepositoryInterface $subject | ||
+ * @param InvoiceInterface $resultEntity | ||
+ * @return InvoiceInterface | ||
* @SuppressWarnings(PHPMD.UnusedFormalParameter) | ||
*/ | ||
public function afterGet( | ||
- \Magento\Sales\Api\InvoiceRepositoryInterface $subject, | ||
- \Magento\Sales\Api\Data\InvoiceInterface $resultEntity | ||
+ InvoiceRepositoryInterface $subject, | ||
+ InvoiceInterface $resultEntity | ||
) { | ||
- /** @var \Magento\Sales\Api\Data\InvoiceExtension $extensionAttributes */ | ||
+ /** @var InvoiceExtension $extensionAttributes */ | ||
$extensionAttributes = $resultEntity->getExtensionAttributes(); | ||
if ($extensionAttributes === null) { | ||
$extensionAttributes = $this->extensionFactory->create(); | ||
@@ -51,14 +58,16 @@ class InvoiceRepository | ||
} | ||
|
||
/** | ||
- * @param \Magento\Sales\Api\InvoiceRepositoryInterface $subject | ||
- * @param \Magento\Sales\Api\Data\InvoiceSearchResultInterface $resultInvoice | ||
- * @return \Magento\Sales\Api\Data\InvoiceSearchResultInterface | ||
+ * Add customer balance amount information to invoice list | ||
+ * | ||
+ * @param InvoiceRepositoryInterface $subject | ||
+ * @param InvoiceSearchResultInterface $resultInvoice | ||
+ * @return InvoiceSearchResultInterface | ||
* @SuppressWarnings(PHPMD.UnusedFormalParameter) | ||
*/ | ||
public function afterGetList( | ||
- \Magento\Sales\Api\InvoiceRepositoryInterface $subject, | ||
- \Magento\Sales\Api\Data\InvoiceSearchResultInterface $resultInvoice | ||
+ InvoiceRepositoryInterface $subject, | ||
+ InvoiceSearchResultInterface $resultInvoice | ||
) { | ||
/** @var InvoiceInterface $invoice */ | ||
foreach ($resultInvoice->getItems() as $invoice) { | ||
@@ -70,19 +79,25 @@ class InvoiceRepository | ||
/** | ||
* Add customer balance amount information to invoice | ||
* | ||
- * @param \Magento\Sales\Api\InvoiceRepositoryInterface $subject | ||
- * @param \Magento\Sales\Api\Data\InvoiceInterface $entity | ||
+ * @param InvoiceRepositoryInterface $subject | ||
+ * @param InvoiceInterface $entity | ||
* | ||
* @return void | ||
* @SuppressWarnings(PHPMD.UnusedFormalParameter) | ||
*/ | ||
public function beforeSave( | ||
- \Magento\Sales\Api\InvoiceRepositoryInterface $subject, | ||
- \Magento\Sales\Api\Data\InvoiceInterface $entity | ||
+ InvoiceRepositoryInterface $subject, | ||
+ InvoiceInterface $entity | ||
) { | ||
$extensionAttributes = $entity->getExtensionAttributes(); | ||
- if ($extensionAttributes) { | ||
+ if (!$extensionAttributes) { | ||
+ return; | ||
+ } | ||
+ | ||
+ if ($extensionAttributes->getCustomerBalanceAmount() !== null) { | ||
$entity->setCustomerBalanceAmount($extensionAttributes->getCustomerBalanceAmount()); | ||
+ } | ||
+ if ($extensionAttributes->getBaseCustomerBalanceAmount() !== null) { | ||
$entity->setBaseCustomerBalanceAmount($extensionAttributes->getBaseCustomerBalanceAmount()); | ||
} | ||
} | ||
diff --git a/vendor/magento/module-gift-card-account/Model/Plugin/InvoiceRepository.php b/vendor/magento/module-gift-card-account/Model/Plugin/InvoiceRepository.php | ||
index 8b9bb605033..ba681ffd49a 100644 | ||
--- a/vendor/magento/module-gift-card-account/Model/Plugin/InvoiceRepository.php | ||
+++ b/vendor/magento/module-gift-card-account/Model/Plugin/InvoiceRepository.php | ||
@@ -5,38 +5,44 @@ | ||
*/ | ||
namespace Magento\GiftCardAccount\Model\Plugin; | ||
|
||
+use Magento\Sales\Api\Data\InvoiceExtension; | ||
+use Magento\Sales\Api\Data\InvoiceExtensionFactory; | ||
+use Magento\Sales\Api\Data\InvoiceInterface; | ||
+use Magento\Sales\Api\Data\InvoiceSearchResultInterface; | ||
+use Magento\Sales\Api\InvoiceRepositoryInterface; | ||
+ | ||
/** | ||
* Plugin for Invoice repository. | ||
*/ | ||
class InvoiceRepository | ||
{ | ||
/** | ||
- * @var \Magento\Sales\Api\Data\InvoiceExtensionFactory | ||
+ * @var InvoiceExtensionFactory | ||
*/ | ||
private $extensionFactory; | ||
|
||
/** | ||
- * @param \Magento\Sales\Api\Data\InvoiceExtensionFactory $extensionFactory | ||
+ * @param InvoiceExtensionFactory $extensionFactory | ||
*/ | ||
public function __construct( | ||
- \Magento\Sales\Api\Data\InvoiceExtensionFactory $extensionFactory | ||
+ InvoiceExtensionFactory $extensionFactory | ||
) { | ||
$this->extensionFactory = $extensionFactory; | ||
} | ||
|
||
/** | ||
- * @param \Magento\Sales\Api\InvoiceRepositoryInterface $subject | ||
- * @param \Magento\Sales\Api\Data\InvoiceInterface $entity | ||
- * | ||
- * @return \Magento\Sales\Api\Data\InvoiceInterface | ||
+ * Sets gift card account data from extension attributes to Invoice models after get | ||
* | ||
+ * @param InvoiceRepositoryInterface $subject | ||
+ * @param InvoiceInterface $entity | ||
+ * @return InvoiceInterface | ||
* @SuppressWarnings(PHPMD.UnusedFormalParameter) | ||
*/ | ||
public function afterGet( | ||
- \Magento\Sales\Api\InvoiceRepositoryInterface $subject, | ||
- \Magento\Sales\Api\Data\InvoiceInterface $entity | ||
+ InvoiceRepositoryInterface $subject, | ||
+ InvoiceInterface $entity | ||
) { | ||
- /** @var \Magento\Sales\Api\Data\InvoiceExtension $extensionAttributes */ | ||
+ /** @var InvoiceExtension $extensionAttributes */ | ||
$extensionAttributes = $entity->getExtensionAttributes(); | ||
|
||
if ($extensionAttributes === null) { | ||
@@ -52,16 +58,17 @@ class InvoiceRepository | ||
} | ||
|
||
/** | ||
- * @param \Magento\Sales\Api\InvoiceRepositoryInterface $subject | ||
- * @param \Magento\Sales\Api\Data\InvoiceSearchResultInterface $entities | ||
+ * Sets gift card account data from extension attributes to Invoice models after get list | ||
* | ||
- * @return \Magento\Sales\Api\Data\InvoiceSearchResultInterface | ||
+ * @param InvoiceRepositoryInterface $subject | ||
+ * @param InvoiceSearchResultInterface $entities | ||
+ * @return InvoiceSearchResultInterface | ||
*/ | ||
public function afterGetList( | ||
- \Magento\Sales\Api\InvoiceRepositoryInterface $subject, | ||
- \Magento\Sales\Api\Data\InvoiceSearchResultInterface $entities | ||
+ InvoiceRepositoryInterface $subject, | ||
+ InvoiceSearchResultInterface $entities | ||
) { | ||
- /** @var \Magento\Sales\Api\Data\InvoiceInterface $entity */ | ||
+ /** @var InvoiceInterface $entity */ | ||
foreach ($entities->getItems() as $entity) { | ||
$this->afterGet($subject, $entity); | ||
} | ||
@@ -70,24 +77,26 @@ class InvoiceRepository | ||
} | ||
|
||
/** | ||
- * Sets gift card account data from extension attributes | ||
- * to Invoice model. | ||
- * | ||
- * @param \Magento\Sales\Api\InvoiceRepositoryInterface $subject | ||
- * @param \Magento\Sales\Api\Data\InvoiceInterface $entity | ||
+ * Sets gift card account data from extension attributes to Invoice model before save | ||
* | ||
+ * @param InvoiceRepositoryInterface $subject | ||
+ * @param InvoiceInterface $entity | ||
* @return void | ||
- * | ||
* @SuppressWarnings(PHPMD.UnusedFormalParameter) | ||
*/ | ||
public function beforeSave( | ||
- \Magento\Sales\Api\InvoiceRepositoryInterface $subject, | ||
- \Magento\Sales\Api\Data\InvoiceInterface $entity | ||
+ InvoiceRepositoryInterface $subject, | ||
+ InvoiceInterface $entity | ||
) { | ||
$extensionAttributes = $entity->getExtensionAttributes(); | ||
+ if (!$extensionAttributes) { | ||
+ return; | ||
+ } | ||
|
||
- if ($extensionAttributes) { | ||
+ if ($extensionAttributes->getGiftCardsAmount() !== null) { | ||
$entity->setGiftCardsAmount($extensionAttributes->getGiftCardsAmount()); | ||
+ } | ||
+ if ($extensionAttributes->getBaseGiftCardsAmount() !== null) { | ||
$entity->setBaseGiftCardsAmount($extensionAttributes->getBaseGiftCardsAmount()); | ||
} | ||
} |
Oops, something went wrong.