Skip to content

Commit 21a6bbb

Browse files
author
maksim
committed
[SPAR-197] created patch by pull magento/magento2#16838
1 parent 9536715 commit 21a6bbb

File tree

2 files changed

+43
-1
lines changed

2 files changed

+43
-1
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
--- Model/Product/Option/Value.origin.php 2018-06-14 15:32:00.000000000 +0300
2+
+++ Model/Product/Option/Value.php 2019-08-28 13:08:18.000000000 +0300
3+
@@ -204,27 +204,26 @@
4+
public function saveValues()
5+
{
6+
foreach ($this->getValues() as $value) {
7+
- $this->isDeleted(false);
8+
- $this->setData(
9+
+ $optionValue = clone $this;
10+
+ $optionValue->isDeleted(false);
11+
+ $optionValue->setData(
12+
$value
13+
)->setData(
14+
'option_id',
15+
- $this->getOption()->getId()
16+
+ $optionValue->getOption()->getId()
17+
)->setData(
18+
'store_id',
19+
- $this->getOption()->getStoreId()
20+
+ $optionValue->getOption()->getStoreId()
21+
);
22+
-
23+
- if ($this->getData('is_delete') == '1') {
24+
- if ($this->getId()) {
25+
- $this->deleteValues($this->getId());
26+
- $this->delete();
27+
+ if ($optionValue->getData('is_delete') == '1') {
28+
+ if ($optionValue->getId()) {
29+
+ $optionValue->deleteValues($optionValue->getId());
30+
+ $optionValue->delete();
31+
}
32+
} else {
33+
- $this->save();
34+
+ $optionValue->save();
35+
}
36+
}
37+
- //eof foreach()
38+
return $this;
39+
}
40+

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ magento/module-catalog|Patch-Magento\_Catalog-M2.2.x-related-products-visibility
6767
magento/module-catalog|Patch-Magento\_Catalog-M2.2.x-PRODSECBUG-2198.patch| < 2.2.8
6868
magento/module-catalog|Patch-Magento\_Catalog-improve-root-category-indexer-2.2.8.patch| > 2.2.8
6969
magento/module-catalog|Patch-Magento\_Catalog-M2.2.x-skip-empty-custom-options-skus.patch | | 2.2.5
70+
magento/module-catalog|Patch-Magento-Catalog-M2.1.x-2.2.7-fix-save-customizable-options.patch| pull #16838 | >= 2.1.* <=2.3.1
7071
magento/module-catalog-inventory|Patch-Magento\_CatalogInventory\_M2.1.3-hide-out-of-stock.patch|#8566|>=2.1.0 < 2.2.0
7172
magento/module-catalog-inventory|Patch-Magento\_CatalogInventory-M2.1.x-stock-item-events-fix.patch|#4857|<2.2.0
7273
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
@@ -192,7 +193,8 @@ Full composer.json example:
192193
"Fix: https://github.com/magento/magento2/issues/13720": "https://raw.githubusercontent.com/ConvertGroupsAS/magento2-patches/master/Patch-Magento_Catalog-M2.2.x-related-products-visibility-in-admin.patch",
193194
"Fix: SQL injection vulnerability": "https://raw.githubusercontent.com/ConvertGroupsAS/magento2-patches/master/Patch-Magento_Catalog-M2.2.x-PRODSECBUG-2198.patch",
194195
"Fix: Brand page for multystore": "https://raw.githubusercontent.com/ConvertGroupsAS/magento2-patches/master/Patch-Magento_Catalog-improve-root-category-indexer-2.2.8.patch",
195-
"Fix: skip empty Custom Options SKUs to avoid adding extra delimiters to configurable product SKU": "https://raw.githubusercontent.com/ConvertGroupsAS/magento2-patches/master/Patch-Magento_Catalog-M2.2.x-skip-empty-custom-options-skus.patch"
196+
"Fix: skip empty Custom Options SKUs to avoid adding extra delimiters to configurable product SKU": "https://raw.githubusercontent.com/ConvertGroupsAS/magento2-patches/master/Patch-Magento_Catalog-M2.2.x-skip-empty-custom-options-skus.patch",
197+
"Fix: https://github.com/magento/magento2/pull/16838": "https://raw.githubusercontent.com/ConvertGroupsAS/magento2-patches/master/Patch-Magento-Catalog-M2.1.x-2.2.7-fix-save-customizable-options.patch"
196198
},
197199
"magento/module-catalog-inventory": {
198200
"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",

0 commit comments

Comments
 (0)