Skip to content

Commit 7cc955d

Browse files
committed
MAGETWO-46472: Prepare pull request - fix select custom options
1 parent 0a32a57 commit 7cc955d

File tree

2 files changed

+1
-10
lines changed

2 files changed

+1
-10
lines changed

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

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -200,14 +200,7 @@ public function saveValues()
200200
'store_id',
201201
$this->getOption()->getStoreId()
202202
);
203-
204-
if ($this->getData('option_type_id') == '-1') {
205-
//change to 0
206-
$this->unsetData('option_type_id');
207-
} else {
208-
$this->setId($this->getData('option_type_id'));
209-
}
210-
203+
$this->unsetData('option_type_id');
211204
if ($this->getData('is_delete') == '1') {
212205
if ($this->getId()) {
213206
$this->deleteValues($this->getId());

app/code/Magento/Catalog/Model/ResourceModel/Product/Option/Collection.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,9 +210,7 @@ public function addValuesToResult($storeId = null)
210210
foreach ($values as $value) {
211211
$optionId = $value->getOptionId();
212212
if ($this->getItemById($optionId)) {
213-
// @TODO fix with new storing mechanizm
214213
$this->getItemById($optionId)->addValue($value);
215-
$value->setId(null);
216214
$value->setOption($this->getItemById($optionId));
217215
}
218216
}

0 commit comments

Comments
 (0)