From d2f6abd5cc4430e9876e3f9a7cf721876b28886d Mon Sep 17 00:00:00 2001 From: David Date: Fri, 21 Sep 2018 14:10:54 +0200 Subject: [PATCH] add patch for https://github.com/magento/magento2/issues/18154 --- ...fix-18154-tierprices-cant-be-updated.patch | 32 +++++++++++++++++++ README.md | 4 ++- 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 Patch-Magento-Catalog-M2.2.6-fix-18154-tierprices-cant-be-updated.patch diff --git a/Patch-Magento-Catalog-M2.2.6-fix-18154-tierprices-cant-be-updated.patch b/Patch-Magento-Catalog-M2.2.6-fix-18154-tierprices-cant-be-updated.patch new file mode 100644 index 0000000..4f0899f --- /dev/null +++ b/Patch-Magento-Catalog-M2.2.6-fix-18154-tierprices-cant-be-updated.patch @@ -0,0 +1,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); diff --git a/README.md b/README.md index cea4d40..2f68761 100644 --- a/README.md +++ b/README.md @@ -68,6 +68,7 @@ magento/module-configurable-product|Patch-Magento_Configurable_M2.1.x-fix-get-pr magento/module-catalog|Patch-Magento-Catalog-M2.1.x-toolbar-default-sorting.patch|fix toolbar default sorting|>=2.1.0 <2.2.0 klarna/module-kco|Patch-Klarna_Kco-5.0.5-reload-summary-action-error-log.patch|Fix wrong function parameters order|>=5.0.5 magento/module-catalog-inventory|Patch-Magento_CatalogInventory-M2.2.0-2.2.3-fix-update-stock-item-on-product-save.patch|Fix: Update stock item on product save|>=2.2.0 <2.2.4 +magento/module-catalog|Patch-Magento-Catalog-M2.2.6-fix-18154-tierprices-cant-be-updated.patch|fix updating of tier prices when price scope is set to website|2.2.6 Full composer.json example: @@ -114,7 +115,8 @@ Full composer.json example: "Fix: catalog_product_flat does not update column with empty value. Fix options linking.": "https://raw.githubusercontent.com/ConvertGroupsAS/magento2-patches/master/Patch-Magento_Catalog-M2.1.4-product-flat-indexer-v2.patch", "Fix: https://github.com/magento/magento2/issues/4387": "https://raw.githubusercontent.com/ConvertGroupsAS/magento2-patches/master/Patch-Magento_Catalog-M2.1-fix-product-auto-startdates.patch", "Fix: https://github.com/magento/magento2/issues/7874": "https://raw.githubusercontent.com/ConvertGroupsAS/magento2-patches/master/Patch-Magento_Catalog-M2.1.4-regeneration-without-changes-fix.patch", - "Fix: Change toolbar default sorting": "https://raw.githubusercontent.com/ConvertGroupsAS/magento2-patches/master/Patch-Magento-Catalog-M2.1.x-toolbar-default-sorting.patch" + "Fix: Change toolbar default sorting": "https://raw.githubusercontent.com/ConvertGroupsAS/magento2-patches/master/Patch-Magento-Catalog-M2.1.x-toolbar-default-sorting.patch", + "Fix: https://github.com/magento/magento2/issues/18154": "https://raw.githubusercontent.com/ConvertGroupsAS/magento2-patches/master/Patch-Magento-Catalog-M2.2.6-fix-18154-tierprices-cant-be-updated.patch" }, "magento/module-catalog-inventory": { "Fix: https://github.com/magento/magento2/issues/8566": "https://raw.githubusercontent.com/ConvertGroupsAS/magento2-patches/master/Patch-Magento_CatalogInventory_M2.1.3-hide-out-of-stock.patch",