forked from ConvertGroupsAS/magento2-patches
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Patch-Magento-Catalog-M2.2.6-fix-18154-tierprices-cant-be-updated.patch
32 lines (31 loc) · 1.83 KB
/
Patch-Magento-Catalog-M2.2.6-fix-18154-tierprices-cant-be-updated.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
Index: Model/Product/Attribute/Backend/TierPrice/UpdateHandler.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- Model/Product/Attribute/Backend/TierPrice/UpdateHandler.php (revision 1804146a601561685f54c920bf869b3f2398cb9e)
+++ Model/Product/Attribute/Backend/TierPrice/UpdateHandler.php (date 1537531110000)
@@ -83,7 +83,7 @@
);
}
$websiteId = $this->storeManager->getStore($entity->getStoreId())->getWebsiteId();
- $isGlobal = $attribute->isScopeGlobal() || $websiteId === 0;
+ $isGlobal = $attribute->isScopeGlobal() || $this->isWebsiteGlobal((int)$websiteId);
$identifierField = $this->metadataPoll->getMetadata(ProductInterface::class)->getLinkField();
$productId = $entity->getData($identifierField);
Index: Model/Product/Attribute/Backend/TierPrice/SaveHandler.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- Model/Product/Attribute/Backend/TierPrice/SaveHandler.php (revision 1804146a601561685f54c920bf869b3f2398cb9e)
+++ Model/Product/Attribute/Backend/TierPrice/SaveHandler.php (date 1537531110000)
@@ -86,7 +86,7 @@
);
}
$websiteId = $this->storeManager->getStore($entity->getStoreId())->getWebsiteId();
- $isGlobal = $attribute->isScopeGlobal() || $websiteId === 0;
+ $isGlobal = $attribute->isScopeGlobal() || $this->isWebsiteGlobal((int)$websiteId);
$identifierField = $this->metadataPoll->getMetadata(ProductInterface::class)->getLinkField();
$priceRows = array_filter($priceRows);
$productId = $entity->getData($identifierField);