File tree Expand file tree Collapse file tree 1 file changed +12
-10
lines changed
app/code/Magento/Catalog/Model/Product/Option Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -190,27 +190,29 @@ public function getProduct()
190
190
public function saveValues ()
191
191
{
192
192
foreach ($ this ->getValues () as $ value ) {
193
- $ this ->isDeleted (false );
194
- $ this ->setData (
193
+ $ optionValue = clone $ this ;
194
+ $ optionValue ->isDeleted (false );
195
+
196
+ $ optionValue ->setData (
195
197
$ value
196
198
)->setData (
197
199
'option_id ' ,
198
- $ this ->getOption ()->getId ()
200
+ $ optionValue ->getOption ()->getId ()
199
201
)->setData (
200
202
'store_id ' ,
201
- $ this ->getOption ()->getStoreId ()
203
+ $ optionValue ->getOption ()->getStoreId ()
202
204
);
203
205
204
- if ($ this ->getData ('is_delete ' ) == '1 ' ) {
205
- if ($ this ->getId ()) {
206
- $ this ->deleteValues ($ this ->getId ());
207
- $ this ->delete ();
206
+ if ($ optionValue ->getData ('is_delete ' ) == '1 ' ) {
207
+ if ($ optionValue ->getId ()) {
208
+ $ optionValue ->deleteValues ($ optionValue ->getId ());
209
+ $ optionValue ->delete ();
208
210
}
209
211
} else {
210
- $ this ->save ();
212
+ $ optionValue ->save ();
211
213
}
212
214
}
213
- //eof foreach()
215
+
214
216
return $ this ;
215
217
}
216
218
You can’t perform that action at this time.
0 commit comments