Skip to content

Commit 5826067

Browse files
Merge pull request #199 from magento-commerce/1.1.65-release
1.1.65 Release
2 parents 6f2d758 + ef31cd4 commit 5826067

13 files changed

+1265
-3
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 AdobeCommerce & Magento OpenSource",
44
"type": "magento2-component",
5-
"version": "1.1.64",
5+
"version": "1.1.65",
66
"license": "proprietary",
77
"repositories": {
88
"repo": {

patches-info.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
diff --git a/vendor/magento/module-shared-catalog/Model/SharedCatalogAssignment.php b/vendor/magento/module-shared-catalog/Model/SharedCatalogAssignment.php
2+
index 6ac24b956ed7..732de3d21f2e 100644
3+
--- a/vendor/magento/module-shared-catalog/Model/SharedCatalogAssignment.php
4+
+++ b/vendor/magento/module-shared-catalog/Model/SharedCatalogAssignment.php
5+
@@ -121,7 +121,6 @@ public function unassignProductsForCategories(
6+
array $assignCategoriesIds
7+
) {
8+
$products = $this->getUnassignProductsByCategoryIds(
9+
- $sharedCatalogId,
10+
$unassignCategoriesIds,
11+
$assignCategoriesIds
12+
);
13+
@@ -268,22 +267,24 @@ public function getAssignProductsByCategoryIds(array $assignCategoriesIds): arra
14+
/**
15+
* Get products to be unassigned from shared catalog when categories are unassigned.
16+
*
17+
- * @param int $sharedCatalogId
18+
* @param array $unassignCategoriesIds
19+
* @param array $assignedCategoriesIds
20+
* @return array
21+
*/
22+
private function getUnassignProductsByCategoryIds(
23+
- $sharedCatalogId,
24+
array $unassignCategoriesIds,
25+
array $assignedCategoriesIds
26+
) {
27+
- $sharedCatalog = $this->sharedCatalogRepository->get($sharedCatalogId);
28+
+ if (empty($unassignCategoriesIds)) {
29+
+ return [];
30+
+ }
31+
$assignedCategoriesIds = array_diff($assignedCategoriesIds, $unassignCategoriesIds);
32+
+ if (empty($assignedCategoriesIds)) {
33+
+ return $this->getProductsByCategoryIds($unassignCategoriesIds);
34+
+ }
35+
$unassignProducts = [];
36+
- $this->searchCriteriaBuilder->addFilter('customer_group_id', $sharedCatalog->getCustomerGroupId());
37+
- $searchCriteria = $this->searchCriteriaBuilder->create();
38+
- foreach ($this->sharedCatalogProductItemRepository->getList($searchCriteria)->getItems() as $product) {
39+
+ $products = $this->getProductsByCategoryIds($unassignCategoriesIds);
40+
+ foreach ($products as $product) {
41+
$product = $this->sharedCatalogInvalidation->checkProductExist($product->getSku());
42+
if (empty(array_intersect($product->getCategoryIds(), $assignedCategoriesIds))) {
43+
$unassignProducts[] = $product;
44+
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
diff --git a/vendor/magento/module-admin-gws/Plugin/Catalog/Block/Adminhtml/Product/Helper/Form/Gallery/ContentPlugin.php b/vendor/magento/module-admin-gws/Plugin/Catalog/Block/Adminhtml/Product/Helper/Form/Gallery/ContentPlugin.php
2+
new file mode 100644
3+
index 000000000000..69358bca69ed
4+
--- /dev/null
5+
+++ b/vendor/magento/module-admin-gws/Plugin/Catalog/Block/Adminhtml/Product/Helper/Form/Gallery/ContentPlugin.php
6+
@@ -0,0 +1,49 @@
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\AdminGws\Plugin\Catalog\Block\Adminhtml\Product\Helper\Form\Gallery;
15+
+
16+
+use Magento\AdminGws\Model\Role;
17+
+use Magento\Catalog\Api\Data\ProductInterface;
18+
+use Magento\Catalog\Block\Adminhtml\Product\Helper\Form\Gallery\Content;
19+
+
20+
+class ContentPlugin
21+
+{
22+
+ /**
23+
+ * @var Role
24+
+ */
25+
+ private $role;
26+
+
27+
+ /**
28+
+ * @param Role $role
29+
+ */
30+
+ public function __construct(
31+
+ Role $role,
32+
+ ) {
33+
+ $this->role = $role;
34+
+ }
35+
+
36+
+ /**
37+
+ * Check if gallery content is editable by checking Admin exclusive website access.
38+
+ *
39+
+ * @param Content $subject
40+
+ * @param bool $result
41+
+ * @return bool
42+
+ */
43+
+ public function afterIsEditEnabled(
44+
+ Content $subject,
45+
+ bool $result
46+
+ ): bool {
47+
+ /** @var ProductInterface $product */
48+
+ $product = $subject->getParentBlock()->getDataObject();
49+
+ if (!$product) {
50+
+ return $result;
51+
+ }
52+
+
53+
+ return $this->role->hasExclusiveAccess($product->getWebsiteIds());
54+
+ }
55+
+}
56+
diff --git a/vendor/magento/module-admin-gws/etc/adminhtml/di.xml b/vendor/magento/module-admin-gws/etc/adminhtml/di.xml
57+
index 9075bc3b1c2c..6c5302cae4ef 100644
58+
--- a/vendor/magento/module-admin-gws/etc/adminhtml/di.xml
59+
+++ b/vendor/magento/module-admin-gws/etc/adminhtml/di.xml
60+
@@ -113,6 +113,9 @@
61+
<type name="Magento\Rma\Block\Adminhtml\Rma\Item\Attribute\Edit">
62+
<plugin name="returns_attribute_edit_remove_buttons" type="Magento\AdminGws\Plugin\Rma\ReturnsAttributeEditRemoveButtonsPlugin"/>
63+
</type>
64+
+ <type name="Magento\Catalog\Block\Adminhtml\Product\Helper\Form\Gallery\Content">
65+
+ <plugin name="catalog_block_gallery_content_plugin" type="\Magento\AdminGws\Plugin\Catalog\Block\Adminhtml\Product\Helper\Form\Gallery\ContentPlugin"/>
66+
+ </type>
67+
<type name="Magento\Catalog\Model\Category\Authorization">
68+
<plugin name="isCategoryAuthorizedForDifferentStoreUserRole" type="Magento\AdminGws\Model\Plugin\IsCategoryAuthorizedForDifferentStoreUserRole"/>
69+
</type>
70+
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
diff --git a/vendor/magento/module-product-alert/Model/UpdateThemeParams.php b/vendor/magento/module-product-alert/Model/UpdateThemeParams.php
2+
new file mode 100644
3+
index 0000000000000..df4c0b7981dbe
4+
--- /dev/null
5+
+++ b/vendor/magento/module-product-alert/Model/UpdateThemeParams.php
6+
@@ -0,0 +1,59 @@
7+
+<?php
8+
+/**
9+
+ * Copyright 2025 Adobe
10+
+ * All Rights Reserved.
11+
+ */
12+
+declare(strict_types=1);
13+
+
14+
+namespace Magento\ProductAlert\Model;
15+
+
16+
+use Magento\Framework\App\Area;
17+
+use Magento\Framework\Exception\NoSuchEntityException;
18+
+use Magento\Framework\View\DesignInterface;
19+
+use Magento\Framework\View\Element\Template\File\Resolver;
20+
+use Magento\ProductAlert\Block\Email\Stock;
21+
+use Magento\Store\Model\StoreManagerInterface;
22+
+
23+
+/**
24+
+ * Check before get template file name consists of themeId, if not add the themeId to get proper theme
25+
+ */
26+
+class UpdateThemeParams
27+
+{
28+
+ /**
29+
+ * UpdateThemeParams constructor
30+
+ *
31+
+ * @param DesignInterface $design
32+
+ * @param StoreManagerInterface $storeManager
33+
+ * @param Stock $stock
34+
+ */
35+
+ public function __construct(
36+
+ private readonly DesignInterface $design,
37+
+ private readonly StoreManagerInterface $storeManager,
38+
+ private readonly Stock $stock
39+
+ ) {
40+
+ }
41+
+
42+
+ /**
43+
+ * Update theme params for multi store email templates
44+
+ *
45+
+ * @param Resolver $subject
46+
+ * @param string $template
47+
+ * @param array $params
48+
+ * @return array
49+
+ * @SuppressWarnings(PHPMD.UnusedFormalParameter)
50+
+ * @throws NoSuchEntityException
51+
+ */
52+
+ public function beforeGetTemplateFileName(
53+
+ Resolver $subject,
54+
+ string $template,
55+
+ array $params = []
56+
+ ): array {
57+
+ if ($template === $this->stock->getTemplate() && !isset($params['themeId'])) {
58+
+ $params['themeId'] = $this->design->getConfigurationDesignTheme(
59+
+ Area::AREA_FRONTEND,
60+
+ ['store' => $this->storeManager->getStore()->getId()]
61+
+ );
62+
+ }
63+
+ return [$template, $params];
64+
+ }
65+
+}
66+
diff --git a/vendor/magento/module-product-alert/etc/di.xml b/vendor/magento/module-product-alert/etc/di.xml
67+
index cb9200ea4c52a..305e9f2825e83 100644
68+
--- a/vendor/magento/module-product-alert/etc/di.xml
69+
+++ b/vendor/magento/module-product-alert/etc/di.xml
70+
@@ -1,9 +1,9 @@
71+
<?xml version="1.0"?>
72+
<!--
73+
-/**
74+
- * Copyright © Magento, Inc. All rights reserved.
75+
- * See COPYING.txt for license details.
76+
- */
77+
+ /**
78+
+ * Copyright 2011 Adobe
79+
+ * All Rights Reserved.
80+
+ */
81+
-->
82+
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
83+
<type name="Magento\Framework\Module\Setup\Migration">
84+
@@ -20,4 +20,7 @@
85+
</argument>
86+
</arguments>
87+
</type>
88+
+ <type name="Magento\Framework\View\Element\Template\File\Resolver">
89+
+ <plugin name="updateThemeParams" type="Magento\ProductAlert\Model\UpdateThemeParams"/>
90+
+ </type>
91+
</config>

0 commit comments

Comments
 (0)