Skip to content

Commit 65b2eac

Browse files
authored
1.1.60 Release (#187)
1 parent bde667f commit 65b2eac

14 files changed

+1451
-2
lines changed

composer.json

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

patches-info.json

+1-1
Large diffs are not rendered by default.
+290
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,290 @@
1+
diff --git a/vendor/magento/module-visual-merchandiser/Model/Product/DataProvider.php b/vendor/magento/module-visual-merchandiser/Model/Product/DataProvider.php
2+
index 579db812bb5a..9b55ed9553ea 100755
3+
--- a/vendor/magento/module-visual-merchandiser/Model/Product/DataProvider.php
4+
+++ b/vendor/magento/module-visual-merchandiser/Model/Product/DataProvider.php
5+
@@ -1,7 +1,21 @@
6+
<?php
7+
-/**
8+
- * Copyright © Magento, Inc. All rights reserved.
9+
- * See COPYING.txt for license details.
10+
+/************************************************************************
11+
+ *
12+
+ * ADOBE CONFIDENTIAL
13+
+ * ___________________
14+
+ *
15+
+ * Copyright 2015 Adobe
16+
+ * All Rights Reserved.
17+
+ *
18+
+ * NOTICE: All information contained herein is, and remains
19+
+ * the property of Adobe and its suppliers, if any. The intellectual
20+
+ * and technical concepts contained herein are proprietary to Adobe
21+
+ * and its suppliers and are protected by all applicable intellectual
22+
+ * property laws, including trade secret and copyright laws.
23+
+ * Dissemination of this information or reproduction of this material
24+
+ * is strictly forbidden unless prior written permission is obtained
25+
+ * from Adobe.
26+
+ * ************************************************************************
27+
*/
28+
namespace Magento\VisualMerchandiser\Model\Product;
29+
30+
@@ -198,6 +212,7 @@ public function getData()
31+
$positions = $this->cache->getPositions($this->positionCacheKey);
32+
$categoryId = $this->request->getParam('category_id');
33+
$arrItems = [];
34+
+ $arrItems['totalRecords'] = $this->collection->getSize();
35+
$arrItems['items'] = [];
36+
if ($positions === false && $categoryId !== null) {
37+
$arrItems['selectedData'] = $this->positionResolver->getPositions((int) $categoryId);
38+
diff --git a/vendor/magento/module-visual-merchandiser/view/adminhtml/web/js/add_products.js b/vendor/magento/module-visual-merchandiser/view/adminhtml/web/js/add_products.js
39+
index f840a4d8cfae..4169c094f68a 100644
40+
--- a/vendor/magento/module-visual-merchandiser/view/adminhtml/web/js/add_products.js
41+
+++ b/vendor/magento/module-visual-merchandiser/view/adminhtml/web/js/add_products.js
42+
@@ -1,6 +1,20 @@
43+
-/**
44+
- * Copyright © Magento, Inc. All rights reserved.
45+
- * See COPYING.txt for license details.
46+
+/************************************************************************
47+
+ *
48+
+ * ADOBE CONFIDENTIAL
49+
+ * ___________________
50+
+ *
51+
+ * Copyright 2015 Adobe
52+
+ * All Rights Reserved.
53+
+ *
54+
+ * NOTICE: All information contained herein is, and remains
55+
+ * the property of Adobe and its suppliers, if any. The intellectual
56+
+ * and technical concepts contained herein are proprietary to Adobe
57+
+ * and its suppliers and are protected by all applicable intellectual
58+
+ * property laws, including trade secret and copyright laws.
59+
+ * Dissemination of this information or reproduction of this material
60+
+ * is strictly forbidden unless prior written permission is obtained
61+
+ * from Adobe.
62+
+ * ************************************************************************
63+
*/
64+
65+
/*global setLocation:true*/
66+
@@ -224,16 +238,87 @@ define([
67+
* @private
68+
*/
69+
_save: function () {
70+
- var idColumn = this
71+
+ const idColumn = this
72+
.registry
73+
.get('merchandiser_product_listing.merchandiser_product_listing.merchandiser_product_columns.ids');
74+
75+
this._invalidateCache();
76+
+ this._saveAll(idColumn)
77+
+ .then((selected) => {
78+
+ this._trigger('dialogSave', null, [selected, this]);
79+
+ })
80+
+ .catch((error) => {
81+
+ console.error('Error saving data:', error);
82+
+ });
83+
+ },
84+
+
85+
+ /**
86+
+ * @private
87+
+ */
88+
+ _saveAll: async function (idColumn) {
89+
+ let selected = idColumn.selected();
90+
+
91+
+ // Proceed if all items are selected or if exclusions are in play
92+
+ if (idColumn.allSelected() || idColumn.excludeMode()) {
93+
+ const vmGrid = this
94+
+ .registry
95+
+ .get('merchandiser_product_listing.merchandiser_product_listing_data_source'),
96+
+ { paging, namespace, search, keywordUpdated, filters } = vmGrid.params,
97+
+ currentPageSize = paging.pageSize,
98+
+ totalRecords = idColumn.totalRecords(),
99+
+ excludedIds = idColumn.excluded() || [];
100+
+
101+
+ // If page size is less than total records, adjust the page size temporarily
102+
+ if (currentPageSize >= totalRecords) {
103+
+ return selected;
104+
+ }
105+
+
106+
+ paging.pageSize = totalRecords;
107+
+
108+
+ try {
109+
+ const response = await $.ajax({
110+
+ type: 'GET',
111+
+ url: vmGrid.update_url,
112+
+ dataType: 'json',
113+
+ showLoader: true,
114+
+ data: { namespace, search, keywordUpdated, filters, paging }
115+
+ });
116+
+
117+
+ // Filter and reorder selected based on exclusion IDs
118+
+ selected = this._reorderArrayBasedOnGivenOrder(
119+
+ selected,
120+
+ response.allIds.filter(id => !excludedIds.includes(id))
121+
+ );
122+
+
123+
+ } catch (error) {
124+
+ console.error('Error fetching data for saving:', error);
125+
+ selected = [];
126+
+ }
127+
+
128+
+ // Restore the original page size if it was changed
129+
+ if (currentPageSize < totalRecords) {
130+
+ paging.pageSize = currentPageSize;
131+
+ }
132+
+ }
133+
+
134+
+ return selected;
135+
+ },
136+
+
137+
+ /**
138+
+ * @private
139+
+ */
140+
+ _reorderArrayBasedOnGivenOrder: function (selectedIds, allIds) {
141+
+ const selectedSet = new Set(selectedIds),
142+
+ sortedSelections = [...selectedIds];
143+
+
144+
+ // Filter out items in givenArray from evaluatedArray and preserve order
145+
+ for (let item of allIds) {
146+
+ if (!selectedSet.has(item)) {
147+
+ sortedSelections.push(item);
148+
+ }
149+
+ }
150+
151+
- this._trigger('dialogSave', null, [
152+
- idColumn.selected(),
153+
- this
154+
- ]);
155+
+ return sortedSelections;
156+
}
157+
});
158+
159+
diff --git a/vendor/magento/module-visual-merchandiser/view/adminhtml/web/js/grid/columns/onoff.js b/vendor/magento/module-visual-merchandiser/view/adminhtml/web/js/grid/columns/onoff.js
160+
index 9e46181c97ca..764c8357a692 100644
161+
--- a/vendor/magento/module-visual-merchandiser/view/adminhtml/web/js/grid/columns/onoff.js
162+
+++ b/vendor/magento/module-visual-merchandiser/view/adminhtml/web/js/grid/columns/onoff.js
163+
@@ -1,7 +1,22 @@
164+
-/**
165+
- * Copyright © Magento, Inc. All rights reserved.
166+
- * See COPYING.txt for license details.
167+
+/************************************************************************
168+
+ *
169+
+ * ADOBE CONFIDENTIAL
170+
+ * ___________________
171+
+ *
172+
+ * Copyright 2016 Adobe
173+
+ * All Rights Reserved.
174+
+ *
175+
+ * NOTICE: All information contained herein is, and remains
176+
+ * the property of Adobe and its suppliers, if any. The intellectual
177+
+ * and technical concepts contained herein are proprietary to Adobe
178+
+ * and its suppliers and are protected by all applicable intellectual
179+
+ * property laws, including trade secret and copyright laws.
180+
+ * Dissemination of this information or reproduction of this material
181+
+ * is strictly forbidden unless prior written permission is obtained
182+
+ * from Adobe.
183+
+ * ************************************************************************
184+
*/
185+
+
186+
define([
187+
'underscore',
188+
'mage/translate',
189+
@@ -26,7 +41,9 @@ define([
190+
},
191+
listens: {
192+
'${ $.provider }:reloaded': 'setDefaultSelections'
193+
- }
194+
+ },
195+
+ isInSelectAll: false,
196+
+ preventReset: false
197+
},
198+
199+
/**
200+
@@ -104,13 +121,13 @@ define([
201+
var relevant = true;
202+
203+
switch (actionId) {
204+
- case 'selectPage':
205+
- relevant = !this.isPageSelected(true);
206+
- break;
207+
+ case 'selectPage':
208+
+ relevant = !this.isPageSelected(true);
209+
+ break;
210+
211+
- case 'deselectPage':
212+
- relevant = this.isPageSelected();
213+
- break;
214+
+ case 'deselectPage':
215+
+ relevant = this.isPageSelected();
216+
+ break;
217+
}
218+
219+
return relevant;
220+
@@ -123,55 +140,37 @@ define([
221+
* @returns {Object} Chainable.
222+
*/
223+
updateState: function () {
224+
- var positionCacheValid = registry.get('position_cache_valid'),
225+
- totalRecords = this.totalRecords(),
226+
- totalSelected = this.totalSelected(),
227+
+ const positionCacheValid = registry.get('position_cache_valid'),
228+
+ filtering = this.getFiltering();
229+
+ let totalRecords = this.totalRecords(),
230+
+ totalSelected = this.totalSelected(),
231+
+ selected = this.selected(),
232+
allSelected;
233+
234+
- if (positionCacheValid && this.selected().length > 0) {
235+
+ if (positionCacheValid && (!this.preventReset || this.preventReset && selected.length > 0)) {
236+
+ this.preventReset = false;
237+
registry.set('position_cache_valid', true);
238+
- registry.set('selected_cache', JSON.stringify(this.selected()));
239+
+ registry.set('selected_cache', JSON.stringify(selected));
240+
}
241+
242+
// When filters are enabled then totalRecords is unknown
243+
- if (this.getFiltering()) {
244+
- if (this.getFiltering().search !== '') {
245+
- totalRecords = -1;
246+
- }
247+
+ if (filtering?.search || Object.keys(filtering?.filters || {}).length > 1) {
248+
+ totalRecords = -1;
249+
}
250+
251+
allSelected = totalRecords && totalSelected === totalRecords;
252+
-
253+
this.allSelected(allSelected);
254+
- this.indetermine(totalSelected && !allSelected);
255+
+ this.indetermine(totalSelected > 0 && !allSelected);
256+
257+
return this;
258+
},
259+
260+
/**
261+
- * Selects all records, even those that
262+
- * are not visible on the page.
263+
- *
264+
- * @returns {Object} Chainable.
265+
+ * Is invoked when filtration is applied or removed
266+
*/
267+
- selectAll: function () {
268+
- var newSelected = [],
269+
- $selected = $H(),
270+
- i;
271+
-
272+
- for (i = 0; i < this.selected().length; i++) {
273+
- $selected.set(this.selected()[i], i);
274+
- }
275+
-
276+
- for (i = 0; i < this.allIds.length; i++) {
277+
- if ($selected.get(this.allIds[i]) === undefined) {
278+
- newSelected.push(this.allIds[i]);
279+
- }
280+
- }
281+
-
282+
- this.selected(this.selected().concat(newSelected));
283+
-
284+
- return this;
285+
+ onFilter: function () {
286+
+ this.preventReset = true;
287+
+ this._super();
288+
}
289+
});
290+
});
+70
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
diff --git a/vendor/magento/module-multicoupon-ui/Observer/ResetShippingDataObserver.php b/vendor/magento/module-multicoupon-ui/Observer/ResetShippingDataObserver.php
2+
new file mode 100644
3+
index 000000000000..eb93c2e7965a
4+
--- /dev/null
5+
+++ b/vendor/magento/module-multicoupon-ui/Observer/ResetShippingDataObserver.php
6+
@@ -0,0 +1,46 @@
7+
+<?php
8+
+/**
9+
+ * Copyright 2025 Adobe
10+
+ * All Rights Reserved.
11+
+ */
12+
+declare(strict_types=1);
13+
+
14+
+namespace Magento\MulticouponUi\Observer;
15+
+
16+
+use Magento\Framework\Event\Observer;
17+
+use Magento\Multicoupon\Model\Config\Config;
18+
+use Magento\Framework\Event\ObserverInterface;
19+
+
20+
+/**
21+
+ * Class for resetting shipping method for multi coupons.
22+
+ */
23+
+class ResetShippingDataObserver implements ObserverInterface
24+
+{
25+
+ /**
26+
+ * @param Config $multiCouponConfig
27+
+ */
28+
+ public function __construct(private readonly Config $multiCouponConfig)
29+
+ {
30+
+ }
31+
+
32+
+ /**
33+
+ * Check if config have multi coupons enabled and reset the shipping method if needed.
34+
+ *
35+
+ * @param Observer $observer
36+
+ * @return $this
37+
+ */
38+
+ public function execute(Observer $observer)
39+
+ {
40+
+ $request = $observer->getEvent()->getRequest();
41+
+ if (array_key_exists('order', $request)) {
42+
+ $isResetShippingFlag = array_key_exists('reset_shipping', $request)
43+
+ && (bool) $request['reset_shipping'];
44+
+ $noOfCouponsAvailable = $this->multiCouponConfig->getMaximumNumberOfCoupons();
45+
+ if ($noOfCouponsAvailable > 1 && $isResetShippingFlag) {
46+
+ $observer->getEvent()->getOrderCreateModel()
47+
+ ->resetShippingMethod(true);
48+
+ }
49+
+ }
50+
+ return $this;
51+
+ }
52+
+}
53+
diff --git a/vendor/magento/module-multicoupon-ui/etc/adminhtml/events.xml b/vendor/magento/module-multicoupon-ui/etc/adminhtml/events.xml
54+
new file mode 100644
55+
index 000000000000..e6ddfb92ad0d
56+
--- /dev/null
57+
+++ b/vendor/magento/module-multicoupon-ui/etc/adminhtml/events.xml
58+
@@ -0,0 +1,12 @@
59+
+<?xml version="1.0"?>
60+
+<!--
61+
+/**
62+
+ * Copyright 2025 Adobe
63+
+ * All rights reserved.
64+
+ */
65+
+-->
66+
+<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
67+
+ <event name="adminhtml_sales_order_create_process_data">
68+
+ <observer name="magento_multi_coupon_shipping_method" instance="Magento\MulticouponUi\Observer\ResetShippingDataObserver"/>
69+
+ </event>
70+
+</config>

patches/os/ACSD-63992_1.2.7-p3.patch

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
diff --git a/vendor/magento/module-inventory-in-store-pickup-sales-admin-ui/view/adminhtml/web/order/create/scripts-mixin.js b/vendor/magento/module-inventory-in-store-pickup-sales-admin-ui/view/adminhtml/web/order/create/scripts-mixin.js
2+
index 600198b0404e..5eb2a0add041 100644
3+
--- a/vendor/magento/module-inventory-in-store-pickup-sales-admin-ui/view/adminhtml/web/order/create/scripts-mixin.js
4+
+++ b/vendor/magento/module-inventory-in-store-pickup-sales-admin-ui/view/adminhtml/web/order/create/scripts-mixin.js
5+
@@ -74,6 +74,7 @@ define(
6+
window.AdminOrder.prototype.setShippingMethod = function (method) {
7+
var data = {},
8+
areas = [
9+
+ 'items',
10+
'shipping_method',
11+
'totals',
12+
'billing_method',

0 commit comments

Comments
 (0)