Skip to content

Commit d35978b

Browse files
author
Oleksandr Rykh
authored
1.0.2 release (#28)
Merging PR#28 - 1.0.2 Release
1 parent eee66fe commit d35978b

9 files changed

+657
-1
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "magento/quality-patches",
33
"description": "Provides quality patches for Magento 2",
44
"type": "magento2-component",
5-
"version": "1.0.1",
5+
"version": "1.0.2",
66
"license": "proprietary",
77
"repositories": {
88
"repo": {

patches.json

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,69 @@
2121
}
2222
}
2323
},
24+
"MDVA-30052": {
25+
"magento/magento2-base": {
26+
"Customer data section invalidation logic has been improved. This release introduces a new way of invalidating all customer sections data that avoids a known issue with local storage when custom `sections.xml` invalidations are active. (Previously, private content (local storage) was not correctly populated when you had a custom *etc/frontend/sections.xml* with action invalidations).": {
27+
">=2.3.2-p2 <2.3.5": {
28+
"file": "os/MDVA-30052__customer_data_section_invalidation_logic_improvement__2.3.4-p2.patch"
29+
}
30+
}
31+
}
32+
},
33+
"MDVA-26694": {
34+
"magento/magento2-base": {
35+
"Product and catalog caches will expire as scheduled. Previously, caches expire daily, as сron runs the 'catalogrule_apply_all' task once a day which re-indexes all the catalog rules and its dependent indexers and clears the cache for all products and categories.": {
36+
">=2.3.0 <=2.3.5-p2 || 2.4.0": {
37+
"file": "os/MDVA-26694__fix_product_and_catalog_cache_expiration_daily__2.3.1.patch"
38+
}
39+
}
40+
}
41+
},
42+
"MDVA-30131": {
43+
"magento/magento2-base": {
44+
"Code was not storing false values for custom attributes in Elastic Search, so filter was possible using 'No' for boolean attributes using layered navigation. To address that, some boolean checks have been replaces for null checks, and an array_filter call has been erased completely as no callback function was provided in it, thus always returning false as 'all entries of array equal to FALSE (see converting to boolean) will be removed'.": {
45+
">=2.3.4 <=2.3.5-p2 || 2.4.0": {
46+
"file": "os/MDVA-30131__fix_storing_boolean_values_for_custom_attributes_in_Elastic_Search__2.3.4.patch"
47+
}
48+
}
49+
}
50+
},
51+
"MDVA-27825": {
52+
"magento/magento2-base": {
53+
"Big data customer export issue. Memory leak prevented by adding clearing of Customer objects in \\Magento\\Framework\\Model\\ResourceModel\\Db\\VersionControl\\Snapshot class": {
54+
">=2.3.0 <=2.3.5-p2 || 2.4.0": {
55+
"file": "os/MDVA-27825__fix_memory_leak_prevent_customer_export__2.3.3.patch"
56+
}
57+
}
58+
}
59+
},
60+
"MDVA-29085": {
61+
"magento/magento2-b2b-base": {
62+
"After the company has been created through the API, the intended plugin will check if the company is created and dispatch the two emails accordingly.": {
63+
">=2.3.0 <=2.3.5-p1": {
64+
"file": "commerce/MDVA-29085__fix_email_confirmation_after_company_created_via_API__2.3.5-p1.patch"
65+
}
66+
}
67+
}
68+
},
69+
"MDVA-29835": {
70+
"magento/magento2-ee-base": {
71+
"Issue fixed: Two gift card codes can be seen for the order.\nRoot Cause: cron jobs called \\Magento\\GiftCard\\Observer\\GenerateGiftCardAccountsInvoice::execute() and this method did not check if giftcard codes already were generated during invoice creation.": {
72+
">2.3.1 <=2.3.5-p2 || 2.4.0": {
73+
"file": "commerce/MDVA-29835__two_gift_card_codes_can_be_seen_for_the_order__2.3.4-p2.patch"
74+
}
75+
}
76+
}
77+
},
78+
"MDVA-29344": {
79+
"magento/module-page-builder": {
80+
"Page builder hangs after copying text from a header element to a text element.": {
81+
">=2.3.5 <=2.3.5-p2 || 2.4.0": {
82+
"file": "commerce/MDVA-29344__fix_page_builder_hangs_after_text_copying__2.3.5-p1.patch"
83+
}
84+
}
85+
}
86+
},
2487
"MC-35514": {
2588
"magento/magento2-base": {
2689
"Fixes issue with creating a shipping label and adding ordered products to a package in the Create Packages modal window.": {
Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
diff --git a/vendor/magento/module-company/Plugin/Company/Model/EmailNotification.php b/vendor/magento/module-company/Plugin/Company/Model/EmailNotification.php
2+
new file mode 100644
3+
index 000000000..55dc2458d
4+
--- /dev/null
5+
+++ b/vendor/magento/module-company/Plugin/Company/Model/EmailNotification.php
6+
@@ -0,0 +1,90 @@
7+
+<?php
8+
+/**
9+
+ * Copyright © Magento, Inc. All rights reserved.
10+
+ * See COPYING.txt for license details.
11+
+ */
12+
+declare(strict_types=1);
13+
+
14+
+namespace Magento\Company\Plugin\Company\Model;
15+
+
16+
+use Magento\Backend\Model\UrlInterface;
17+
+use Magento\Company\Api\Data\CompanyInterface;
18+
+use Magento\Company\Model\Company\Save;
19+
+use Magento\Company\Model\Email\Sender;
20+
+use Magento\Customer\Api\CustomerRepositoryInterface;
21+
+use Magento\Framework\Exception\LocalizedException;
22+
+use Magento\Framework\Exception\NoSuchEntityException;
23+
+
24+
+/**
25+
+ * Class EmailNotification
26+
+ *
27+
+ * Email notification plugin notify customer withe emails
28+
+ * after create company account through API
29+
+ */
30+
+class EmailNotification
31+
+{
32+
+ /**
33+
+ * @var Sender
34+
+ */
35+
+ private $companyEmailSender;
36+
+
37+
+ /**
38+
+ * @var UrlInterface
39+
+ */
40+
+ private $urlBuilder;
41+
+
42+
+ /**
43+
+ * @var CustomerRepositoryInterface
44+
+ */
45+
+ private $customerRepository;
46+
+
47+
+ /**
48+
+ * EmailNotification constructor
49+
+ *
50+
+ * @param Sender $companyEmailSender
51+
+ * @param UrlInterface $urlBuilder
52+
+ * @param CustomerRepositoryInterface $customerRepository
53+
+ */
54+
+ public function __construct(
55+
+ Sender $companyEmailSender,
56+
+ UrlInterface $urlBuilder,
57+
+ CustomerRepositoryInterface $customerRepository
58+
+ ) {
59+
+ $this->companyEmailSender = $companyEmailSender;
60+
+ $this->urlBuilder = $urlBuilder;
61+
+ $this->customerRepository = $customerRepository;
62+
+ }
63+
+
64+
+ /**
65+
+ * Notifying customer after creating company account through API
66+
+ *
67+
+ * @param Save $subject
68+
+ * @param CompanyInterface $company
69+
+ * @return CompanyInterface
70+
+ * @throws LocalizedException
71+
+ * @throws NoSuchEntityException
72+
+ * @SuppressWarnings(PHPMD.UnusedFormalParameter)
73+
+ */
74+
+ public function afterSave(
75+
+ Save $subject,
76+
+ CompanyInterface $company
77+
+ ): CompanyInterface {
78+
+ if ($company) {
79+
+ $customerData = $this->customerRepository
80+
+ ->getById(
81+
+ $company->getSuperUserId()
82+
+ );
83+
+ $companyUrl = $this->urlBuilder
84+
+ ->getUrl(
85+
+ 'company/index/edit',
86+
+ ['id' => $company->getEntityId()]
87+
+ );
88+
+ $this->companyEmailSender->sendAdminNotificationEmail(
89+
+ $customerData,
90+
+ $company->getCompanyName(),
91+
+ $companyUrl
92+
+ );
93+
+ }
94+
+ return $company;
95+
+ }
96+
+}
97+
diff --git a/vendor/magento/module-company/etc/webapi_rest/di.xml b/vendor/magento/module-company/etc/webapi_rest/di.xml
98+
index 0d79ebcde..4880eed90 100644
99+
--- a/vendor/magento/module-company/etc/webapi_rest/di.xml
100+
+++ b/vendor/magento/module-company/etc/webapi_rest/di.xml
101+
@@ -12,4 +12,7 @@
102+
<type name="Magento\Quote\Api\CartManagementInterface">
103+
<plugin name="company_blocked_validate" type="Magento\Company\Plugin\Quote\Api\CartManagementInterfacePlugin" />
104+
</type>
105+
+ <type name="Magento\Company\Model\Company\Save">
106+
+ <plugin name="notify_email_after_save" type="Magento\Company\Plugin\Company\Model\EmailNotification" />
107+
+ </type>
108+
</config>
109+
diff --git a/vendor/magento/module-company/etc/webapi_soap/di.xml b/vendor/magento/module-company/etc/webapi_soap/di.xml
110+
new file mode 100644
111+
index 000000000..8d84cb1c2
112+
--- /dev/null
113+
+++ b/vendor/magento/module-company/etc/webapi_soap/di.xml
114+
@@ -0,0 +1,12 @@
115+
+<?xml version="1.0"?>
116+
+<!--
117+
+/**
118+
+ * Copyright © Magento, Inc. All rights reserved.
119+
+ * See COPYING.txt for license details.
120+
+ */
121+
+-->
122+
+<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
123+
+ <type name="Magento\Company\Model\Company\Save">
124+
+ <plugin name="notify_email_after_save" type="Magento\Company\Plugin\Company\Model\EmailNotification" />
125+
+ </type>
126+
+</config>
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
diff --git a/vendor/magento/module-page-builder/view/adminhtml/web/js/content-type/text/preview.js b/vendor/magento/module-page-builder/view/adminhtml/web/js/content-type/text/preview.js
2+
index 35264feb4..8f8cd6542 100644
3+
--- a/vendor/magento/module-page-builder/view/adminhtml/web/js/content-type/text/preview.js
4+
+++ b/vendor/magento/module-page-builder/view/adminhtml/web/js/content-type/text/preview.js
5+
@@ -136,6 +136,8 @@ define(["jquery", "Magento_PageBuilder/js/events", "underscore", "Magento_PageBu
6+
7+
var wysiwygConfig = this.config.additional_data.wysiwygConfig.wysiwygConfigData;
8+
9+
+ wysiwygConfig.adapter.settings.paste_as_text = true;
10+
+
11+
if (focus) {
12+
wysiwygConfig.adapter.settings.auto_focus = this.element.id;
13+
14+
diff --git a/vendor/magento/module-page-builder/view/adminhtml/web/ts/js/content-type/text/preview.ts b/vendor/magento/module-page-builder/view/adminhtml/web/ts/js/content-type/text/preview.ts
15+
index 6c33f1e3e..245020af0 100644
16+
--- a/vendor/magento/module-page-builder/view/adminhtml/web/ts/js/content-type/text/preview.ts
17+
+++ b/vendor/magento/module-page-builder/view/adminhtml/web/ts/js/content-type/text/preview.ts
18+
@@ -149,6 +149,8 @@ export default class Preview extends BasePreview {
19+
20+
const wysiwygConfig = this.config.additional_data.wysiwygConfig.wysiwygConfigData;
21+
22+
+ wysiwygConfig.adapter.settings.paste_as_text = true;
23+
+
24+
if (focus) {
25+
wysiwygConfig.adapter.settings.auto_focus = this.element.id;
26+
wysiwygConfig.adapter.settings.init_instance_callback = () => {
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
diff --git a/vendor/magento/module-gift-card/Observer/GenerateGiftCardAccountsInvoice.php b/vendor/magento/module-gift-card/Observer/GenerateGiftCardAccountsInvoice.php
2+
index 76d02836a5b..3322e3e6065 100644
3+
--- a/vendor/magento/module-gift-card/Observer/GenerateGiftCardAccountsInvoice.php
4+
+++ b/vendor/magento/module-gift-card/Observer/GenerateGiftCardAccountsInvoice.php
5+
@@ -19,6 +19,7 @@ use Magento\Sales\Api\Data\OrderItemInterface;
6+
use Magento\Sales\Model\Order\Invoice;
7+
use Magento\Sales\Model\Order\Item;
8+
use Magento\Store\Model\ScopeInterface;
9+
+use Magento\Sales\Model\Order;
10+
11+
/**
12+
* Gift cards generator observer called on invoice after save
13+
@@ -66,7 +67,7 @@ class GenerateGiftCardAccountsInvoice implements ObserverInterface
14+
$event = $observer->getEvent();
15+
/** @var Invoice $invoice */
16+
$invoice = $event->getInvoice();
17+
- /** @var \Magento\Sales\Model\Order $order */
18+
+ /** @var Order $order */
19+
$order = $invoice->getOrder();
20+
$orderPaid = false;
21+
22+
@@ -84,25 +85,40 @@ class GenerateGiftCardAccountsInvoice implements ObserverInterface
23+
$orderPaid = true;
24+
}
25+
26+
- /** @var Item $orderItem */
27+
- foreach ($order->getAllItems() as $orderItem) {
28+
- if ($orderItem->getProductType() !== ProductGiftCard::TYPE_GIFTCARD) {
29+
- continue;
30+
- }
31+
-
32+
+ /** @var Item $giftCardItem */
33+
+ foreach ($this->getGiftCardOrderItems($order) as $giftCardItem) {
34+
if ($orderPaid) {
35+
- $qty = (int)$orderItem->getQtyInvoiced();
36+
+ $qty = (int)$giftCardItem->getQtyInvoiced();
37+
} else {
38+
- $qty = $this->getInvoicedOrderItemQty($invoice, $orderItem);
39+
+ $qty = $this->getInvoicedOrderItemQty($invoice, $giftCardItem);
40+
}
41+
42+
- $options = $orderItem->getProductOptions();
43+
- if ($qty > 0) {
44+
- $options['giftcard_paid_invoice_items'][] = $orderItem->getItemId();
45+
+ $options = $giftCardItem->getProductOptions();
46+
+ $qtyGiftcardCodes = isset($options['giftcard_created_codes'])
47+
+ ? count($options['giftcard_created_codes'])
48+
+ : 0;
49+
+ if ($qtyGiftcardCodes < (int)$giftCardItem->getQtyInvoiced()) {
50+
+ $options['giftcard_paid_invoice_items'][] = $giftCardItem->getItemId();
51+
+ $this->accountGenerator->generate($giftCardItem, $qty, $options);
52+
}
53+
+ }
54+
+ }
55+
56+
- $this->accountGenerator->generate($orderItem, $qty, $options);
57+
+ /**
58+
+ * Return only gift card items from order
59+
+ *
60+
+ * @param Order $order
61+
+ * @return array
62+
+ */
63+
+ private function getGiftCardOrderItems(Order $order): array
64+
+ {
65+
+ $items = [];
66+
+ foreach ($order->getAllItems() as $orderItem) {
67+
+ if ($orderItem->getProductType() === ProductGiftCard::TYPE_GIFTCARD) {
68+
+ $items[] = $orderItem;
69+
+ }
70+
}
71+
+ return $items;
72+
}
73+
74+
/**

0 commit comments

Comments
 (0)