Skip to content
This repository was archived by the owner on Apr 29, 2019. It is now read-only.

Commit 14a4df8

Browse files
bartlubbersenVolodymyr Kublytskyi
authored andcommitted
[BUGFIX] All option values were deleted if one was deleted earlier
The problem occurs if you delete one custom option value was deleted. This occurred because the same value object is used for saving all values, and if one value is deleted the _isDeleted flag is set tot true on that object. So all values after that value will also be deleted.
1 parent 97fac9f commit 14a4df8

File tree

1 file changed

+1
-0
lines changed
  • app/code/Magento/Catalog/Model/Product/Option

1 file changed

+1
-0
lines changed

app/code/Magento/Catalog/Model/Product/Option/Value.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,7 @@ public function getProduct()
188188
public function saveValues()
189189
{
190190
foreach ($this->getValues() as $value) {
191+
$this->isDeleted(false);
191192
$this->setData(
192193
$value
193194
)->setData(

0 commit comments

Comments
 (0)